OptimismMintableERC20

World Chain ERC-20 Token

0x2cfc85d8e48f8eab294be644d9e25c3030863003

Solidity v0.8.15+commit.e14f2714

Fungible token following the ERC-20 standard.

🤖
通过你的 AI 查询此合约
引用: 0x2cfc85d8e48f8eab294be644d9e25c3030863003
示例提示词: "Tell me the current state of world/0x2cfc85d8e48f8eab294be644d9e25c3030863003"
还没有接入 AI?→ mcp.smarts.md
World Chain 在 Smarts 上是仅文档链:源代码和 ABI 已索引,但当前不提供实时链上数据(状态、最新事件、管理员画像)。AI 代理仍可通过 MCP 调用 get_contract_info 和 get_contract_source。

概览

读取函数
14
写入函数
7
事件
4

读取函数

BRIDGE() view

Returns the address of the bridge contract that handles cross-chain minting and burning.✨ AI

返回值

名称 类型 描述
address Address of the bridge contract used for cross-chain minting and burning.✨ AI
REMOTE_TOKEN() view

Return the address of the remote token contract that this mintable ERC-20 represents.✨ AI

返回值

名称 类型 描述
address The address of the remote token contract on the other chain that this token maps to.✨ AI
allowance(owner: address, spender: address) view

Returns the remaining number of tokens that spender is allowed to spend on behalf of owner.✨ AI

开发者: See {IERC20-allowance}.

参数

名称 类型 描述
owner address Address which owns the tokens.✨ AI
spender address Address permitted to spend the owner's tokens.✨ AI

返回值

名称 类型 描述
uint256 Remaining allowance in token units that spender may transfer from owner.✨ AI
balanceOf(account: address) view

Returns the token balance of the given account.✨ AI

开发者: See {IERC20-balanceOf}.

参数

名称 类型 描述
account address Address whose token balance will be returned.✨ AI

返回值

名称 类型 描述
uint256 The number of tokens owned by the account as an unsigned integer.✨ AI
bridge() view

Legacy getter for BRIDGE.

返回值

名称 类型 描述
address
decimals() view

Return the number of decimal places used by the token.✨ AI

开发者: Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.

返回值

名称 类型 描述
uint8 The token's decimal precision as a uint8 value.✨ AI
l1Token() view

Legacy getter for the remote token. Use REMOTE_TOKEN going forward.

返回值

名称 类型 描述
address
l2Bridge() view

Legacy getter for the bridge. Use BRIDGE going forward.

返回值

名称 类型 描述
address
name() view

Returns the token's name.✨ AI

开发者: Returns the name of the token.

返回值

名称 类型 描述
string The token name as a string.✨ AI
remoteToken() view

Legacy getter for REMOTE_TOKEN.

返回值

名称 类型 描述
address
supportsInterface(_interfaceId: bytes4) pure

ERC165 interface check function.

参数

名称 类型 描述
_interfaceId bytes4 Interface ID to check.

返回值

名称 类型 描述
bool Whether or not the interface is supported by this contract.
symbol() view

Get the token's short ticker symbol.✨ AI

开发者: Returns the symbol of the token, usually a shorter version of the name.

返回值

名称 类型 描述
string The token's symbol as a string (ERC-20 short ticker).✨ AI
totalSupply() view

Returns the total number of tokens in existence.✨ AI

开发者: See {IERC20-totalSupply}.

返回值

名称 类型 描述
uint256 Total token supply as a uint256.✨ AI
version() view

Getter for the semantic version of the contract. This is not meant to be used onchain but instead meant to be used by offchain tooling.

返回值

名称 类型 描述
string Semver contract version as a string.

写入函数

approve(spender: address, amount: uint256) nonpayable

Approve a spender to transfer up to a specified amount of tokens from your account.✨ AI

开发者: See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.

参数

名称 类型 描述
spender address Address that will be approved to spend tokens.✨ AI
amount uint256 Amount of tokens the spender is allowed to transfer (in token smallest units).✨ AI

返回值

名称 类型 描述
bool True if the allowance was successfully set.✨ AI
burn(_from: address, _amount: uint256) nonpayable

Allows the StandardBridge on this network to burn tokens.

参数

名称 类型 描述
_from address Address to burn tokens from.
_amount uint256 Amount of tokens to burn.
decreaseAllowance(spender: address, subtractedValue: uint256) nonpayable

Decrease the caller's token allowance for a spender by subtractedValue.✨ AI

开发者: Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.

参数

名称 类型 描述
spender address The account whose allowance will be decreased.✨ AI
subtractedValue uint256 The amount to subtract from the spender's allowance.✨ AI

返回值

名称 类型 描述
bool True if the allowance was decreased successfully.✨ AI
increaseAllowance(spender: address, addedValue: uint256) nonpayable

Increase the caller's ERC-20 allowance for the spender by addedValue.✨ AI

开发者: Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.

参数

名称 类型 描述
spender address Address that will be allowed to spend the caller's tokens.✨ AI
addedValue uint256 Amount of tokens to add to the existing allowance.✨ AI

返回值

名称 类型 描述
bool True if the allowance was increased successfully.✨ AI
mint(_to: address, _amount: uint256) nonpayable

Allows the StandardBridge on this network to mint tokens.

参数

名称 类型 描述
_to address Address to mint tokens to.
_amount uint256 Amount of tokens to mint.
transfer(to: address, amount: uint256) nonpayable

Transfer tokens from the caller to the specified address.✨ AI

开发者: See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.

参数

名称 类型 描述
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.✨ AI
transferFrom(from: address, to: address, amount: uint256) nonpayable

Transfer tokens from one account to another using the caller's allowance.✨ AI

开发者: See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.

参数

名称 类型 描述
from address Address to transfer tokens from.✨ AI
to address Recipient address receiving the tokens.✨ AI
amount uint256 Amount of tokens to transfer (in token smallest units).✨ AI

返回值

名称 类型 描述
bool True if the transfer succeeded.✨ AI

事件

Approval(owner: address, spender: address, value: uint256)
名称 类型 已索引 描述
owner address
spender address
value uint256
Burn(account: address, amount: uint256)

Emitted whenever tokens are burned from an account.

名称 类型 已索引 描述
account address Address of the account tokens are being burned from.
amount uint256 Amount of tokens burned.
Mint(account: address, amount: uint256)

Emitted whenever tokens are minted for an account.

名称 类型 已索引 描述
account address Address of the account tokens are being minted for.
amount uint256 Amount of tokens minted.
Transfer(from: address, to: address, value: uint256)
名称 类型 已索引 描述
from address
to address
value uint256