TokenGovernor

Ethereum 瀏覽鏈

0xee9b1a09aedaced9dcda74964ea447feb93861c2

Solidity v0.8.24+commit.e11b9ed9

🤖
透過你的 AI 查詢此合約
參考: 0xee9b1a09aedaced9dcda74964ea447feb93861c2
範例提示詞: "Tell me the current state of eth/0xee9b1a09aedaced9dcda74964ea447feb93861c2"
還沒有接入 AI?→ mcp.smarts.md · 瀏覽鏈

管理與風險

誰能修改規則?

Block #25,291,940

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

Mintable Pausable Freezable Ownable Role Based

當前控制

Owner
0x0d190b74308669e8f4fe7dbce3466169b285289d ↗ Etherscan → smarts

概覽

讀取函式
35
寫入函式
26
事件
22

讀取函式

Block #25,291,940 · just now
BRIDGE_MINTER_OR_BURNER_ROLE() view → 0xac950b4e2512fad4244af0109db80898a61d13325e9e992206b6f9cf76056ff9

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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

開發者: Returns the address of the current `DEFAULT_ADMIN_ROLE` holder.

回傳值

名稱 類型 描述
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

開發者: 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}.

回傳值

名稱 類型 描述
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

開發者: 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).

回傳值

名稱 類型 描述
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

開發者: Get all admins (holders of DEFAULT_ADMIN_ROLE)

回傳值

名稱 類型 描述
address[] Array of admin addresses
getBridgeMintersOrBurners() view → [0xf9e47d3720d5142930444ae6773c7f6d05696228, 0x36a72ed0096b414521c45e3ddc9ed657d1d9c141]

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

開發者: Get all addresses with BRIDGE_MINTER_ROLE

回傳值

名稱 類型 描述
address[] Array of bridge minter addresses
getBurners() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c, 0x87e0017503560a655309c470666645472c66246e]

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

開發者: Get all addresses with BURNER_ROLE

回傳值

名稱 類型 描述
address[] Array of burner addresses
getChecker() view → 0x0000000000000000000000000000000000000000

Return the address of the configured checker contract.✨ AI

開發者: Get the address of the checker contract

回傳值

名稱 類型 描述
address Address of the checker contract
getCheckerAdmins() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d]

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

開發者: Get all addresses with CHECKER_ADMIN_ROLE

回傳值

名稱 類型 描述
address[] Array of checker admin addresses
getFreezers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x6802744c90ffb2045de9790527b446d663f1ee66]

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

開發者: Get all addresses with FREEZER_ROLE

回傳值

名稱 類型 描述
address[] Array of freezer addresses
getMinters() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c, 0x87e0017503560a655309c470666645472c66246e]

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

開發者: Get all addresses with MINTER_ROLE

回傳值

名稱 類型 描述
address[] Array of minter addresses
getPausers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c]

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

開發者: Get all addresses with PAUSER_ROLE

回傳值

名稱 類型 描述
address[] Array of pauser addresses
getRecoveryManagers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d]

Get the list of recovery manager addresses.✨ AI

開發者: Get all addresses with RECOVERY_ROLE

回傳值

名稱 類型 描述
address[] Array of recovery manager addresses
getRoleAdmin(role: bytes32) view

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

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

參數

名稱 類型 描述
role bytes32 Role identifier to query (bytes32).✨ AI

回傳值

名稱 類型 描述
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

開發者: 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.

參數

名稱 類型 描述
role bytes32 Role identifier as a bytes32 hash.✨ AI
index uint256 Zero-based index of the member in the role's member set.✨ AI

回傳值

名稱 類型 描述
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

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

參數

名稱 類型 描述
role bytes32 Role identifier (bytes32) to query.✨ AI

回傳值

名稱 類型 描述
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

開發者: 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.

參數

名稱 類型 描述
role bytes32 Role identifier (bytes32) to query membership for.✨ AI

回傳值

名稱 類型 描述
address[] Array of addresses currently assigned to the role.✨ AI
getToken() view → 0x8d0d000ee44948fc98c9b98a4fa4921476f08b0d

Returns the governance token contract address.✨ AI

回傳值

名稱 類型 描述
address The address of the ERC20 token used for governance.✨ AI
getTokenBalance() view → 0

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

開發者: Check the current balance of the governed token held by this contract

回傳值

名稱 類型 描述
uint256 Balance of the token
getUnfreezers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x6802744c90ffb2045de9790527b446d663f1ee66]

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

