aurora-is-near / aurora-engine

⚙️ Aurora Engine implements an Ethereum Virtual Machine (EVM) on the NEAR Protocol.
https://doc.aurora.dev/develop/compat/evm
322 stars 79 forks source link

Aurora Engine

Project license Discord Lints Tests Builds

Aurora Engine implements an Ethereum Virtual Machine (EVM) on the NEAR Protocol. See doc.aurora.dev for additional documentation.

Deployments

Network Contract ID Chain ID
Mainnet aurora 1313161554
Testnet aurora 1313161555
Local aurora.test.near 1313161556

Development

Prerequisites

cargo install --force cargo-make

Prerequisites for Development

Development

Branches

Building & Make Commands

Every task with cargo make must have a --profile argument.

The current available profiles are:

In some circumstances, you may require a custom environment. 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 invocation must follow the following pattern, though --profile is not required in all cases (such as cleanup):

cargo make [--profile <profile>] <task>

Building the engine and contracts

There are several commands that can be used to build the binaries. The currently supported parameters for the task field are listed below:

For example, the following will build the mainnet debug binary:

cargo make --profile mainnet build

Verifying binary hash

To verify that a deployed binary matches the source code, you may want build it reproducibly and then verify that the SHA256 hash matches that of the deployed binary. The motivation behind this is to prevent malicious code from being deployed.

Run these commands to produce the binary hash:

cargo make --profile <profile> build-docker
shasum -a 256 bin/aurora-<profile>.wasm

Running unit & integration tests

To run tests, there are a few cargo make tasks we can run:

For example, the following will test the whole workspace and ETH contracts:

cargo make --profile mainnet test 

Running checks & lints

The following tasks are available to run lints and checks:

For example, the following command will run the checks. profile is not required here:

cargo make check

Cleanup

The following tasks are available to clean up the workspace:

Additionally, there is also but not included in the clean task:

For example, the following command will clean everything. profile is not required:

cargo make clean

License

aurora-engine has multiple licenses: