Acala EVM Examples

ETHDenver Workshop Link: https://www.crowdcast.io/e/acala-ethdenver-2021

This workshop is for learning to use Acala EVM. It demonstrates how to deploy a simple ERC20 contract, a complex project like Uniswap, and use the on-chain scheduler function to build a recurring payment DApp.

Read more about Acala EVM here Developer Guide here

Start a development chain

Use Docker

You can use docker to run a development Acala Mandala chain

$ docker run --rm -p 9944:9944 acala/mandala-node:latest --dev --ws-external --rpc-methods=unsafe --instant-sealing  -levm=trace

Build & Run from source code

Or you can build & run from the Acala repo.

Follow the setup instruction at https://github.com/AcalaNetwork/Acala

Start the chain:

$ make run

Start the chain with evm compatibility mode:

$ make run-eth

Build and Run an example

  • cd into one of the example project
  • Install dependencies with yarn
  • Compile contract with yarn build
    • You can find your contract ABI in the build directory. You can upload these ABI files to acala evm playground for testing.
  • Run the tests with yarn test or yarn test --with-ethereum-compatibility with the chain which enable evm compatibility mode.

The test cases are written with with ethers.js and waffle