These contracts provide the functionality for mediators intended to work on top of the AMB bridge.
There are two ways to deploy contracts:
- install and use NodeJS
- use Docker to deploy
npm installPlease read the README.md in the deploy folder for instructions and .env file configuration
npm testnpm run coverageThe results can be found in the coverage directory.
Fattened contracts can be used to verify the contract code in a block explorer like BlockScout or Etherscan. The following command will prepare flattened version of the contracts:
npm run flattenThe flattened contracts can be found in the flats directory.
Docker and Docker Compose can be used to deploy contracts without NodeJS installed on the system.
If you are on Linux, we recommend you create a docker group and add your user to it, so that you can use the CLI without sudo.
docker-compose up --buildNote: The container must be rebuilt every time the code in a contract or deployment script is changed.
- Create the
.envfile in thedeploydirectory as described in the deployment README.md. - Run deployment process:
or with Linux:
docker-compose run amb-mediators deploy.sh
./deploy.sh
- Discover the container name:
docker-compose images amb-mediators
- In the following command, use the container name to copy the flattened contracts code to the current working directory. The contracts will be located in the
flatsdirectory.docker cp name-of-your-container:/contracts/flats ./
$ docker-compose run dev bash
$ npm test
$ npm run coverageIf the container is no longer needed, it can be shutdown:
docker-compose downSee the CONTRIBUTING document for contribution, testing and pull request protocol.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.