TokenGovernor

Ethereum Browse chains

0xee9b1a09aedaced9dcda74964ea447feb93861c2

Solidity v0.8.24+commit.e11b9ed9

🤖
Query this contract from your AI
Reference: 0xee9b1a09aedaced9dcda74964ea447feb93861c2
Sample prompt: "Tell me the current state of eth/0xee9b1a09aedaced9dcda74964ea447feb93861c2"
No AI wired up yet? → mcp.smarts.md · Browse chains

Admin & Risk

Who can change the rules?

Block #25,290,549

Detected mintable, pausable, freezable, ownable, and role based controls from the verified ABI.

Mintable Pausable Freezable Ownable Role Based

Current controls

Owner
0x0d190b74308669e8f4fe7dbce3466169b285289d ↗ Etherscan → smarts

Overview

Read Functions
35
Write Functions
26
Events
22

Read Functions

Block #25,290,549 · just now
BRIDGE_MINTER_OR_BURNER_ROLE() view → 0xac950b4e2512fad4244af0109db80898a61d13325e9e992206b6f9cf76056ff9

Gets the role identifier that authorizes bridge minters or burners.✨ AI

Returns

Name Type Description
bytes32 bytes32 role identifier constant for accounts allowed to mint or burn via the bridge✨ AI
BURNER_ROLE() view → 0x3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848

Return the bytes32 role identifier for accounts allowed to burn tokens.✨ AI

Returns

Name Type Description
bytes32 The bytes32 constant role identifier (hash) for the BURNER role used in access control.✨ AI
CHECKER_ADMIN_ROLE() view → 0xb9f997e9b8b4ceb22077d832bcbf6f751de391a9ad51c4c81e58db4b9214f8e3

Returns the bytes32 role identifier used for checker admin permissions.✨ AI

Returns

Name Type Description
bytes32 The bytes32 role identifier for the CHECKER_ADMIN_ROLE, used with AccessControl checks.✨ AI
DEFAULT_ADMIN_ROLE() view → 0x0000000000000000000000000000000000000000000000000000000000000000

Return the role identifier used for the contract's default admin role.✨ AI

Returns

Name Type Description
bytes32 bytes32 identifier for the default admin role (grants admin privileges over role management).✨ AI
FREEZER_ROLE() view → 0x92de27771f92d6942691d73358b3a4673e4880de8356f8f2cf452be87e02d363

Returns the bytes32 identifier for the freezer role used to authorize freeze-related actions.✨ AI

Returns

Name Type Description
bytes32 The bytes32 role identifier that represents the freezer role for access control checks.✨ AI
MINTER_ROLE() view → 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6

Returns the role identifier used to grant minter permissions.✨ AI

Returns

Name Type Description
bytes32 The bytes32 role identifier for MINTER_ROLE used in access-control checks to grant minting rights.✨ AI
PAUSER_ROLE() view → 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a

Returns the bytes32 identifier used to grant and check the pauser role.✨ AI

Returns

Name Type Description
bytes32 The bytes32 role identifier for accounts permitted to pause contract actions.✨ AI
RECOVERY_ROLE() view → 0x0acf805600123ef007091da3b3ffb39474074c656c127aa68cb0ffec232a8ff8

Returns the bytes32 role identifier used for the contract's recovery role.✨ AI

Returns

Name Type Description
bytes32 bytes32 role identifier used to grant recovery or emergency permissions.✨ AI
UNFREEZER_ROLE() view → 0x3e02eaefb22229c9fa4ecb927d4a3b0bd2d30b1af650a970c5a95ba1f96906ea

Returns the UNFREEZER_ROLE identifier used to authorize callers who can unfreeze token accounts.✨ AI

Returns

Name Type Description
bytes32 The bytes32 role identifier for UNFREEZER_ROLE used in access control checks.✨ AI
UNPAUSER_ROLE() view → 0x427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a

Returns the bytes32 role identifier used to grant the unpauser permission.✨ AI

