At æternity, the developer experience is just as important for us as the experience had by end users of our æpps. For this reason, we build a number of developer tools and write tutorials to enable anyone to engage with our blockchain. Prior to our Mainnet release we will be publishing a few blog posts specifically for developers who would like to build on our blockchain.
What are æternity Smart Contracts?
Smart Contracts are programs which live on the blockchain and allow users to formalize agreements between each other. Virtual machines running on nodes execute the contracts, for which the nodes receive fees. A contract will run when it receives notification of an event from the outside world, such as the transfer of a payment from a user, or some other real-world event identified by an oracle.
Contracts must be compiled before they are uploaded to the blockchain. Epoch will compile contracts, but external compilers will be available as well. The compiled bytecode is stored on the chain and executed by the nodes. This execution uses CPU power on the nodes, and so it is paid for, using gas.
Sophia Smart Contract Language & Tools for Smart Contract Developers
For our Mainnet launch we will support the Sophia smart contract language. You can learn more about what makes Sophia an excellent smart contract language in one of our previous posts, in our webinar Sophia, a functional blockchain language, as well as on Github.
Testnet Tokens Faucet
In order to acquire Testnet tokens needed to run and test smart contracts developers can use our Testnet faucet: https://faucet.aepps.com/ All they need to do is enter their public address and click “Top up!”.
Contracts Web Tool
Smart contract developers can write, deploy, and call smart contracts using the web tool which we built for this purpose: https://contracts.aepps.com/. The tool is connected to the æpps Testnet mentioned above.
This is what the smart contract tool above looks like after a contract is compiled to bytecode:
Currently this contract editor uses an account which has been given a great deal of gas. It always executes in the context of this account, which makes it suitable for testing. Of course, in the future, developers will run this editor in the context of their own accounts, using their own gas. Anyone wanting to run the editor themselves can find it in its GitHub repository, https://github.com/aeternity/aepp-contracts.
Once our Mainnet is live the workflow will be very similar. Users will still be able to use our contracts tool, but we expect that more and more developers will opt to run it themselves, and we expect third parties to develop tools to work with our contracts.
Interested in æternity? Get in touch: