Aurora Engine implements an Ethereum Virtual Machine (EVM) on the NEAR Protocol. See doc.aurora.dev for additional documentation.
| Network | Contract ID | Chain ID | Version |
|---|---|---|---|
| Mainnet | aurora |
1313161554 | 2.6.1 |
| Testnet | aurora |
1313161555 | 2.7.0 |
| Local | aurora.test.near |
1313161556 | 2.7.0 |
- Node.js (v14+)
- Rust nightly (2021-03-25) with the WebAssembly toolchain
- cargo-make
rustup install nightly-2021-03-25
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-25
cargo install --force cargo-make- Node.js (v14+)
- Docker
- cargo-make
-
masteris the current stable branch. It must be ready, anytime, to deployed on chain at a moment's notice. -
developis our bleeding-edge development branch. In general, kindly target all pull requests to this branch.
Every task with cargo make must have a --profile argument.
The current available profiles are:
mainnet, suitable for mainnet.testnet, suitable for testnet.local, suitable for local development.custom, suitable for custom environments, see note below.
A custom environment may be required depending on the circumstances. This can
be created in the .env folder as custom.env following the structure of the
other .env files. See bin/local-custom.env for more details.
Every make most follow the following pattern, though --profile is not required
for all such as cleanup:
cargo make [--profile <profile>] <task>To build the binaries there are a few commands to do such following the format.
The current available build tasks are:
default, does not need to be specified, runsbuild. Requires a--profileargument.build, builds all engine smart contract and produces theaurora-<profile>-test.wasmin thebinfolder. Requiresbuild-contracts. Requires a--profileargument.build-test, builds all the below using test features. Requires a--profileargument.build-contracts, builds all the ETH contracts.
For example, the following will build the mainnet debug binary:
cargo make --profile mainnet buildTo run tests, there are a few cargo make tasks we can run:
test, tests the whole cargo workspace and ETH contracts. Requires a--profileargument.test-workspace, tests only the cargo workspace.test-contracts, tests only the contracts.
For example, the following will test the whole workspace and ETH contracts:
cargo make --profile mainnet test To run lints and checks, the following tasks are available:
check, checks the format, clippy and ETH contracts.check-contracts, runs yarn lints on the ETH contracts.check-fmt, checks the workspace Rust format only.check-clippy, checks the Rust workspace with clippy only.
For example the following command will run the checks. profile is not required
here:
cargo make check
To clean up the workspace, the following tasks are available:
clean, cleans all built binaries and ETH contracts.clean-cargo, cleans with cargo.clean-contracts, cleans the ETH contracts.clean-bin, cleans the binaries.
Additionally, there is also but not included in the clean task:
sweep, sweeps the set amount of days in the ENV, default at 30 days.
For example, the following command will clean everything. profile is not
required:
cargo make clean
wget https://github.com/aurora-is-near/aurora-engine/releases/download/latest/mainnet-release.wasmnpm install -g aurora-is-near/aurora-cliexport NEAR_ENV=local
near delete aurora.test.near test.near # if needed
near create-account aurora.test.near --master-account=test.near --initial-balance 1000000
aurora install --chain 1313161556 --owner test.near bin/mainnet-release.wasmexport NEAR_ENV=local
near delete aurora.test.near test.near # if needed
near create-account aurora.test.near --master-account=test.near --initial-balance 1000000
near deploy --account-id=aurora.test.near --wasm-file=bin/mainnet-release.wasm
aurora initialize --chain 1313161556 --owner test.nearaurora get-version
aurora get-owner
aurora get-bridge-prover
aurora get-chain-idaurora deploy-code @contract.bytecodeaurora deploy-code 0x600060005560648060106000396000f360e060020a6000350480638ada066e146028578063d09de08a1460365780632baeceb714604d57005b5060005460005260206000f3005b5060016000540160005560005460005260206000f3005b5060016000540360005560005460005260206000f300$ aurora encode-address test.near
0xCBdA96B3F2B8eb962f97AE50C3852CA976740e2Baurora get-nonce 0xCBdA96B3F2B8eb962f97AE50C3852CA976740e2B
aurora get-balance 0xCBdA96B3F2B8eb962f97AE50C3852CA976740e2B
aurora get-code 0xFc481F4037887e10708552c0D7563Ec6858640d6
aurora get-storage-at 0xFc481F4037887e10708552c0D7563Ec6858640d6 0$ aurora encode-address test.near
0xCBdA96B3F2B8eb962f97AE50C3852CA976740e2Baurora view --sender 0xCBdA96B3F2B8eb962f97AE50C3852CA976740e2B 0xFc481F4037887e10708552c0D7563Ec6858640d6 0x8ada066e # getCounter()
aurora view --sender 0xCBdA96B3F2B8eb962f97AE50C3852CA976740e2B 0xFc481F4037887e10708552c0D7563Ec6858640d6 0xd09de08a # increment()
aurora view --sender 0xCBdA96B3F2B8eb962f97AE50C3852CA976740e2B 0xFc481F4037887e10708552c0D7563Ec6858640d6 0x2baeceb7 # decrement()aurora call 0xFc481F4037887e10708552c0D7563Ec6858640d6 0xd09de08a # increment()
aurora call 0xFc481F4037887e10708552c0D7563Ec6858640d6 0x2baeceb7 # decrement()near state aurora.test.near
aurora dump-storageaurora-engine has multiple licenses:
- all crates except
engine-testhas CCO-1.0 license engine-testhas GPL-v3 license