Returns

Name Type Description
bytes32 The bytes32 identifier corresponding to the UNPAUSER_ROLE for access control checks.✨ AI
defaultAdmin() view → 0x0d190b74308669e8f4fe7dbce3466169b285289d

Get the current default administrator address for the TokenGovernor.✨ AI

dev: Returns the address of the current `DEFAULT_ADMIN_ROLE` holder.

Returns

Name Type Description
address The address that has the default admin role for the governor.✨ AI
defaultAdminDelay() view → 259,200

Returns the configured default admin delay in seconds, the required wait before an admin action becomes executable.✨ AI

dev: Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started. This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set the acceptance schedule. NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this function returns the new delay. See {changeDefaultAdminDelay}.

Returns

Name Type Description
uint48 The default administrative delay (uint48) expressed in seconds, required before executing queued admin actions.✨ AI
defaultAdminDelayIncreaseWait() view → 432,000

Returns the waiting period required to increase the default admin delay.✨ AI

dev: Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay}) to take effect. Default to 5 days. When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds) that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can be overrode for a custom {defaultAdminDelay} increase scheduling. IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise, there's a risk of setting a high new delay that goes into effect almost immediately without the possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds).

Returns

Name Type Description
uint48 The waiting period in seconds as a uint48 before a change to the default admin delay takes effect.✨ AI
getAdmins() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d]

Get the list of admin addresses for this governor contract.✨ AI

dev: Get all admins (holders of DEFAULT_ADMIN_ROLE)

Returns

Name Type Description
address[] Array of admin addresses
getBridgeMintersOrBurners() view → [0xf9e47d3720d5142930444ae6773c7f6d05696228, 0x36a72ed0096b414521c45e3ddc9ed657d1d9c141]

Returns the list of addresses authorized as bridge minters or burners.✨ AI

dev: Get all addresses with BRIDGE_MINTER_ROLE

Returns

Name Type Description
address[] Array of bridge minter addresses
getBurners() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c, 0x87e0017503560a655309c470666645472c66246e]

Returns the list of addresses that are authorized to burn tokens.✨ AI

dev: Get all addresses with BURNER_ROLE

Returns

Name Type Description
address[] Array of burner addresses
getChecker() view → 0x0000000000000000000000000000000000000000

Return the address of the configured checker contract.✨ AI

dev: Get the address of the checker contract

Returns

Name Type Description
address Address of the checker contract
getCheckerAdmins() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d]

Retrieve the array of addresses assigned the checker admin role.✨ AI

dev: Get all addresses with CHECKER_ADMIN_ROLE

Returns

Name Type Description
address[] Array of checker admin addresses
getFreezers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x6802744c90ffb2045de9790527b446d663f1ee66]

Return the list of freezer addresses currently registered with the governor.✨ AI

dev: Get all addresses with FREEZER_ROLE

Returns

Name Type Description
address[] Array of freezer addresses
getMinters() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c, 0x87e0017503560a655309c470666645472c66246e]

Returns the list of addresses currently authorized to mint tokens.✨ AI

dev: Get all addresses with MINTER_ROLE

Returns

Name Type Description
address[] Array of minter addresses
getPausers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c]

Returns the list of addresses currently authorized to pause and unpause the contract.✨ AI

dev: Get all addresses with PAUSER_ROLE

Returns

Name Type Description
address[] Array of pauser addresses
getRecoveryManagers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d]

Get the list of recovery manager addresses.✨ AI

dev: Get all addresses with RECOVERY_ROLE

Returns

Name Type Description
address[] Array of recovery manager addresses
getRoleAdmin(role: bytes32) view

Returns the admin role that controls the given role.✨ AI

dev: Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

Name Type Description
role bytes32 Role identifier to query (bytes32).✨ AI

Returns

Name Type Description
bytes32 Admin role identifier (bytes32) that controls the provided role.✨ AI
getRoleMember(role: bytes32, index: uint256) view