開發者: Get all addresses with UNFREEZER_ROLE

回傳值

名稱 類型 描述
address[] Array of unfreezer addresses
getUnpausers() view → [0x0d190b74308669e8f4fe7dbce3466169b285289d, 0x0f33afb00334ea05f6f0e64fc919920ecd4bd16c]

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

開發者: Get all addresses with UNPAUSER_ROLE

回傳值

名稱 類型 描述
address[] Array of unpauser addresses
hasRole(role: bytes32, account: address) view
開發者: Returns `true` if `account` has been granted `role`.

參數

名稱 類型 描述
role bytes32
account address

回傳值

名稱 類型 描述
bool
owner() view → 0x0d190b74308669e8f4fe7dbce3466169b285289d
開發者: See {IERC5313-owner}.

回傳值

名稱 類型 描述
address
pendingDefaultAdmin() view → 0x0000000000000000000000000000000000000000, 0
開發者: 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.

回傳值

名稱 類型 描述
newAdmin address
schedule uint48
pendingDefaultAdminDelay() view → 0, 0
開發者: 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.

回傳值

名稱 類型 描述
newDelay uint48
schedule uint48
supportsInterface(interfaceId: bytes4) view
開發者: See {IERC165-supportsInterface}.

參數

名稱 類型 描述
interfaceId bytes4

回傳值

名稱 類型 描述
bool

寫入函式

acceptDefaultAdminTransfer() nonpayable
開發者: 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
開發者: Complete transfer of ownership (requires DEFAULT_ADMIN_ROLE)
batchDrainFrozenAccounts(accounts: address[]) nonpayable
開發者: Drains the tokens from a list of frozen accounts (requires DEFAULT_ADMIN_ROLE)

參數

名稱 類型 描述
accounts address[] List of addresses to drain tokens from
batchFreeze(accounts: address[]) nonpayable
開發者: Add a list of addresses to frozen state (requires FREEZER_ROLE)

參數

名稱 類型 描述
accounts address[] List of addresses to freeze
batchUnfreeze(accounts: address[]) nonpayable
開發者: Remove a list of addresses from frozen state (requires UNFREEZER_ROLE)

參數

名稱 類型 描述
accounts address[] List of addresses to unfreeze
beginDefaultAdminTransfer(newAdmin: address) nonpayable
開發者: 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.

參數

名稱 類型 描述
newAdmin address
burn(amount: uint256) nonpayable
開發者: Burn tokens from the caller (requires BURNER_ROLE). The sender must have approved this contract to spend the tokens

參數

名稱 類型 描述
amount uint256 Amount of tokens to burn

回傳值

名稱 類型 描述
bool True if successful
burnFrom(from: address, amount: uint256) nonpayable
開發者: Burn tokens from a specific address (requires BURNER_ROLE)

參數

名稱 類型 描述
from address Address to burn tokens from. Must have an approval set on this contract
amount uint256 Amount of tokens to burn

回傳值

名稱 類型 描述
bool True if successful
cancelDefaultAdminTransfer() nonpayable
開發者: 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
開發者: 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.

參數

名稱 類型 描述
newDelay uint48
drainFrozenAccount(account: address) nonpayable
開發者: Drains the tokens from a frozen account (requires DEFAULT_ADMIN_ROLE)

參數

名稱 類型 描述
account address Address to drain tokens from
executeTokenFunction(data: bytes) payable
開發者: 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.

參數

名稱 類型 描述
data bytes Function call data

回傳值

名稱 類型 描述
bytes returnData The data returned by the call
freeze(account: address) nonpayable
開發者: Add an address to frozen state (requires FREEZER_ROLE)

參數

名稱 類型 描述
account address Address to freeze
grantRole(role: bytes32, account: address) nonpayable
開發者: 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.

參數

名稱 類型 描述
role bytes32
account address
mint(recipient: address, amount: uint256) nonpayable
開發者: Mint new tokens and transfer them to the caller (requires MINTER_ROLE or BRIDGE_MINTER_ROLE)

參數

名稱 類型 描述
recipient address
amount uint256 Amount of tokens to mint

回傳值

名稱 類型 描述
bool True if successful
mint(amount: uint256) nonpayable
開發者: Mint new tokens and transfer them to the caller (requires MINTER_ROLE or BRIDGE_MINTER_ROLE)

參數

名稱 類型 描述
amount uint256 Amount of tokens to mint

