Skip to content

Commit b64090a

Browse files
authored
Update README.md (#958)
1 parent 6c52eb6 commit b64090a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

target_chains/ethereum/contracts/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ npm run install-forge-deps
3333
After installing the dependencies. Run `forge build` to build the contracts and `forge test` to
3434
test the contracts using tests in `forge-test` directory.
3535

36+
### Governance tests
37+
There is a separate test suite executed by truffle for testing governance messages and contract upgrades. You can either use tilt to test automatically or run ganache-cli as a blockchain instance and test it manually. To do the latter, run the following commands in the `contracts` folder:
38+
1. Spawn a new network on a seperate terminal (do not close it while running tests):
39+
```bash
40+
npx ganache-cli -e 10000 --deterministic --time="1970-01-02T00:00:00+00:00" --host=0.0.0.0
41+
```
42+
2. deploy the contracts:
43+
```bash
44+
cp .env.test .env && npx truffle compile --all && npx truffle migrate
45+
```
46+
3. Run the test suite:
47+
```bash
48+
npm run test-contract
49+
```
50+
3651
### Gas Benchmark
3752

3853
You can use foundry to run benchmark tests written in [`forge-test/GasBenchmark.t.sol`](./forge-test/GasBenchmark.t.sol). To run the tests with gas report

0 commit comments

Comments
 (0)