OP
Optimism ERC-20 Token0x4200000000000000000000000000000000000042
Solidity v0.8.12+commit.f00d7308
Fungible token following the ERC-20 standard.
管理与风险
谁能修改规则?
Detected mintable and ownable controls from the verified ABI.
当前控制
- Owner
- 0x5c4e7ba1e219e47948e6e3f55019a647ba501005 ↗ Etherscan → smarts
近期治理
1342 privileged events loaded. 最新: DelegateVotesChanged at block #152,087,911.
概览
读取函数
Block #152,088,272 · 16s agoReturns the EIP-712 domain separator used for signing typed data with this token.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes32 | The EIP-712 domain separator as a bytes32 value used for typed-data signatures.✨ AI |
Returns the remaining number of tokens that spender is allowed to spend on behalf of owner.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Address of the token owner.✨ AI |
| spender | address | Address authorized to spend the owner's tokens.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Remaining allowance as a uint256 representing how many tokens the spender may transfer from owner.✨ AI |
Returns the token balance of the specified account.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address whose token balance will be returned.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The account's token balance as a uint256, expressed in the token's smallest unit.✨ AI |
Retrieve the historical checkpoint for an account at a given index.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Account whose checkpoint to fetch.✨ AI |
| pos | uint32 | Index of the checkpoint to return (0-based).✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | tuple | Block number when the checkpoint was created.✨ AI |
Return the token's number of decimal places used for display and calculations.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint8 | The token's decimals as a uint8 representing how many decimal places to display.✨ AI |
Returns the address to which the specified account has delegated its voting power.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The account whose delegate address is being queried.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The delegate address that receives the account's voting power, or the zero address if none.✨ AI |
Get the total token supply as of the given past block.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| blockNumber | uint256 | Block number to query the total supply at; must be less than the current block.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Total token supply at the specified block.✨ AI |
Return the number of votes held by account at the end of blockNumber.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address to query past voting power for.✨ AI |
| blockNumber | uint256 | Block number to read the historical vote balance at.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The vote count (uint256) that account had at the end of the given blockNumber.✨ AI |
Returns the current voting power for the specified account.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address whose voting balance is returned.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The account's current voting power as a uint256.✨ AI |
Returns the token's name as a human-readable string.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | The token name (e.g., "GovernanceToken"), used for display and identification.✨ AI |
Returns the current permit nonce for owner, used to authorize permit signatures.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Address to query the permit nonce for.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The current uint256 nonce for the address; increments to prevent replay of permit signatures.✨ AI |
Get the number of checkpoints recorded for an account's voting history.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address whose checkpoint count to query.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint32 | The number of checkpoints (uint32) stored for the account, representing historical voting snapshots.✨ AI |
Returns the address of the current contract owner.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address of the contract owner.✨ AI |
Returns the token's symbol as a short, human-readable identifier.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | The token's symbol, a short human-readable string identifier (e.g., 'GOV').✨ AI |
Returns the total number of GovernanceToken tokens in existence.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The total token supply as a uint256 (includes all tokens minted minus tokens burned).✨ AI |
写入函数
Approve a spender to transfer up to amount of your tokens on your behalf.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| spender | address | Address allowed to transfer tokens.✨ AI |
| amount | uint256 | Maximum number of tokens the spender may transfer.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the allowance was set successfully.✨ AI |
Permanently destroys a specified amount of tokens from the caller's balance, reducing total supply.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| amount | uint256 | The number of tokens to burn, specified in the token's smallest unit.✨ AI |
Burn tokens from an account using the caller's allowance.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address whose tokens will be burned.✨ AI |
| amount | uint256 | Amount of tokens to burn (in the token's smallest unit).✨ AI |
Decrease the allowance an approved spender can use by a specified amount.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| spender | address | The account whose allowance will be decreased.✨ AI |
| subtractedValue | uint256 | The amount to subtract from the current allowance.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the allowance was decreased successfully.✨ AI |
Delegate this account's voting power to the specified address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| delegatee | address | Address that will receive this account's voting power.✨ AI |
Delegate your voting power to a delegatee using an off-chain signature.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| delegatee | address | Address receiving delegated voting power.✨ AI |
| nonce | uint256 | Signer’s current nonce to prevent replay.✨ AI |
| expiry | uint256 | Timestamp after which the signature becomes invalid.✨ AI |
| v | uint8 | Signature recovery byte.✨ AI |
| r | bytes32 | First 32 bytes of the signature.✨ AI |
| s | bytes32 | Second 32 bytes of the signature.✨ AI |
Increase the allowance the caller has granted to spender by addedValue.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| spender | address | Address that will be permitted to spend the caller's tokens.✨ AI |
| addedValue | uint256 | Number of tokens to add to the spender's existing allowance.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the allowance was successfully increased.✨ AI |
Mints new tokens to a specified account, increasing the total supply and that account's balance.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _account | address | Address that will receive the newly minted tokens.✨ AI |
| _amount | uint256 | Amount of tokens to mint, expressed in the token's smallest unit.✨ AI |
Permit a spender to transfer the owner's tokens using an off-chain signature, setting allowance without a separate approval tx.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Token holder whose signature authorizes the allowance.✨ AI |
| spender | address | Account approved to spend the owner's tokens.✨ AI |
| value | uint256 | Amount of tokens the spender is allowed to transfer.✨ AI |
| deadline | uint256 | Unix timestamp after which the signature is invalid.✨ AI |
| v | uint8 | Recovery byte of the owner's ECDSA signature.✨ AI |
| r | bytes32 | First 32 bytes of the owner's ECDSA signature.✨ AI |
| s | bytes32 | Second 32 bytes of the owner's ECDSA signature.✨ AI |
Permanently renounces ownership of the contract, leaving no owner and disabling owner-only actions.✨ AI
Transfer tokens from the caller to the specified recipient address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| to | address | Recipient address to receive the tokens.✨ AI |
| amount | uint256 | Amount of tokens to transfer, expressed in the token's smallest unit.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the transfer succeeded, otherwise false.✨ AI |
Transfers tokens from one address to another using the caller's allowance.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| from | address | Address to debit tokens from (must have approved the caller).✨ AI |
| to | address | Address to credit tokens to.✨ AI |
| amount | uint256 | Amount of tokens to transfer, in the token's smallest unit.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | true if the transfer succeeded.✨ AI |
Transfer ownership of the contract to a new owner address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| newOwner | address | Address that will become the new owner of the contract.✨ AI |
事件
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| owner | address | ✓ | |
| spender | address | ✓ | |
| value | uint256 |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| delegator | address | ✓ | |
| fromDelegate | address | ✓ | |
| toDelegate | address | ✓ |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| delegate | address | ✓ | |
| previousBalance | uint256 | ||
| newBalance | uint256 |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| from | address | ✓ | |
| to | address | ✓ | |
| value | uint256 |