{"id":28170967,"url":"https://github.com/raid-guild/toad-contracts","last_synced_at":"2025-06-13T11:07:32.384Z","repository":{"id":283325683,"uuid":"950913067","full_name":"raid-guild/toad-contracts","owner":"raid-guild","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-20T23:13:13.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T01:41:46.528Z","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/raid-guild.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,"zenodo":null}},"created_at":"2025-03-18T21:54:03.000Z","updated_at":"2025-04-20T23:13:16.000Z","dependencies_parsed_at":"2025-04-21T12:46:15.076Z","dependency_job_id":null,"html_url":"https://github.com/raid-guild/toad-contracts","commit_stats":null,"previous_names":["fluffy9/toad-contracts","raid-guild/toad-contracts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raid-guild/toad-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raid-guild%2Ftoad-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raid-guild%2Ftoad-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raid-guild%2Ftoad-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raid-guild%2Ftoad-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raid-guild","download_url":"https://codeload.github.com/raid-guild/toad-contracts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raid-guild%2Ftoad-contracts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259634349,"owners_count":22887697,"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","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":"2025-05-15T18:15:43.024Z","updated_at":"2025-06-13T11:07:32.359Z","avatar_url":"https://github.com/raid-guild.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TOAD (Trustless Onchain Autonomous Delegate)\n\nTOAD is a smart contract system that implements a trustless onchain autonomous delegate for governance voting. It allows token holders to delegate their voting power to an autonomous system while maintaining the ability to override the system's decisions through a collective disable mechanism.\n\n## Smart Contract Overview\n\nThe TOAD contract implements a sophisticated governance system with the following key features:\n\n- **Autonomous Voting**: TOAD can autonomously vote on governance proposals\n- **Disable Mechanism**: Token holders can collectively disable TOAD's voting power\n- **Trustless Design**: No single entity has control over the system\n- **Gas-Efficient**: Optimized for minimal gas usage\n- **OpenZeppelin Integration**: Built on top of OpenZeppelin's Governor and ERC20Votes contracts\n\n### Key Components\n\n1. **Proposal Management**\n   - Discovery of new proposals\n   - Answer recording\n   - Results announcement\n   - Proposal clearing\n\n2. **Voting Power Management**\n   - Delegation tracking\n   - Voting power calculation\n   - Disable power accumulation\n\n## Prerequisites\n\n- Foundry (forge, cast, anvil)\n- An Ethereum wallet (e.g., MetaMask)\n- Access to an Ethereum node (local or through a provider like Infura/Alchemy)\n\n## Environment Setup\n\n1. Clone the repository:\n```bash\ngit clone [repository-url]\ncd toad-contracts\n```\n\n2. Install Foundry:\n```bash\ncurl -L https://foundry.paradigm.xyz | bash\nfoundryup\n```\n\n3. Install dependencies:\n```bash\nforge install\n```\n\n4. Create a `.env` file in the root directory with the following variables:\n```env\nPRIVATE_KEY=your_private_key_here\nTOAD_ADDRESS=your_toad_address\nTALLY_GOVERNOR=your_tally_governor_address\nVALID_BLOCK_INTERVAL=your_block_interval\n# Network RPC URLs and API keys\nOPTIMISM_RPC_URL=your_optimism_rpc_url\nARBITRUM_RPC_URL=your_arbitrum_rpc_url\nPOLYGON_RPC_URL=your_polygon_rpc_url\nOPTIMISM_ETHERSCAN_API_KEY=your_optimism_api_key\nARBITRUM_ETHERSCAN_API_KEY=your_arbitrum_api_key\nPOLYGONSCAN_API_KEY=your_polygon_api_key\n```\n\n## Development\n\n1. Compile the contracts:\n```bash\nforge build\n```\n\n2. Run tests:\n```bash\nforge test\n```\n\n3. Run specific tests with verbosity:\n```bash\nforge test -vv\n```\n\n## Deployment\n\nThe project supports deployment to multiple networks:\n\n- Optimism\n- Arbitrum\n- Polygon\n\nTo deploy:\n\n1. Make the deployment script executable:\n```bash\nchmod +x deploy.sh\n```\n\n2. Run the deployment:\n```bash\n./deploy.sh\n```\n\nThe script will automatically deploy to networks based on the environment variables set in your `.env` file.\n\nFor detailed deployment instructions, see [DEPLOY.md](DEPLOY.md).\n\n## Security Considerations\n\n- The contract uses OpenZeppelin's battle-tested contracts\n- All external functions have appropriate access controls\n- Input validation is implemented for all user inputs\n- Gas optimization techniques are employed throughout the code\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor security concerns, please contact the security team at [email to be added]. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraid-guild%2Ftoad-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraid-guild%2Ftoad-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraid-guild%2Ftoad-contracts/lists"}