MintedERC20

Sonic ERC-20 Token

0x50c42deacd8fc9773493ed674b675be577f2634b

Proxy 實作合約: 0x9605cc161d148f665b6d4796131f8f6814abf386

Solidity v0.8.27+commit.40a35a09

Fungible token following the ERC-20 standard.

🤖
透過你的 AI 查詢此合約
參考: 0x50c42deacd8fc9773493ed674b675be577f2634b
範例提示詞: "Tell me the current state of sonic/0x50c42deacd8fc9773493ed674b675be577f2634b"
還沒有接入 AI?→ mcp.smarts.md
Sonic 在 Smarts 上是僅文件鏈:原始碼和 ABI 已索引,但目前不提供即時鏈上資料(狀態、最新事件、管理員概覽)。AI 代理仍可透過 MCP 呼叫 get_contract_info 和 get_contract_source。

概覽

讀取函式
12
寫入函式
13
事件
7

讀取函式

UPGRADE_INTERFACE_VERSION() view

Returns the contract's upgrade interface version string.✨ AI

回傳值

名稱 類型 描述
string The upgrade interface version identifier string.✨ AI
allowance(owner: address, spender: address) view

Returns the remaining number of tokens that owner has allowed spender to spend.✨ AI

開發者: See {IERC20-allowance}.

參數

名稱 類型 描述
owner address Address which granted the allowance.✨ AI
spender address Address approved to transfer tokens from the owner's balance.✨ AI

回傳值

名稱 類型 描述
uint256 Remaining allowance as a uint256; tokens spender may still 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 token balance of the specified account as a uint256 value.✨ AI
decimals() view

Returns 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`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. 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 Number of decimals (uint8) used to format token amounts for users.✨ AI
minter() view

Returns the address currently authorized to mint new tokens.✨ AI

回傳值

名稱 類型 描述
address The address with minting permission.✨ AI
name() view

Return the token's name as a human-readable string.✨ AI

開發者: Returns the name of the token.

回傳值

名稱 類型 描述
string The token name string (human-readable, e.g. "My Token").✨ AI
owner() view

Returns the contract owner's address.✨ AI

開發者: Returns the address of the current owner.

回傳值

名稱 類型 描述
address The address of the account that currently owns the contract and holds owner privileges.✨ AI
pendingOwner() view

Get the address that is designated to become the contract owner once they accept.✨ AI

開發者: Returns the address of the pending owner.

回傳值

名稱 類型 描述
address The pending owner's address, or the zero address if no ownership transfer is pending.✨ AI
proxiableUUID() view

Return the proxiable UUID used by UUPS-compatible proxies.✨ AI

開發者: Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.

回傳值

名稱 類型 描述
bytes32 The 32-byte UUID that identifies the storage slot used by the proxy for the implementation address.✨ AI
rescuer() view

Returns the address designated to perform rescue operations for this token contract.✨ AI

回傳值

名稱 類型 描述
address The address authorized to rescue or recover tokens and funds from this contract.✨ AI
symbol() view

Returns the token's short symbol.✨ AI

開發者: Returns the symbol of the token, usually a shorter version of the name.

回傳值

名稱 類型 描述
string The token's short symbol (e.g., "DAI", "USDC").✨ AI
totalSupply() view

Returns the total number of tokens in existence.✨ AI

開發者: See {IERC20-totalSupply}.

回傳值

名稱 類型 描述
uint256 Total token supply as a uint256.✨ AI

寫入函式

acceptOwnership() nonpayable

Claim and finalize ownership of the contract if you were previously nominated as the new owner.✨ AI

開發者: The new owner accepts the ownership transfer.
approve(spender: address, value: uint256) nonpayable

Approve spender to transfer up to value tokens from the caller's account.✨ AI

開發者: See {IERC20-approve}. NOTE: If `value` 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 allowed to spend tokens from the caller.✨ AI
value uint256 Maximum number of tokens the spender is permitted to transfer.✨ AI

回傳值

名稱 類型 描述
bool True if the allowance was successfully set, otherwise false.✨ AI
burn(value: uint256) nonpayable

Burns tokens from the caller's balance and decreases the total token supply.✨ AI

開發者: Destroys a `value` amount of tokens from the caller. See {ERC20-_burn}.

參數

名稱 類型 描述
value uint256 Amount of tokens to burn, specified in the token's smallest unit.✨ AI
burnFrom(account: address, value: uint256) nonpayable

Burns a specified amount of tokens from an account using the caller's allowance.✨ AI

開發者: Destroys a `value` amount of tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `value`.

參數

名稱 類型 描述
account address Address whose token balance will be decreased.✨ AI
value uint256 Number of tokens to burn (in the token's smallest unit).✨ AI
initialize(_owner: address, _minter: address, _tokenName: string, _tokenSymbol: string, _decimals: uint8) nonpayable

Initialize the token by setting owner, minter, name, symbol, and decimals.✨ AI

開發者: Initialize contract after the deployment.

參數

名稱 類型 描述
_owner address Address that will be set as contract owner.✨ AI
_minter address Address granted permission to mint tokens.✨ AI
_tokenName string ERC-20 token name.✨ AI
_tokenSymbol string ERC-20 token symbol.✨ AI
_decimals uint8 Number of decimals for token amounts.✨ AI
mint(account: address, amount: uint256) nonpayable

Create an amount of tokens and assigns them to the account. Callable by the token minter only.

參數

名稱 類型 描述
account address
amount uint256

回傳值

名稱 類型 描述
bool
renounceOwnership() nonpayable

Permanently renounce ownership of the contract, removing the owner and disabling owner-only functions.✨ AI

開發者: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
rescueERC20(token: address, to: address, amount: uint256) nonpayable

Rescue ERC20 tokens locked up in this contract.

參數

名稱 類型 描述
token address ERC20 token contract address
to address Recipient address
amount uint256 Amount to withdraw
transfer(to: address, value: uint256) nonpayable

Transfers value tokens from the caller's account to the specified recipient.✨ AI

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

參數

名稱 類型 描述
to address Recipient address that will receive the tokens.✨ AI
value uint256 Amount of tokens to transfer, in the token's smallest unit.✨ AI

回傳值

名稱 類型 描述
bool True if the transfer succeeded, false otherwise.✨ AI
transferFrom(from: address, to: address, value: uint256) nonpayable

Transfer tokens from the `from` address to `to` using the caller's allowance and update balances.✨ AI

開發者: See {IERC20-transferFrom}. Skips emitting an {Approval} event indicating an allowance update. This is not required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. 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 `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.