回傳值

名稱 類型 描述
bool True if successful
pause() nonpayable
開發者: Pause all token transfers (requires PAUSER_ROLE)
recoverERC20(token: address, recipient: address, amount: uint256) nonpayable
開發者: Emergency recovery of tokens accidentally sent to this contract (requires RECOVERY_ROLE)

參數

名稱 類型 描述
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
開發者: Emergency recovery of tokens sent to the governed token contract (requires RECOVERY_ROLE)

參數

名稱 類型 描述
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
開發者: 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.

參數

名稱 類型 描述
role bytes32
account address
revokeRole(role: bytes32, account: address) nonpayable
開發者: 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.

參數

名稱 類型 描述
role bytes32
account address
rollbackDefaultAdminDelay() nonpayable
開發者: Cancels a scheduled {defaultAdminDelay} change. Requirements: - Only can be called by the current {defaultAdmin}. May emit a DefaultAdminDelayChangeCanceled event.
setChecker(newChecker: address) nonpayable
開發者: Set the checker contract address (requires CHECKER_ADMIN_ROLE)

參數

名稱 類型 描述
newChecker address The address of the new checker contract
transferOwnership(newOwner: address) nonpayable
開發者: Begin transfer of ownership (requires DEFAULT_ADMIN_ROLE)

參數

名稱 類型 描述
newOwner address Address of the new owner
unfreeze(account: address) nonpayable
開發者: Remove an address from frozen state (requires UNFREEZER_ROLE)

參數

名稱 類型 描述
account address Address to unfreeze
unpause() nonpayable
開發者: Unpause token transfers (requires UNPAUSER_ROLE)

事件

AccountFrozen(caller: address, account: address)
名稱 類型 已索引 描述
caller address
account address
AccountUnfrozen(caller: address, account: address)
名稱 類型 已索引 描述
caller address
account address
BridgeBurn(caller: address, from: address, amount: uint256)
名稱 類型 已索引 描述
caller address
from address
amount uint256
BridgeMint(caller: address, recipient: address, amount: uint256)
名稱 類型 已索引 描述
caller address
recipient address
amount uint256
CheckerUpdated(previousChecker: address, newChecker: address)
名稱 類型 已索引 描述
previousChecker address
newChecker address
ContractPaused(caller: address)
名稱 類型 已索引 描述
caller address
ContractUnpaused(caller: address)
名稱 類型 已索引 描述
caller address
DefaultAdminDelayChangeCanceled()
DefaultAdminDelayChangeScheduled(newDelay: uint48, effectSchedule: uint48)
名稱 類型 已索引 描述
newDelay uint48
effectSchedule uint48
DefaultAdminTransferCanceled()
DefaultAdminTransferScheduled(newAdmin: address, acceptSchedule: uint48)
名稱 類型 已索引 描述
newAdmin address
acceptSchedule uint48
FrozenAccountDrained(caller: address, account: address)
名稱 類型 已索引 描述
caller address
account address
GovernedTokensRecovered(caller: address, token: address, recipient: address, amount: uint256)
名稱 類型 已索引 描述
caller address
token address
recipient address
amount uint256
NativeBurn(caller: address, from: address, amount: uint256)
名稱 類型 已索引 描述
caller address
from address
amount uint256
NativeMint(caller: address, recipient: address, amount: uint256)
名稱 類型 已索引 描述
caller address
recipient address
amount uint256
OwnershipAccepted(caller: address)
名稱 類型 已索引 描述
caller address
OwnershipTransferred(caller: address, newOwner: address)
名稱 類型 已索引 描述
caller address
newOwner address
RoleAdminChanged(role: bytes32, previousAdminRole: bytes32, newAdminRole: bytes32)
名稱 類型 已索引 描述
role bytes32
previousAdminRole bytes32
newAdminRole bytes32
RoleGranted(role: bytes32, account: address, sender: address)
名稱 類型 已索引 描述
role bytes32
account address
sender address
RoleRevoked(role: bytes32, account: address, sender: address)
名稱 類型 已索引 描述
role bytes32
account address
sender address
TokenFunctionExecuted(caller: address, data: bytes, returnData: bytes)
名稱 類型 已索引 描述
caller address
data bytes
returnData bytes
TokensRecovered(caller: address, tokenAddress: address, recipient: address, amount: uint256)
名稱 類型 已索引 描述
caller address
tokenAddress address
recipient address
amount uint256