Coder Social home page Coder Social logo

cruston / aurora-engine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aurora-is-near/aurora-engine

0.0 0.0 0.0 13.41 MB

⚙️ Aurora Engine implements an Ethereum Virtual Machine (EVM) on the NEAR Protocol.

Home Page: https://doc.aurora.dev/develop/compat/evm

Shell 0.03% JavaScript 0.25% Rust 98.25% Solidity 1.48%

aurora-engine's Introduction

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

  • Node.js (v14+)
  • cargo-make
cargo install --force cargo-make

Prerequisites for Development

  • Node.js (v14+)
  • Docker
  • cargo-make

Development

Branches

  • master is the current stable branch. It must be ready, at all times, to be deployed on chain at a moment's notice.

  • develop is our bleeding-edge development branch. In general, kindly target all pull requests to this branch.

Building & Make Commands

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

The current available profiles are:

  • mainnet: suitable for mainnet.
  • mainnet-silo: silo contract suitable for mainnet.
  • testnet: suitable for testnet.
  • testnet-silo: silo contract suitable for testnet.
  • local: suitable for local development.
  • custom: suitable for custom environments, see note below.

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:

  • default: does not need to be specified, runs build. Requires a --profile argument.
  • build: builds all engine smart contract and produces the aurora-<profile>-test.wasm in the bin folder. Requires build-contracts. Requires a --profile argument.
  • build-test: builds all the below using test features. Requires a --profile argument.
  • build-contracts: builds all the ETH contracts.
  • build-docker: builds the aurora-<profile>-test.wasm in the bin folder using docker build environment. The purpose of this task is to produce reproducible binaries.

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:

  • test: tests the whole cargo workspace and ETH contracts. Requires a --profile argument.
  • test-workspace: tests only the cargo workspace.
  • test-contracts: tests only the contracts.
  • test: tests the whole cargo workspace, ETH contracts and runs modexp benchmarks. Requires a --profile argument.
  • test-flow: tests the whole cargo workspace and ETH contracts. Requires a --profile argument.
  • bench-modexp: runs modexp benchmarks. Requires a --profile argument.

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:

  • 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.
  • 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

Cleanup

The following tasks are available to clean up the workspace:

  • 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

License

aurora-engine has multiple licenses:

  • All crates except engine-test has CCO-1.0 license
  • engine-test has GPL-v3 license

aurora-engine's People

Contributors

birchmd avatar artob avatar joshuajbouw avatar aleksuss avatar dependabot[bot] avatar mrlsd avatar 0x3bfc avatar matklad avatar romanhodulak avatar guidovranken avatar mfornet avatar lempire123 avatar vzctl avatar karim-en avatar hskang9 avatar frankbraun avatar forwardslashback avatar vimpunk avatar casuso avatar andrcmdr avatar strokovok avatar evgenykuzyakov avatar ilblackdragon avatar raventid avatar sept-en avatar i-fix-typos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.