Skip to content

windranger-io/windranger-governance-snapshot-strategies-it

Repository files navigation

WindRanger Governance Snapshot-Strategies IT

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

Development follows these processes outlined in development process

Installation, building and running

Git clone, then from the project root execute

Install

To retrieve the project dependencies and before any further tasks will run correctly

npm install

Husky Git Commit Hooks

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

Build and Test

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

Logging is performed with Bunyan

Bunyan CL

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

Local Node Setup

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

About

Snapshot voting strategies for Governance v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published