Aurora Engine
Prerequisites
- Rust nightly (2021-01-30) with the WebAssembly toolchain
- GNU Make (3.81+)
rustup install nightly-2021-01-30
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-01-30
Development
Building the contract
make release # produces release.wasm (300+ KiB)
make debug # produces debug.wasm (1+ MiB), which includes symbols
Running unit tests
make check
Deployment
Deploying the contract
export NEAR_ENV=local
near delete evm.test.near test.near # if needed
near create-account evm.test.near --master-account=test.near --initial-balance 100000
near deploy --account-id=evm.test.near --wasm-file=release.wasm
Usage
Calling the contract
near call evm.test.near get_version --account-id evm.test.near
near call evm.test.near get_chain_id --account-id evm.test.near
Debugging
Inspecting the contract state
near state evm.test.near
http post http://localhost:3030 jsonrpc=2.0 id=1 method=query params:='{"request_type": "view_state", "account_id": "evm.test.near", "prefix_base64": "", "finality": "final"}'
If you have Ruby installed, get more useful and readable output as follows:
rake dump