參數

名稱 類型 描述
from address Address that currently owns the tokens to be transferred.✨ AI
to address Address that will receive the transferred tokens.✨ AI
value uint256 Number of tokens to transfer, expressed in the token's smallest unit.✨ AI

回傳值

名稱 類型 描述
bool True if the transfer completed successfully.✨ AI
transferOwnership(newOwner: address) nonpayable

Transfers contract ownership to a new owner address.✨ AI

開發者: Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner. Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer.

參數

名稱 類型 描述
newOwner address Address that will become the contract owner.✨ AI
updateRescuer(newRescuer: address) nonpayable

Update the rescuer - the address allowed to recover ERC20 tokens locked up in this contract.

參數

名稱 類型 描述
newRescuer address The address of the new rescuer. Zero to disable the rescue functionality.
upgradeToAndCall(newImplementation: address, data: bytes) payable

Upgrade the token contract implementation and execute an initialization call in one transaction.✨ AI

開發者: Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

參數

名稱 類型 描述
newImplementation address Address of the new implementation contract to upgrade to.✨ AI
data bytes Encoded call data to be executed on the new implementation after upgrade.✨ AI

事件

Approval(owner: address, spender: address, value: uint256)
名稱 類型 已索引 描述
owner address
spender address
value uint256
Initialized(version: uint64)
名稱 類型 已索引 描述
version uint64
OwnershipTransferStarted(previousOwner: address, newOwner: address)
名稱 類型 已索引 描述
previousOwner address
newOwner address
OwnershipTransferred(previousOwner: address, newOwner: address)
名稱 類型 已索引 描述
previousOwner address
newOwner address
RescuerChanged(newRescuer: address)
名稱 類型 已索引 描述
newRescuer address
Transfer(from: address, to: address, value: uint256)
名稱 類型 已索引 描述
from address
to address
value uint256
Upgraded(implementation: address)
名稱 類型 已索引 描述
implementation address