Contract Overview
Balance:
0 BTT
My Name Tag:
Not Available
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x22d0097d1981079a712829c5b931f2f92acca579 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
GovernorBravoDelegator
Compiler Version
v0.5.17+commit.d19bba13
Contract Source Code (Solidity)
/** *Submitted for verification at testnet.bttcscan.com on 2022-05-25 */ // File: contracts/Governance/GovernorBravoInterfaces.sol pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; contract GovernorBravoEvents { /// @notice An event emitted when a new proposal is created event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description); /// @notice An event emitted when a vote has been cast on a proposal /// @param voter The address which casted a vote /// @param proposalId The proposal id which was voted on /// @param support Support value for the vote. 0=against, 1=for, 2=abstain /// @param votes Number of votes which were cast by the voter /// @param reason The reason given for the vote by the voter event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason); /// @notice An event emitted when a proposal has been canceled event ProposalCanceled(uint id); /// @notice An event emitted when a proposal has been queued in the Timelock event ProposalQueued(uint id, uint eta); /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint id); /// @notice An event emitted when the voting delay is set event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay); /// @notice An event emitted when the voting period is set event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod); /// @notice Emitted when implementation is changed event NewImplementation(address oldImplementation, address newImplementation); /// @notice Emitted when proposal threshold is set event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold); /// @notice Emitted when pendingAdmin is changed event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); /// @notice Emitted when pendingAdmin is accepted, which means admin is updated event NewAdmin(address oldAdmin, address newAdmin); /// @notice Emitted when whitelist account expiration is set event WhitelistAccountExpirationSet(address account, uint expiration); /// @notice Emitted when the whitelistGuardian is set event WhitelistGuardianSet(address oldGuardian, address newGuardian); } contract GovernorBravoDelegatorStorage { /// @notice Administrator for this contract address public admin; /// @notice Pending administrator for this contract address public pendingAdmin; /// @notice Active brains of Governor address public implementation; } /** * @title Storage for Governor Bravo Delegate * @notice For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention * GovernorBravoDelegateStorageVX. */ contract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage { /// @notice The delay before voting on a proposal may take place, once proposed, in blocks uint public votingDelay; /// @notice The duration of voting on a proposal, in blocks uint public votingPeriod; /// @notice The number of votes required in order for a voter to become a proposer uint public proposalThreshold; /// @notice Initial proposal id set at become uint public initialProposalId; /// @notice The total number of proposals uint public proposalCount; /// @notice The address of the Aquarius Protocol Timelock TimelockInterface public timelock; /// @notice The address of the Aquarius governance token ArsInterface public ars; /// @notice The official record of all proposals ever proposed mapping (uint => Proposal) public proposals; /// @notice The latest proposal for each proposer mapping (address => uint) public latestProposalIds; struct Proposal { /// @notice Unique id for looking up a proposal uint id; /// @notice Creator of the proposal address proposer; /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds uint eta; /// @notice the ordered list of target addresses for calls to be made address[] targets; /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made uint[] values; /// @notice The ordered list of function signatures to be called string[] signatures; /// @notice The ordered list of calldata to be passed to each call bytes[] calldatas; /// @notice The block at which voting begins: holders must delegate their votes prior to this block uint startBlock; /// @notice The block at which voting ends: votes must be cast prior to this block uint endBlock; /// @notice Current number of votes in favor of this proposal uint forVotes; /// @notice Current number of votes in opposition to this proposal uint againstVotes; /// @notice Current number of votes for abstaining for this proposal uint abstainVotes; /// @notice Flag marking whether the proposal has been canceled bool canceled; /// @notice Flag marking whether the proposal has been executed bool executed; /// @notice Receipts of ballots for the entire set of voters mapping (address => Receipt) receipts; } /// @notice Ballot receipt record for a voter struct Receipt { /// @notice Whether or not a vote has been cast bool hasVoted; /// @notice Whether or not the voter supports the proposal or abstains uint8 support; /// @notice The number of votes the voter had, which were cast uint96 votes; } /// @notice Possible states that a proposal may be in enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } } contract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 { /// @notice Stores the expiration of account whitelist status as a timestamp mapping (address => uint) public whitelistAccountExpirations; /// @notice Address which manages whitelisted proposals and whitelist accounts address public whitelistGuardian; } interface TimelockInterface { function delay() external view returns (uint); function GRACE_PERIOD() external view returns (uint); function acceptAdmin() external; function queuedTransactions(bytes32 hash) external view returns (bool); function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32); function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external; function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory); } interface ArsInterface { function getPriorVotes(address account, uint blockNumber) external view returns (uint96); } interface GovernorAlpha { /// @notice The total number of proposals function proposalCount() external returns (uint); } // File: contracts/Governance/GovernorBravoDelegator.sol pragma solidity ^0.5.16; contract GovernorBravoDelegator is GovernorBravoDelegatorStorage, GovernorBravoEvents { constructor( address timelock_, address ars_, address admin_, address implementation_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) public { // Admin set to msg.sender for initialization admin = msg.sender; delegateTo(implementation_, abi.encodeWithSignature("initialize(address,address,uint256,uint256,uint256)", timelock_, ars_, votingPeriod_, votingDelay_, proposalThreshold_)); _setImplementation(implementation_); admin = admin_; } /** * @notice Called by the admin to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation */ function _setImplementation(address implementation_) public { require(msg.sender == admin, "GovernorBravoDelegator::_setImplementation: admin only"); require(implementation_ != address(0), "GovernorBravoDelegator::_setImplementation: invalid implementation address"); address oldImplementation = implementation; implementation = implementation_; emit NewImplementation(oldImplementation, implementation); } /** * @notice Internal method to delegate execution to another contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * @param callee The contract to delegatecall * @param data The raw data to delegatecall */ function delegateTo(address callee, bytes memory data) internal { (bool success, bytes memory returnData) = callee.delegatecall(data); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize) } } } /** * @dev Delegates execution to an implementation contract. * It returns to the external caller whatever the implementation returns * or forwards reverts. */ function () external payable { // delegate all other functions to current implementation (bool success, ) = implementation.delegatecall(msg.data); assembly { let free_mem_ptr := mload(0x40) returndatacopy(free_mem_ptr, 0, returndatasize) switch success case 0 { revert(free_mem_ptr, returndatasize) } default { return(free_mem_ptr, returndatasize) } } } }
[{"inputs":[{"internalType":"address","name":"timelock_","type":"address"},{"internalType":"address","name":"ars_","type":"address"},{"internalType":"address","name":"admin_","type":"address"},{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"uint256","name":"votingPeriod_","type":"uint256"},{"internalType":"uint256","name":"votingDelay_","type":"uint256"},{"internalType":"uint256","name":"proposalThreshold_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"NewPendingAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldProposalThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newProposalThreshold","type":"uint256"}],"name":"ProposalThresholdSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"support","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"votes","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"VoteCast","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVotingDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVotingDelay","type":"uint256"}],"name":"VotingDelaySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVotingPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVotingPeriod","type":"uint256"}],"name":"VotingPeriodSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"expiration","type":"uint256"}],"name":"WhitelistAccountExpirationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldGuardian","type":"address"},{"indexed":false,"internalType":"address","name":"newGuardian","type":"address"}],"name":"WhitelistGuardianSet","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[{"internalType":"address","name":"implementation_","type":"address"}],"name":"_setImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x60806040526004361061003f5760003560e01c806326782247146100ba5780635c60da1b146100e5578063bb913f41146100fa578063f851a4401461011c575b6002546040516000916001600160a01b03169061005f9083903690610347565b600060405180830381855af49150503d806000811461009a576040519150601f19603f3d011682016040523d82523d6000602084013e61009f565b606091505b505090506040513d6000823e8180156100b6573d82f35b3d82fd5b3480156100c657600080fd5b506100cf610131565b6040516100dc9190610354565b60405180910390f35b3480156100f157600080fd5b506100cf610140565b34801561010657600080fd5b5061011a610115366004610229565b61014f565b005b34801561012857600080fd5b506100cf610209565b6001546001600160a01b031681565b6002546001600160a01b031681565b6000546001600160a01b031633146101825760405162461bcd60e51b815260040161017990610394565b60405180910390fd5b6001600160a01b0381166101a85760405162461bcd60e51b815260040161017990610384565b600280546001600160a01b038381166001600160a01b031983161792839055604051918116927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a926101fd9285921690610362565b60405180910390a15050565b6000546001600160a01b031681565b8035610223816103cf565b92915050565b60006020828403121561023b57600080fd5b60006102478484610218565b949350505050565b610258816103b2565b82525050565b600061026a83856103a4565b93506102778385846103c3565b50500190565b600061028a604a836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c81527f656d656e746174696f6e3a20696e76616c696420696d706c656d656e746174696020820152696f6e206164647265737360b01b604082015260600192915050565b60006102fc6036836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c815275656d656e746174696f6e3a2061646d696e206f6e6c7960501b602082015260400192915050565b600061024782848661025e565b60208101610223828461024f565b60408101610370828561024f565b61037d602083018461024f565b9392505050565b602080825281016102238161027d565b60208082528101610223816102ef565b919050565b90815260200190565b60006001600160a01b038216610223565b82818337506000910152565b6103d8816103b2565b81146103e357600080fd5b5056fea365627a7a72315820e0ed36a54e1cafa8f3c1c82d1e0cd29452a712e80f2d539f152a3956772aeb926c6578706572696d656e74616cf564736f6c63430005110040
Deployed ByteCode Sourcemap
7670:2870:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10190:14;;:37;;10172:12;;-1:-1:-1;;;;;10190:14:0;;:37;;10172:12;;10218:8;;10190:37;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;10171:56:0;;;10292:4;10286:11;10345:14;10342:1;10328:12;10313:47;10385:7;10408:47;;;;10502:14;10488:12;10481:36;10408:47;10438:14;10424:12;10417:36;2577:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2577:27:0;;;:::i;:::-;;;;;;;;;;;;;;;;2656:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2656:29:0;;;:::i;8815:460::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8815:460:0;;;;;;;;:::i;:::-;;2491:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2491:20:0;;;:::i;2577:27::-;;;-1:-1:-1;;;;;2577:27:0;;:::o;2656:29::-;;;-1:-1:-1;;;;;2656:29:0;;:::o;8815:460::-;8908:5;;-1:-1:-1;;;;;8908:5:0;8894:10;:19;8886:86;;;;-1:-1:-1;;;8886:86:0;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8991:29:0;;8983:116;;;;-1:-1:-1;;;8983:116:0;;;;;;;;;9140:14;;;-1:-1:-1;;;;;9165:32:0;;;-1:-1:-1;;;;;;9165:32:0;;;;;;;9215:52;;9140:14;;;;9215:52;;;;9140:14;;9252;;9215:52;;;;;;;;;;8815:460;;:::o;2491:20::-;;;-1:-1:-1;;;;;2491:20:0;;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;;57:78;;;;;142:241;;246:2;234:9;225:7;221:23;217:32;214:2;;;262:1;259;252:12;214:2;297:1;314:53;359:7;339:9;314:53;;;304:63;208:175;-1:-1;;;;208:175;390:113;473:24;491:5;473:24;;;468:3;461:37;455:48;;;533:310;;665:88;746:6;741:3;665:88;;;658:95;;765:43;801:6;796:3;789:5;765:43;;;-1:-1;;821:16;;651:192;852:448;;1012:67;1076:2;1071:3;1012:67;;;1112:34;1092:55;;1181:34;1176:2;1167:12;;1160:56;-1:-1;;;1245:2;1236:12;;1229:34;1291:2;1282:12;;998:302;-1:-1;;998:302;1309:391;;1469:67;1533:2;1528:3;1469:67;;;1569:34;1549:55;;-1:-1;;;1633:2;1624:12;;1617:46;1691:2;1682:12;;1455:245;-1:-1;;1455:245;1708:282;;1862:103;1961:3;1952:6;1944;1862:103;;1997:213;2115:2;2100:18;;2129:71;2104:9;2173:6;2129:71;;2217:324;2363:2;2348:18;;2377:71;2352:9;2421:6;2377:71;;;2459:72;2527:2;2516:9;2512:18;2503:6;2459:72;;;2334:207;;;;;;2548:407;2739:2;2753:47;;;2724:18;;2814:131;2724:18;2814:131;;2962:407;3153:2;3167:47;;;3138:18;;3228:131;3138:18;3228:131;;3377:144;3512:3;3490:31;-1:-1;3490:31;3530:163;3633:19;;;3682:4;3673:14;;3626:67;3701:91;;-1:-1;;;;;3861:54;;3763:24;3844:76;3928:145;4009:6;4004:3;3999;3986:30;-1:-1;4065:1;4047:16;;4040:27;3979:94;4081:117;4150:24;4168:5;4150:24;;;4143:5;4140:35;4130:2;;4189:1;4186;4179:12;4130:2;4124:74;
Swarm Source
bzzr://e0ed36a54e1cafa8f3c1c82d1e0cd29452a712e80f2d539f152a3956772aeb92
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|