- updating contract to support whitelist
- changing the Web3Bridge Logo
- writing tests for the contracts
hardhat option for ds-test
$ npm install @mangrovedao/hardhat-test-solidity
// hardhat.config.js
require('@mangrovedao/hardhat-test-solidity');
// test file
//mycontract-test.sol
// Adds Test library to the context
import Test from "@mangrovedao/hardhat-test-solidity/test.sol";
// `_Test` suffix means it is a test contract
contract MyContract_Test {
// `_test` suffix means it is a test function
function addition_test() public {
prepare();
// Logging will be interpreted by hardhat-test-solidity
Test.eq(4,2+2,"oh no");
}
// Will not be interpreted as a test function
function prepare() public {}
}
// running test
$ npx hardhat test-solidity MyContract