Return the address at a specific index for a given role.✨ AI

dev: Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.

Parameters

Name Type Description
role bytes32 Role identifier as a bytes32 hash.✨ AI
index uint256 Zero-based index of the member in the role's member set.✨ AI

Returns

Name Type Description
address Address of the role member at the provided index.✨ AI
getRoleMemberCount(role: bytes32) view

Return the number of accounts that currently hold the specified role.✨ AI

dev: Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.

Parameters

Name Type Description
role bytes32 Role identifier (bytes32) to query.✨ AI

Returns

Name Type Description
uint256 Number of members assigned to the role as a uint256.✨ AI
getRoleMembers(role: bytes32) view

Return the list of addresses that hold the specified role.✨ AI

dev: Return all accounts that have `role` WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that this function has an unbounded cost, and using it as part of a state-changing function may render the function uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.

Parameters

Name Type Description
role bytes32 Role identifier (bytes32) to query membership for.✨ AI

Returns

Name Type Description
address[] Array of addresses currently assigned to the role.✨ AI
getToken() view → 0x8d0d000ee44948fc98c9b98a4fa4921476f08b0d

Returns the governance token contract address.✨ AI

Returns

Name Type Description
address The address of the ERC20 token used for governance.✨ AI
getTokenBalance() view → 0

Fetch the token balance held by this governor contract.✨ AI

dev: Check the current balance of the governed token held by this contract

Returns

Name Type Description
uint256 Balance of the token
getUnfreezers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x6802744c90ffb2045de9790527b446d663f1ee66]

Returns the list of addresses authorized to unfreeze accounts.✨ AI

dev: Get all addresses with UNFREEZER_ROLE

Returns

Name Type Description
address[] Array of unfreezer addresses
getUnpausers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c]

Returns the list of addresses authorized to unpause the token contract.✨ AI

dev: Get all addresses with UNPAUSER_ROLE

Returns

Name Type Description
address[] Array of unpauser addresses
hasRole(role: bytes32, account: address) view
dev: Returns `true` if `account` has been granted `role`.

Parameters

Name Type Description
role bytes32
account address

Returns

Name Type Description
bool
owner() view → 0x0d190b74308669e8f4fe7dbce3466169b285289d
dev: See {IERC5313-owner}.

Returns

Name Type Description
address
pendingDefaultAdmin() view → 0x0000000000000000000000000000000000000000, 0
dev: Returns a tuple of a `newAdmin` and an accept schedule. After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role by calling {acceptDefaultAdminTransfer}, completing the role transfer. A zero value only in `acceptSchedule` indicates no pending admin transfer. NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced.

Returns

Name Type Description
newAdmin address
schedule uint48
pendingDefaultAdminDelay() view → 0, 0
dev: Returns a tuple of `newDelay` and an effect schedule. After the `schedule` passes, the `newDelay` will get into effect immediately for every new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}. A zero value only in `effectSchedule` indicates no pending delay change. NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay} will be zero after the effect schedule.

Returns

Name Type Description
newDelay uint48
schedule uint48
supportsInterface(interfaceId: bytes4) view
dev: See {IERC165-supportsInterface}.

Parameters

Name Type Description
interfaceId bytes4

Returns

Name Type Description
bool

Write Functions

