eosnetworkfoundation / evm-bridge-contracts

Contracts to support the trustless bridge of the EOS EVM
Other
1 stars 2 forks source link

EOS EVM Bridge Contracts

This repository contains the Solidity and Antelope contracts needed to support advanced functionality of the trustless bridge of EOS EVM.

The erc20 contracts (both within solidity_contracts and antelope_contracts) enable tokens to be moved between the EOS EVM and EOS Native environments across the trustless bridge of EOS EVM. On the EOS EVM side, the tokens are managed by an ERC-20 compatible token contract that is automatically deployed to EOS EVM and managed by the Antelope erc20 contract. On the EOS Native side, the Antelope erc20 contract supports any tokens that follow the common interface established by the eosio.token reference contract; specifically, the token contract deployed on EOS Native must satisfy the interface for the transfer action captured in this header file and its behavior should follow the expectations set in the eosio.token reference contract.

Dependencies

Building

Update submodules by running: git submodule update --init --recursive

Create a build directory within the root of the cloned repo and cd into it.

Run cmake -Dleap_DIR="${LEAP_BUILD_PATH}/lib/cmake/leap" -Dcdt_DIR="${CDT_BUILD_PATH}/lib/cmake/cdt" .. from within the build directory. Here we assume that environment variables LEAP_BUILD_PATH and CDT_BUILD_PATH are set to the build directories for the Leap and CDT dependencies, respectively. The -Dleap_DIR and -Dcdt_DIR options are used to specify custom builds of Leap and CDT, respectively. If you have installed the appropriate version of CDT on the system, you can leave off the -Dcdt_DIR. Even if you have installed Leap binaries on the system, you will still need to build Leap and use -Dleap_DIR because the build directory contains specific testing libraries needed for building the unit tests for the bridge contracts.

Run the command make -j.

Running tests

The build steps above will build the test as well.

After building, cd into the build directory and then simply run ctest.