Contract detail
t2Governor
t2Governor is a verified Robinhood Chain smart contract at 0xc3edcedc…cd6d602a with 0 indexed transactions.
- Address type
- Smart contract
- Transactions
- 0
- History coverage
- No indexed activity found
- Emitted events
- 5
- Verification
- Verified
- Compiler
- v0.8.36+commit.8a079791
- Verification match
- full
- Creation transaction
- 0xcb2bb008…3dd48558
- Created at block
- #28456203
- Language
- solidity
- EVM version
- osaka
- License
- mit
- Compiler optimization
- Enabled · 1000 runs
Verified contract
Contract source code
// SPDX-License-Identifier: MIT
pragma solidity 0.8.36;
import "@openzeppelin/contracts/governance/Governor.sol";
import "@openzeppelin/contracts/governance/TimelockController.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
import "@openzeppelin/contracts/governance/utils/IVotes.sol";
contract t2Governor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {
error ZeroLaunchFingerprint();
bytes32 public immutable launchFingerprint;
constructor(
string memory governorName_,
IVotes token_,
TimelockController timelock_,
uint48 votingDelayBlocks_,
uint32 votingPeriodBlocks_,
uint256 proposalThreshold_,
uint256 quorumNumerator_,
bytes32 launchFingerprint_
)
Governor(governorName_)
GovernorSettings(votingDelayBlocks_, votingPeriodBlocks_, proposalThreshold_)
GovernorVotes(token_)
GovernorVotesQuorumFraction(quorumNumerator_)
GovernorTimelockControl(timelock_)
{
if (launchFingerprint_ == bytes32(0)) revert ZeroLaunchFingerprint();
if (_composeLaunchDigest(launchFingerprint_) == bytes32(0)) revert ZeroLaunchFingerprint();
launchFingerprint = launchFingerprint_;
}
function launchId() external view returns (bytes32) {
if (_composeLaunchDigest(launchFingerprint) == bytes32(0)) revert ZeroLaunchFingerprint();
return launchFingerprint;
}
function governanceConfiguration() external view returns (uint256, uint256, uint256, uint256) {
return (votingDelay(), votingPeriod(), proposalThreshold(), quorumNumerator());
}
function executorAddress() external view returns (address) {
return _executor();
}
function state(uint256 proposalId) public view override(Governor, GovernorTimelockControl) returns (ProposalState) {
return super.state(proposalId);
}
function proposalNeedsQueuing(uint256 proposalId) public view override(Governor, GovernorTimelockControl) returns (bool) {
return super.proposalNeedsQueuing(proposalId);
}
function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {
return super.proposalThreshold();
}
function _queueOperations(
uint256 proposalId,
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
bytes32 descriptionHash
) internal override(Governor, GovernorTimelockControl) returns (uint48) {
return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);
}
function _executeOperations(
uint256 proposalId,
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
bytes32 descriptionHash
) internal override(Governor, GovernorTimelockControl) {
super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);
}
function _cancel(
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
bytes32 descriptionHash
) internal override(Governor, GovernorTimelockControl) returns (uint256) {
return super._cancel(targets, values, calldatas, descriptionHash);
}
function _executor() internal view override(Governor, GovernorTimelockControl) returns (address) {
return super._executor();
}
function _foldShiftXorLow(bytes32 acc) private pure returns (bytes32) {
unchecked { return bytes32(uint256(acc) ^ (uint256(acc) << 31)); }
}
function _foldKeccakHalves(bytes32 acc) private pure returns (bytes32) {
return keccak256(abi.encodePacked(uint128(uint256(acc) >> 128), uint128(uint256(acc))));
}
function _foldRotateRight11(bytes32 acc) private pure returns (bytes32) {
unchecked { uint256 v = uint256(acc); return bytes32((v >> 11) | (v << 245)); }
}
function _foldKeccakTagged(bytes32 acc) private pure returns (bytes32) {
return keccak256(abi.encodePacked(acc, uint256(0x9e3779b97f4a7c15)));
}
function _composeLaunchDigest(bytes32 acc) private pure returns (bytes32) {
return _foldKeccakTagged(_foldRotateRight11(_foldKeccakHalves(_foldShiftXorLow(acc))));
}
}