{"id":15915727,"url":"https://github.com/shutter-network/shutter-dao-tests","last_synced_at":"2025-08-22T12:11:15.496Z","repository":{"id":232991818,"uuid":"766583200","full_name":"shutter-network/shutter-dao-tests","owner":"shutter-network","description":"Executable proposal tests for Shutter DAO 0x36","archived":false,"fork":false,"pushed_at":"2024-08-20T16:10:55.000Z","size":141,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T04:43:39.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shutter-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-03T17:00:58.000Z","updated_at":"2024-08-20T16:10:59.000Z","dependencies_parsed_at":"2024-10-06T17:41:54.524Z","dependency_job_id":"f0bf3f36-644c-41a0-9080-dc7c18957632","html_url":"https://github.com/shutter-network/shutter-dao-tests","commit_stats":null,"previous_names":["jannikluhn/shutter-dao-tests","shutter-network/shutter-dao-tests"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shutter-network/shutter-dao-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutter-network%2Fshutter-dao-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutter-network%2Fshutter-dao-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutter-network%2Fshutter-dao-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutter-network%2Fshutter-dao-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shutter-network","download_url":"https://codeload.github.com/shutter-network/shutter-dao-tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shutter-network%2Fshutter-dao-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271636021,"owners_count":24794144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T17:41:57.316Z","updated_at":"2025-08-22T12:11:15.468Z","avatar_url":"https://github.com/shutter-network.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shutter DAO Proposal Tests\n\nThis repository contains tests of proposals for Shutter DAO 0x36 which can be\nrun against mainnet. Executable tests make the effects of a proposal explicit\nand verifiable, making it easier to check that a proposal does what it claims\nto do.\n\n## Installation\n\nTo get started, clone the repository and make sure the following dependencies\nare installed:\n\n- [forge](https://getfoundry.sh/)\n- [npm](https://www.npmjs.com/)\n\nThen, run `npm install` in the project root directory.\n\n## Running Tests\n\nTo run the tests, the following environment variable has to be set (see for\ninstance `.envrc.example`):\n\n- `FORK_URL`: The URL of an Ethereum mainnet JSON RPC provider\n\n`make test` will prepare and execute the tests. Specify `FORGE_OPTS` to pass\noptions to forge, e.g., to filter the tests to run:\n`make test FORGE_OPTS=\"--match-contract \u003ctest contract name\u003e\"`.\n\n## Adding Tests\n\n#### Specify the proposal\n\nAdd proposals as JSON files in the `proposals/` directory. They must have the\nfollowing format:\n\n```json\n{\n  \"strategy\": \"0x4b29d8B250B8b442ECfCd3a4e3D91933d2db720F\",\n  \"transactions\": [\n    {\n      \"targetAddress\": \"\",\n      \"functionName\": \"\",\n      \"functionSignature\": \"\",\n      \"parameters\": \"\",\n      \"value\": 0\n    }\n  ],\n  \"metadata\": \"\"\n}\n```\n\n- `strategy` defines the voting strategy of the proposal. As of now, Shutter\n  DAO 0x36 only supports linear ERC20 voting defined by\n  [0x4b29d8B250B8b442ECfCd3a4e3D91933d2db720F](https://etherscan.io/address/0x4b29d8B250B8b442ECfCd3a4e3D91933d2db720F).\n- `transactions` is the list of \"transactions\" that will be executed when the\n  proposal succeeds. The fields `targetAddress`, `functionName`,\n  `functionSignature` and `parameters` contain the values entered in the\n  [Create Proposal](https://docs.fractalframework.xyz/home/proposals/create)\n  interface in Fractal. Pure value transfers are not currently supported and\n  the `value` field should be left at `0`.\n- `metadata` is ignored.\n\n#### Write the test\n\nPut the test files in the `test/` directory and name them according to the\ncorresponding proposal (e.g., if the proposal is called `BurnTokens.json`, the\nfile should be called `BurnTokens.t.sol`). The tests are standard\n[foundry](https://getfoundry.sh) test contracts and should inherit from\n`TestProposal` in `utils/ProposalTest.sol`. Each test contract should implement\nthe `proposalFile` function to specify the name of the proposal that is tested:\n\n```solidity\ncontract Proposal1Test is ProposalTest {\n    function proposalFile() public pure override returns (string memory) {\n        return \"BurnTokens.json\";\n    }\n\n    function testTokensAreBurnt() public {\n        // test code goes here\n    }\n```\n\nThe default `setUp` function defined in `ProposalTest` will submit the\nproposal, vote on it, and execute it. I.e., the tests are run on top of the\nstate immediately after the proposal has been executed. If the proposal fails\nto execute, the test will fail already in the `setUp` function. If you\noverride the `setUp` function, be sure to either call `super.setUp();` or\nreimplement the same logic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshutter-network%2Fshutter-dao-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshutter-network%2Fshutter-dao-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshutter-network%2Fshutter-dao-tests/lists"}