WindRanger Governance to Snapshot-Strategies integration test suite.
Initialises an in-memory node with the Governance and MultiCall contracts, populated with test data and verifies the correctness of the WindRanger Snapshot-Strategies.
Development follows these processes outlined in development process
Git clone, then from the project root execute
To retrieve the project dependencies and before any further tasks will run correctly
npm install
To enable Husky commit hooks to trigger the lint-staged behaviour of formatting and linting the staged files prior
before committing, prepare your repo with prepare
.
npm run prepare
npm run build
npm test
If you make changes that don't get picked up then add a clean into the process
npm run clean
npm run build
npm test
Logging is performed with Bunyan
To have the JSON logging output into a more human-readable form, pipe the stdout to the Bunyan CLI tool.
npx hardhat accounts | npx bunyan
Separate to the integration tests, you can set up a local HardHat node instance with contracts and test data using scripts.
The motivation for setting up a local HardHat node would be to run separate tests against it.
npx hardhat node
npx hardhat run ./scripts/deploy-all.ts --network local
In the script ensure that votesOracleAddress
(WindRanger Votes Oracle) matches the deployed contract address, then to validate the setup:
npx hardhat run ./scripts/validate-role-vote-init.ts --network local
npx hardhat run ./scripts/validate-open-vote-init.ts --network local