acceptDefaultAdminTransfer() nonpayable
dev: Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. After calling the function: - `DEFAULT_ADMIN_ROLE` should be granted to the caller. - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder. - {pendingDefaultAdmin} should be reset to zero values. Requirements: - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`. - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed.
acceptOwnership() nonpayable
dev: Complete transfer of ownership (requires DEFAULT_ADMIN_ROLE)
batchDrainFrozenAccounts(accounts: address[]) nonpayable
dev: Drains the tokens from a list of frozen accounts (requires DEFAULT_ADMIN_ROLE)

Parameters

Name Type Description
accounts address[] List of addresses to drain tokens from
batchFreeze(accounts: address[]) nonpayable
dev: Add a list of addresses to frozen state (requires FREEZER_ROLE)

Parameters

Name Type Description
accounts address[] List of addresses to freeze
batchUnfreeze(accounts: address[]) nonpayable
dev: Remove a list of addresses from frozen state (requires UNFREEZER_ROLE)

Parameters

Name Type Description
accounts address[] List of addresses to unfreeze
beginDefaultAdminTransfer(newAdmin: address) nonpayable
dev: Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance after the current timestamp plus a {defaultAdminDelay}. Requirements: - Only can be called by the current {defaultAdmin}. Emits a DefaultAdminRoleChangeStarted event.

Parameters

Name Type Description
newAdmin address
burn(amount: uint256) nonpayable
dev: Burn tokens from the caller (requires BURNER_ROLE). The sender must have approved this contract to spend the tokens

Parameters

Name Type Description
amount uint256 Amount of tokens to burn

Returns

Name Type Description
bool True if successful
burnFrom(from: address, amount: uint256) nonpayable
dev: Burn tokens from a specific address (requires BURNER_ROLE)

Parameters

Name Type Description
from address Address to burn tokens from. Must have an approval set on this contract
amount uint256 Amount of tokens to burn

Returns

Name Type Description
bool True if successful
cancelDefaultAdminTransfer() nonpayable
dev: Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function. Requirements: - Only can be called by the current {defaultAdmin}. May emit a DefaultAdminTransferCanceled event.
changeDefaultAdminDelay(newDelay: uint48) nonpayable
dev: Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting into effect after the current timestamp plus a {defaultAdminDelay}. This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay} set before calling. The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin} complete transfer (including acceptance). The schedule is designed for two scenarios: - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by {defaultAdminDelayIncreaseWait}. - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`. A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change. Requirements: - Only can be called by the current {defaultAdmin}. Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event.

Parameters

Name Type Description
newDelay uint48
drainFrozenAccount(account: address) nonpayable
dev: Drains the tokens from a frozen account (requires DEFAULT_ADMIN_ROLE)

Parameters

Name Type Description
account address Address to drain tokens from
executeTokenFunction(data: bytes) payable
dev: Execute a custom function call on the token (requires DEFAULT_ADMIN_ROLE) This allows for calling any function not explicitly defined in this contract. Any native token sent with the call will be forwarded to the token contract.

Parameters

Name Type Description
data bytes Function call data

Returns

Name Type Description
bytes returnData The data returned by the call
freeze(account: address) nonpayable
dev: Add an address to frozen state (requires FREEZER_ROLE)

Parameters

Name Type Description
account address Address to freeze
grantRole(role: bytes32, account: address) nonpayable
dev: Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.

Parameters

Name Type Description
role bytes32
account address
mint(recipient: address, amount: uint256) nonpayable
dev: Mint new tokens and transfer them to the caller (requires MINTER_ROLE or BRIDGE_MINTER_ROLE)

Parameters

Name Type Description
recipient address
amount uint256 Amount of tokens to mint

Returns

Name Type Description
bool True if successful
mint(amount: uint256) nonpayable
dev: Mint new tokens and transfer them to the caller (requires MINTER_ROLE or BRIDGE_MINTER_ROLE)

Parameters

Name Type Description
amount uint256 Amount of tokens to mint

Returns

Name Type Description
bool True if successful
pause() nonpayable
dev: Pause all token transfers (requires PAUSER_ROLE)
recoverERC20(token: address, recipient: address, amount: uint256) nonpayable
dev: Emergency recovery of tokens accidentally sent to this contract (requires RECOVERY_ROLE)

Parameters

Name Type Description
token address Address of token to recover
recipient address Address to receive the tokens
amount uint256 Amount to recover
recoverGovernedTokenERC20(token: address, recipient: address, amount: uint256) nonpayable
dev: Emergency recovery of tokens sent to the governed token contract (requires RECOVERY_ROLE)

