Warning:
This repository is still under development.
The majority of tests provided are not updated and are incomplete.
This repository contains the configuration to manage CMTAT using the Foundry suite – If you use Truffle instead of Foundry, please see CMTA/CMTAT-Truffle.
The CMTAT contracts are included as a submodule of the present repository. The current version used is the version 2.3.
To install the Foundry suite, please refer to the official instructions in the Foundry book.
You must first initialize the submodules, with
forge install
See also the command's documentation.
Later you can update all the submodules with:
forge update
See also the command's documentation.
To compile the contracts, run
forge build --contracts src/CMTAT.sol
See also the command's documentation.
You can run the tests with
forge test
To run a specific test, use
forge test --match-contract <contract name> --match-test <function name>
See also the test framework's official documentation, and that of the test commands.
With Foundry, you can create a local testnet node for deploying and testing smart contracts, based on the Anvil framework.
On Linux, using the default RPC URL, and Anvil's test private key, run:
export RPC_URL=http://127.0.0.1:8545`
export PRIVATE_KEY=<Local Private Key>
forge create CMTAT --rpc-url=$RPC_URL --private-key=$PRIVATE_KEY
See also the command's documentation.
We use the following tools to ensure consistent coding style:
npx prettier --write 'test/**/*.sol'
npx solium -d test
The related components can be installed with npm install
(see package.json).