Skip to content

Configuration and tests to deploy CMTAT with the Foundry toolchain

Notifications You must be signed in to change notification settings

CMTA/CMTAT-Foundry

Repository files navigation

CMTAT - using the Foundry suite

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.

Toolchain installation

To install the Foundry suite, please refer to the official instructions in the Foundry book.

Initialization

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.

Compilation

To compile the contracts, run

 forge build --contracts src/CMTAT.sol

See also the command's documentation.

Testing

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.

Local deployment

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.

Code style guidelines

We use the following tools to ensure consistent coding style:

Prettier:

npx prettier --write 'test/**/*.sol'

Ethlint/ Solium

npx solium -d test

The related components can be installed with npm install (see package.json).

About

Configuration and tests to deploy CMTAT with the Foundry toolchain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published