Parameters

Name Type Description
token address Address of token to recover
recipient address Address to receive the tokens
amount uint256 Amount to recover
renounceRole(role: bytes32, account: address) nonpayable
dev: Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.

Parameters

Name Type Description
role bytes32
account address
revokeRole(role: bytes32, account: address) nonpayable
dev: Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.

Parameters

Name Type Description
role bytes32
account address
rollbackDefaultAdminDelay() nonpayable
dev: Cancels a scheduled {defaultAdminDelay} change. Requirements: - Only can be called by the current {defaultAdmin}. May emit a DefaultAdminDelayChangeCanceled event.
setChecker(newChecker: address) nonpayable
dev: Set the checker contract address (requires CHECKER_ADMIN_ROLE)

Parameters

Name Type Description
newChecker address The address of the new checker contract
transferOwnership(newOwner: address) nonpayable
dev: Begin transfer of ownership (requires DEFAULT_ADMIN_ROLE)

Parameters

Name Type Description
newOwner address Address of the new owner
unfreeze(account: address) nonpayable
dev: Remove an address from frozen state (requires UNFREEZER_ROLE)

Parameters

Name Type Description
account address Address to unfreeze
unpause() nonpayable
dev: Unpause token transfers (requires UNPAUSER_ROLE)

Events

AccountFrozen(caller: address, account: address)
Name Type Indexed Description
caller address
account address
AccountUnfrozen(caller: address, account: address)
Name Type Indexed Description
caller address
account address
BridgeBurn(caller: address, from: address, amount: uint256)
Name Type Indexed Description
caller address
from address
amount uint256
BridgeMint(caller: address, recipient: address, amount: uint256)
Name Type Indexed Description
caller address
recipient address
amount uint256
CheckerUpdated(previousChecker: address, newChecker: address)
Name Type Indexed Description
previousChecker address
newChecker address
ContractPaused(caller: address)
Name Type Indexed Description
caller address
ContractUnpaused(caller: address)
Name Type Indexed Description
caller address
DefaultAdminDelayChangeCanceled()
DefaultAdminDelayChangeScheduled(newDelay: uint48, effectSchedule: uint48)
Name Type Indexed Description
newDelay uint48
effectSchedule uint48
DefaultAdminTransferCanceled()
DefaultAdminTransferScheduled(newAdmin: address, acceptSchedule: uint48)
Name Type Indexed Description
newAdmin address
acceptSchedule uint48
FrozenAccountDrained(caller: address, account: address)
Name Type Indexed Description
caller address
account address
GovernedTokensRecovered(caller: address, token: address, recipient: address, amount: uint256)
Name Type Indexed Description
caller address
token address
recipient address
amount uint256
NativeBurn(caller: address, from: address, amount: uint256)
Name Type Indexed Description
caller address
from address
amount uint256
NativeMint(caller: address, recipient: address, amount: uint256)
Name Type Indexed Description
caller address
recipient address
amount uint256
OwnershipAccepted(caller: address)
Name Type Indexed Description
caller address
OwnershipTransferred(caller: address, newOwner: address)
Name Type Indexed Description
caller address
newOwner address
RoleAdminChanged(role: bytes32, previousAdminRole: bytes32, newAdminRole: bytes32)
Name Type Indexed Description
role bytes32
previousAdminRole bytes32
newAdminRole bytes32
RoleGranted(role: bytes32, account: address, sender: address)
Name Type Indexed Description
role bytes32
account address
sender address
RoleRevoked(role: bytes32, account: address, sender: address)
Name Type Indexed Description
role bytes32
account address
sender address
TokenFunctionExecuted(caller: address, data: bytes, returnData: bytes)
Name Type Indexed Description
caller address
data bytes
returnData bytes
TokensRecovered(caller: address, tokenAddress: address, recipient: address, amount: uint256)
Name Type Indexed Description
caller address
tokenAddress address
recipient address
amount uint256