Verified contractExactMIT
CommunityGovernance
Address0x039f39846c6f9911993809c7488ef4502208ce4b
- Balance
0 ETH
- Transactions
10
- Compiler
solc 0.8.17
- Same code
Only this contract
Details
- Compiler
- solc 0.8.17+commit.8df45f5f
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- london
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 19,785,314
- Creation transaction
- 0x7a232dbefd…5953aeb5c8
Read31
- CYCLE_LENGTH() → (uint256)
- DELAY_LENGTH() → (uint256)
- EXECUTION_EXTRA_LENGTH() → (uint256)
- PROPOSAL_LENGTH() → (uint256)
- VOTING_LENGTH() → (uint256)
- currentStageEnd() → (uint256)
- cycleCount() → (uint256)
- cycleStart() → (uint256)
- ecoToken() → (address)
- ecoXStaking() → (address)
- ecoXToken() → (address)
- feeRefund() → (uint256)
- getSupport(address,address) → (uint256)
- getVotes(address) → (uint256,uint256,uint256)
- paused() → (bool)
- pauser() → (address)
- policy() → (address)
- pot() → (uint256)
- proposalFee() → (uint256)
- proposals(address) → (uint256,address,uint256,uint256)
- selectedProposal() → (address)
- snapshotBlock() → (uint256)
- stage() → (uint8)
- supportThresholdPercent() → (uint256)
- thresholdPercentDivisor() → (uint256)
- totalAbstainVotes() → (uint256)
- totalEnactVotes() → (uint256)
- totalRejectVotes() → (uint256)
- totalVotingPower() → (uint256)
- voteThresholdPercent() → (uint256)
- votingPower(address) → (uint256)
Write13
- execute()
- pause()
- propose(address)
- refund(address)
- setPauser(address)
- setSupportThresholdPercent(uint256)
- support(address)
- supportPartial(address[],uint256[])
- sweep(address)
- unsupport(address)
- updateStage()
- vote(uint8)
- votePartial(uint256,uint256,uint256)
Events12
- ExecutionComplete(address)
- FeeRefunded(address,address,uint256)
- NewCycle(uint256)
- Paused(address)
- PauserAssignment(address)
- ProposalRegistration(address,address)
- StageUpdated(uint8)
- SupportChanged(address,address,uint256,uint256)
- SupportThresholdPercentChanged(uint256)
- Sweep(address)
- Unpaused(address)
- VotesChanged(address,uint256,uint256,uint256)
Errors16
- ArrayLengthMismatch()
- BadCycleStart()
- BadSupportThresholdPercent()
- BadVoteType()
- BadVotingPower()
- DuplicateProposal()
- NoAtomicActionsWithSnapshot()
- NoRefundAvailable(address)
- NoRefundDuringCycle(address)
- NoSupportToRevoke()
- NonZeroContractAddr(string)
- NonZeroPolicyAddr()
- OldProposalSupport()
- OnlyPauser()
- PolicyOnlyFunction()
- WrongStage()
ABI as JSON
[
{
"type": "constructor",
"inputs": [
{
"name": "policy",
"type": "address",
"internalType": "contract Policy"
},
{
"name": "_eco",
"type": "address",
"internalType": "contract ECO"
},
{
"name": "_ecox",
"type": "address",
"internalType": "contract ECOx"
},
{
"name": "_ecoXStaking",
"type": "address",
"internalType": "contract ECOxStaking"
},
{
"name": "_cycleStart",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_pauser",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"name": "ArrayLengthMismatch",
"type": "error",
"inputs": []
},
{
"name": "BadCycleStart",
"type": "error",
"inputs": []
},
{
"name": "BadSupportThresholdPercent",
"type": "error",
"inputs": []
},
{
"name": "BadVoteType",
"type": "error",
"inputs": []
},
{
"name": "BadVotingPower",
"type": "error",
"inputs": []
},
{
"name": "DuplicateProposal",
"type": "error",
"inputs": []
},
{
"name": "NoAtomicActionsWithSnapshot",
"type": "error",
"inputs": []
},
{
"name": "NoRefundAvailable",
"type": "error",
"inputs": [
{
"name": "proposal",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "NoRefundDuringCycle",
"type": "error",
"inputs": [
{
"name": "proposal",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "NoSupportToRevoke",
"type": "error",
"inputs": []
},
{
"name": "NonZeroContractAddr",
"type": "error",
"inputs": [
{
"name": "contractName",
"type": "string",
"internalType": "string"
}
]
},
{
"name": "NonZeroPolicyAddr",
"type": "error",
"inputs": []
},
{
"name": "OldProposalSupport",
"type": "error",
"inputs": []
},
{
"name": "OnlyPauser",
"type": "error",
"inputs": []
},
{
"name": "PolicyOnlyFunction",
"type": "error",
"inputs": []
},
{
"name": "WrongStage",
"type": "error",
"inputs": []
},
{
"name": "ExecutionComplete",
"type": "event",
"inputs": [
{
"name": "proposal",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "FeeRefunded",
"type": "event",
"inputs": [
{
"name": "proposal",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "proposer",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "refund",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "NewCycle",
"type": "event",
"inputs": [
{
"name": "cycleNumber",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "Paused",
"type": "event",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "PauserAssignment",
"type": "event",
"inputs": [
{
"name": "pauser",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "ProposalRegistration",
"type": "event",
"inputs": [
{
"name": "proposer",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "proposal",
"type": "address",
"indexed": false,
"internalType": "contract Proposal"
}
],
"anonymous": false
},
{
"name": "StageUpdated",
"type": "event",
"inputs": [
{
"name": "stage",
"type": "uint8",
"indexed": false,
"internalType": "enum CommunityGovernance.Stage"
}
],
"anonymous": false
},
{
"name": "SupportChanged",
"type": "event",
"inputs": [
{
"name": "supporter",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "proposal",
"type": "address",
"indexed": true,
"internalType": "contract Proposal"
},
{
"name": "oldSupport",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "newSupport",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "SupportThresholdPercentChanged",
"type": "event",
"inputs": [
{
"name": "supportThresholdPercent",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "Sweep",
"type": "event",
"inputs": [
{
"name": "recipient",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "Unpaused",
"type": "event",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "VotesChanged",
"type": "event",
"inputs": [
{
"name": "voter",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "enactVotes",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "rejectVotes",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "abstainVotes",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "CYCLE_LENGTH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "DELAY_LENGTH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "EXECUTION_EXTRA_LENGTH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "PROPOSAL_LENGTH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "VOTING_LENGTH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "currentStageEnd",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "cycleCount",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "cycleStart",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "ecoToken",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ECO"
}
],
"stateMutability": "view"
},
{
"name": "ecoXStaking",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ECOxStaking"
}
],
"stateMutability": "view"
},
{
"name": "ecoXToken",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ECOx"
}
],
"stateMutability": "view"
},
{
"name": "execute",
"type": "function",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "feeRefund",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getSupport",
"type": "function",
"inputs": [
{
"name": "supporter",
"type": "address",
"internalType": "address"
},
{
"name": "proposal",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "theSupport",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getVotes",
"type": "function",
"inputs": [
{
"name": "voter",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "enactVotes",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rejectVotes",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "abstainVotes",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "pause",
"type": "function",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "paused",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"name": "pauser",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "policy",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract Policy"
}
],
"stateMutability": "view"
},
{
"name": "pot",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "proposalFee",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "proposals",
"type": "function",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "cycle",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "proposer",
"type": "address",
"internalType": "address"
},
{
"name": "totalSupport",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "refund",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "propose",
"type": "function",
"inputs": [
{
"name": "_proposal",
"type": "address",
"internalType": "contract Proposal"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "refund",
"type": "function",
"inputs": [
{
"name": "proposal",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "selectedProposal",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "setPauser",
"type": "function",
"inputs": [
{
"name": "_pauser",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "setSupportThresholdPercent",
"type": "function",
"inputs": [
{
"name": "_supportThresholdPercent",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "snapshotBlock",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "stage",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint8",
"internalType": "enum CommunityGovernance.Stage"
}
],
"stateMutability": "view"
},
{
"name": "support",
"type": "function",
"inputs": [
{
"name": "_proposal",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "supportPartial",
"type": "function",
"inputs": [
{
"name": "_proposals",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "_allocations",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "supportThresholdPercent",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "sweep",
"type": "function",
"inputs": [
{
"name": "recipient",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "thresholdPercentDivisor",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "totalAbstainVotes",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "totalEnactVotes",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "totalRejectVotes",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "totalVotingPower",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "total",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "unsupport",
"type": "function",
"inputs": [
{
"name": "_proposal",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "updateStage",
"type": "function",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "vote",
"type": "function",
"inputs": [
{
"name": "choice",
"type": "uint8",
"internalType": "enum CommunityGovernance.Vote"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "votePartial",
"type": "function",
"inputs": [
{
"name": "enactVotes",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rejectVotes",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "abstainVotes",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "voteThresholdPercent",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "votingPower",
"type": "function",
"inputs": [
{
"name": "_who",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "total",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
}
]Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.