{"id":22073248,"url":"https://github.com/snapshot-labs/sx-evm","last_synced_at":"2026-03-05T16:39:45.344Z","repository":{"id":181757006,"uuid":"578165720","full_name":"snapshot-labs/sx-evm","owner":"snapshot-labs","description":"Core smart contracts of Snapshot X for EVM","archived":false,"fork":false,"pushed_at":"2024-10-31T10:25:32.000Z","size":1925,"stargazers_count":21,"open_issues_count":9,"forks_count":12,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-31T11:24:55.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.snapshotx.xyz","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snapshot-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"audits/ChainSecurity_Snapshot_Snapshot_X_audit.pdf","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-14T12:14:30.000Z","updated_at":"2024-09-19T23:31:54.000Z","dependencies_parsed_at":"2024-01-08T15:03:15.720Z","dependency_job_id":null,"html_url":"https://github.com/snapshot-labs/sx-evm","commit_stats":null,"previous_names":["snapshot-labs/sx-evm"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapshot-labs%2Fsx-evm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapshot-labs%2Fsx-evm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapshot-labs%2Fsx-evm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapshot-labs%2Fsx-evm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snapshot-labs","download_url":"https://codeload.github.com/snapshot-labs/sx-evm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227432328,"owners_count":17775896,"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":"2024-11-30T21:17:36.826Z","updated_at":"2026-03-05T16:39:45.303Z","avatar_url":"https://github.com/snapshot-labs.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/github/snapshot-labs/sx-evm/branch/main/graph/badge.svg?token=BZ4XKYU3FT)](https://app.codecov.io/gh/snapshot-labs/sx-evm)\n[![ci](https://github.com/snapshot-labs/sx-evm/actions/workflows/ci.yml/badge.svg)](https://github.com/snapshot-labs/sx-evm/actions/workflows/ci.yml)\n\n# Snapshot X\n\nAn EVM implementation of the Snapshot X Protocol. Refer to the [documentation](https://docs.snapshot.box) for more\ninformation.\n\n## Contracts Blueprint\n\n```ml\nsrc\n├─ authenticators\n│  ├─ Authenticator.sol - \"Base Authenticator contract\"\n│  ├─ EthSigAuthenticator.sol - \"Strategy that authenticates users via an EIP712 signature\"\n│  ├─ EthTxAuthenticator.sol - \"Strategy that authenticates users via checking the tx sender address\"\n│  └─ VanillaAuthenticator.sol — \"Vanilla Strategy\"\n├─ voting-strategies\n│  ├─ CompVotingStrategy.sol - \"Strategy that uses delegated balances of Comp tokens as voting power\"\n│  ├─ OZVotesVotingStrategy.sol - \"Strategy that uses delegated balances of OZ Votes tokens as voting power\"\n│  ├─ WhitelistVotingStrategy.sol — \"Strategy that gives predetermined voting power for members in a whitelist. Whitelist is stored in a bytes array On-Chain.\"\n│  ├─ MerkleWhitelistVotingStrategy.sol — \"Strategy that gives predetermined voting power for members in a whitelist. Whitelist is stored in a Merkle tree Off-Chain, with only the root being stored On-Chain.\"\n│  └─ VanillaVotingStrategy.sol — \"Vanilla Strategy\"\n├─ execution-strategies\n│  ├─ timelocks\n│  |  ├─ CompTimelockCompatibleExecutionStrategy.sol - \"Strategy that provides compatibility with existing Comp Timelock contracts\"\n│  |  ├─ OptimisticCompTimelockCompatibleExecutionStrategy.sol - \"Optimistic strategy that provides compatibility with existing Comp Timelock contracts\"\n│  |  ├─ OptimisticTimelockExecutionStrategy.sol - \"Optimistic strategy that can be used to execute proposal transactions according to a timelock delay\"\n│  |  └─ TimelockExecutionStrategy.sol - \"Strategy that can be used to execute proposal transactions according to a timelock delay\"\n│  ├─ AvatarExecutionStrategy.sol - \"Strategy that allows proposal transactions to be executed from an Avatar contract\"\n│  ├─ TimelockExecutionStrategy.sol - \"Strategy that can be used to execute proposal transactions according to a timelock delay\"\n│  ├─ CompTimelockCompatibleExecutionStrategy.sol - \"Strategy that provides compatibility with existing Comp Timelock contracts\"\n│  ├─ EmergencyQuorumExecutionStrategy.sol - \"Base Strategy that uses an additional Emergency Quorum to determine the status of a proposal\"\n│  ├─ OptimisticQuorumExecutionStrategy.sol - \"Base Strategy that uses an Optimistic Quorum to determine the status of a proposal\"\n│  ├─ SimpleQuorumExecutionStrategy.sol - \"Base Strategy that uses a Simple Quorum to determine the status of a proposal\"\n│  └─ VanillaExecutionStrategy.sol - \"Vanilla Strategy\"\n├─ interfaces\n│  ├─ ...\n├─ proposal-validation-strategies\n│  ├─ ActiveProposalsLimiterProposalValidationStrategy.sol - \"Strategy to that validates with the ActiveProposalsLimiter module\"\n│  ├─ PropositionPowerAndActiveProposalsLimiterProposalValidationStrategy.sol - \"Strategy that validates with the ActiveProposalsLimiter and PropositionPower modules\"\n│  └─ PropositionPowerProposalValidationStrategy.sol - \"Strategy that validates with the PropositionPower module\"\n├─ utils\n│  ├─ ActiveProposalsLimiter.sol - \"Module to limit the number of active proposals per author\"\n│  ├─ BitPacker.sol - \"Uint256 Bit Setting and Checking Library\"\n│  ├─ PropositionPower.sol - \"Module that checks proposal authors exceed a threshold proposition power over a set of strategies\"\n│  ├─ SXHash.sol - \"Snapshot X Types Hashing Library\"\n│  ├─ SXUtils.sol - \"Snapshot X Types Utilities Library\"\n│  ├─ SignatureVerifier.sol - \"Verifies EIP712 Signatures for Snapshot X actions\"\n│  └─ SpaceManager.sol - \"Manages a whitelist of Spaces that have permissions to execute transactions\"\n├─ ProxyFactory.sol - \"Handles the deployment and tracking of Space contracts\"\n└─ Space.sol - \"The base contract for each Snapshot X space\"\n└─ types.sol - \"Definitions for Snapshot X custom types\"\n```\n\n## Usage\n\n### Build\n\nBuild the contracts:\n\n```sh\n$ forge build\n```\n\n### Test\n\nRun the tests:\n\n```sh\n$ forge test\n```\n\n### Coverage\n\nGet a test coverage report:\n\n```sh\n$ forge coverage --ir-minimum\n```\n\n### Deployment\n\nTo deploy the protocol to an EVM chain, first set the following environment variables:\n\n```sh\n# The address of the account that the protocol will be deployed from.\nDEPLOYER_ADDRESS=\n# The name of the chain you want to deploy on. The addresses of the deployed contracts will be stored at /deployments/network.json\nNETWORK=\n# An RPC URL for the chain.\nRPC_URL=\n# An API key for a block explorer on the chain (Optional).\nETHERSCAN_API_KEY=\n```\n\nFollowing this, a [Foundry Script](https://book.getfoundry.sh/tutorials/solidity-scripting) can be run to deploy the\nentire protocol. Example usage to deploy from a Ledger Hardware Wallet and verify on a block explorer:\n\n```sh\nforge script script/Deployer.s.sol:Deployer --rpc-url $RPC_URL --optimize --broadcast --verify -vvvv --ledger --sender $DEPLOYER_ADDRESS --hd-paths \"m/44'/60'/4'/0/0\"\n```\n\nThe script uses the [Singleton Factory](https://eips.ethereum.org/EIPS/eip-2470) for the deployments which ensures that\nthe addresses of the contracts are the same on all chains (so long as the chain is fully EVM equivalent).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapshot-labs%2Fsx-evm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnapshot-labs%2Fsx-evm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapshot-labs%2Fsx-evm/lists"}