Developer Tutorial: Writing contracts with Enigma Blockchain

Writing Contracts on Enigma Blockchain

The current Enigma Blockchain is transaction-only, but introducing smart contract functionality is our next milestone. In fact, we’ve already included this in our testnet, where it is called the compute module. When we introduce Secret Contracts, we will be adding functionality to the compute module.

We’ve put together this guide to get you started writing contracts for the Enigma blockchain.

This guide doesn’t include secret contracts, but modifying existing contracts to use our privacy features in the future should be straightforward. A few points to keep in mind before you dig in:

  • Contracts are written in Rust, and are built on cosmwasm
  • We use enigmacli (our fork of cosmos cli) to interact with the blockchain and with contracts in this guide.
  • This guide assumes you will use Docker and deploy a local testnet, rather than use a networked testnet. While we periodically make networked testnets available, we recommend developing locally for now until networked testnets are more stable.

Special thanks to @taariq and @laura for their excellent work on this guide, and also to @Derek for the helpful PR!

If you run into problems, would like to help improve the guide, or have another idea for how you can contribute, please open an issue and/or message us on Discord, Discourse, or Github!

6 Likes