TetherTokenOFTExtension

Unichain ERC-20 Token

0x9151434b16b9763660705744891fa906f660ecc5

Proxy 實作合約: 0xaf37e8b6c9ed7f6318979f56fc287d76c30847ff

Solidity v0.8.4+commit.c7e474f2

Fungible token following the ERC-20 standard.

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

概覽

讀取函式
17
寫入函式
26
事件
15

讀取函式

CANCEL_AUTHORIZATION_TYPEHASH() view

Return the EIP-712 type hash used for cancelAuthorization messages.✨ AI

回傳值

名稱 類型 描述
bytes32 The bytes32 EIP-712 type hash for the cancelAuthorization struct (used to compute signed message digests).✨ AI
DOMAIN_SEPARATOR() view

Returns the EIP-712 domain separator used for signing typed data for this token.✨ AI

回傳值

名稱 類型 描述
bytes32 EIP-712 domain separator (bytes32) used in signature verification such as permit.✨ AI
RECEIVE_WITH_AUTHORIZATION_TYPEHASH() view

Get the EIP-712 type hash used to sign receiveWithAuthorization messages.✨ AI

回傳值

名稱 類型 描述
bytes32 bytes32 EIP-712 type hash constant for the receiveWithAuthorization struct used in authorization signatures.✨ AI
TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view

Returns the EIP-712 typehash used for transferWithAuthorization.✨ AI

回傳值

名稱 類型 描述
bytes32 bytes32 EIP-712 typehash for the transferWithAuthorization struct.✨ AI
allowance(owner: address, spender: address) view

Return 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 which will spend the tokens.✨ AI

回傳值

名稱 類型 描述
uint256 Remaining allowance in token base units (uint256) that spender may transfer from owner.✨ AI
authorizationState(authorizer: address, nonce: bytes32) view

Returns the state of an authorization

開發者: Nonces are randomly generated 32-byte data unique to the authorizer's address

參數

名稱 類型 描述
authorizer address Authorizer's address
nonce bytes32 Nonce of the authorization

回傳值

名稱 類型 描述
bool True if the nonce is used
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 account's token balance as a uint256 in the token's smallest indivisible units.✨ AI
decimals() view

Get 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 value {ERC20} uses, unless this function is 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 The token's decimals as an unsigned 8-bit integer.✨ AI
isBlocked(address) view

Checks if an address is blocked from token transfers.✨ AI

參數

名稱 類型 描述
address

回傳值

名稱 類型 描述
bool true if the address is blocked from transfers; false otherwise.✨ AI
isTrusted(address) view

Check whether a given address is marked as trusted by the token contract.✨ AI

參數

名稱 類型 描述
address

回傳值

名稱 類型 描述
bool True if the address is trusted by the contract, otherwise false.✨ AI
name() view

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

開發者: Returns the name of the token.

回傳值

名稱 類型 描述
string The token's name as a UTF-8 string.✨ AI
nonces(owner: address) view

Returns the current nonce used for an owner's signature-based approvals.✨ AI

開發者: See {IERC20Permit-nonces}.

參數

名稱 類型 描述
owner address Address of the token owner whose nonce is returned.✨ AI

回傳值

名稱 類型 描述
uint256 The current uint256 nonce for the owner, used to prevent signature replay and enforce ordering.✨ AI
oftContract() view

Get the OFT contract address linked to this TetherToken extension.✨ AI

回傳值

名稱 類型 描述
address The address of the OFT contract associated with this extension.✨ AI
owner() view

Returns the address of the contract owner.✨ AI

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

回傳值

名稱 類型 描述
address The owner account address with administrative privileges.✨ AI
supportsInterface(interfaceId: bytes4) pure

Report whether the contract implements the interface identified by interfaceId according to ERC-165.✨ AI

開發者: Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.

參數

名稱 類型 描述
interfaceId bytes4 ERC-165 interface identifier to query (4-byte value).✨ AI

回傳值

名稱 類型 描述
bool True if the contract implements the interface with the given interfaceId per ERC-165, otherwise false.✨ AI
symbol() view

Return the token symbol.✨ AI

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

回傳值

名稱 類型 描述
string The token symbol string (e.g., "USDT").✨ AI
totalSupply() view

Returns the total number of tokens in existence.✨ AI

開發者: See {IERC20-totalSupply}.

回傳值

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

寫入函式

addToBlockedList(_user: address) nonpayable

Add an address to the token's blocked list to prevent it from transferring tokens.✨ AI

參數

名稱 類型 描述
_user address Address to add to the blocked list.✨ AI
approve(spender: address, amount: uint256) nonpayable

Authorize spender to transfer up to amount tokens from caller's account.✨ AI

開發者: See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.

參數

名稱 類型 描述
spender address Address granted permission to spend tokens on caller's behalf.✨ AI
amount uint256 Maximum number of tokens the spender is allowed to transfer.✨ AI

回傳值

名稱 類型 描述
bool True if the approval succeeded, otherwise false.✨ AI
cancelAuthorization(authorizer: address, nonce: bytes32, v: uint8, r: bytes32, s: bytes32) nonpayable

Attempt to cancel an authorization

參數

名稱 類型 描述
authorizer address Authorizer's address
nonce bytes32 Nonce of the authorization
v uint8 v of the signature
r bytes32 r of the signature
s bytes32 s of the signature
cancelAuthorization(authorizer: address, nonce: bytes32, signature: bytes) nonpayable

Attempt to cancel an authorization

參數

名稱 類型 描述
authorizer address Authorizer's address
nonce bytes32 Nonce of the authorization
signature bytes
crosschainBurn(_from: address, _amount: uint256) nonpayable

Burn tokens through a crosschain transfer.

參數

名稱 類型 描述
_from address Address to burn tokens from.
_amount uint256 Amount of tokens to burn.
crosschainMint(_destination: address, _amount: uint256) nonpayable

Mint tokens through a crosschain transfer.

參數

名稱 類型 描述
_destination address
_amount uint256 Amount of tokens to mint.
decreaseAllowance(spender: address, subtractedValue: uint256) nonpayable

Decrease the caller's allowance for a spender by a specified amount.✨ 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 Address allowed to spend the caller's tokens.✨ AI
subtractedValue uint256 Amount to subtract from the spender's current allowance.✨ AI

回傳值

名稱 類型 描述
bool True if the allowance was decreased successfully.✨ AI
destroyBlockedFunds(_blockedUser: address) nonpayable

Permanently destroys the token balance of a blocked address and reduces the total token supply.✨ AI

開發者: Caller must have the required authorization; this irreversibly burns the blocked account's tokens and updates totalSupply.✨ AI

參數

名稱 類型 描述
_blockedUser address Address whose blocked token balance will be permanently burned.✨ AI
increaseAllowance(spender: address, addedValue: uint256) nonpayable

Increase the caller's ERC20 allowance for a spender by a specified amount.✨ 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 allowed to spend the caller's tokens.✨ AI
addedValue uint256 Amount to add to the current allowance (in token smallest units).✨ AI

回傳值

名稱 類型 描述
bool True if the allowance was increased successfully.✨ AI
initialize(_name: string, _symbol: string, _decimals: uint8) nonpayable

Initialize the token with a name, symbol, and decimals.✨ AI

參數

名稱 類型 描述
_name string Token name to set.✨ AI
_symbol string Token symbol to set.✨ AI
_decimals uint8 Number of decimal places used by the token.✨ AI
mint(_destination: address, _amount: uint256) nonpayable

Mint tokens to the specified address, increasing the total supply and the recipient's balance.✨ AI

參數

名稱 類型 描述
_destination 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
multiTransfer(_recipients: address[], _values: uint256[]) nonpayable

Transfer tokens from the caller to multiple recipients in a single transaction.✨ AI

參數

名稱 類型 描述
_recipients address[] Array of recipient addresses to receive tokens.✨ AI
_values uint256[] Array of token amounts to send to each corresponding recipient.✨ AI
permit(owner_: address, spender: address, value: uint256, deadline: uint256, signature: bytes) nonpayable

Allow a spender to use the owner's signed permit to set an allowance before the deadline.✨ AI

開發者: See {IERC20Permit-permit}.

參數

名稱 類型 描述
owner_ address Address of the token owner who produced the off-chain signature.✨ AI
spender address Address approved to spend the owner's tokens.✨ AI
value uint256 Amount of tokens to approve for the spender.✨ AI
deadline uint256 Unix timestamp after which the provided signature is invalid.✨ AI
signature bytes
permit(owner_: address, spender: address, value: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32) nonpayable

Allow a spender to use the owner's signed permit to set an allowance before the deadline.✨ AI

開發者: See {IERC20Permit-permit}.

參數

名稱 類型 描述
owner_ address Address of the token owner who produced the off-chain signature.✨ AI
spender address Address approved to spend the owner's tokens.✨ AI
value uint256 Amount of tokens to approve for the spender.✨ AI
deadline uint256 Unix timestamp after which the provided 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
receiveWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, signature: bytes) nonpayable

Receive a transfer with a signed authorization from the payer

開發者: This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks.

參數

名稱 類型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
signature bytes
receiveWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, v: uint8, r: bytes32, s: bytes32) nonpayable

Receive a transfer with a signed authorization from the payer

開發者: This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks.

參數

名稱 類型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
v uint8 v of the signature
r bytes32 r of the signature
s bytes32 s of the signature
redeem(_amount: uint256) nonpayable

Redeems the specified amount of tokens from the caller, decreasing their balance and the total supply.✨ AI

參數

名稱 類型 描述
_amount uint256 Amount of tokens to redeem.✨ AI
removeFromBlockedList(_user: address) nonpayable

Remove an address from the token's blocked list.✨ AI

參數

名稱 類型 描述
_user address Address to remove from the blocked list.✨ AI
renounceOwnership() nonpayable

Renounce ownership, making the contract ownerless.✨ AI

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

Set the OFT contract address used by this token extension.✨ AI

參數

名稱 類型 描述
_oftContract address Address of the new OFT contract to be associated with this token.✨ AI
transfer(recipient: address, amount: uint256) nonpayable
開發者: See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.

參數

名稱 類型 描述
recipient address
amount uint256

回傳值

名稱 類型 描述
bool
transferFrom(_sender: address, _recipient: address, _amount: uint256) nonpayable
開發者: 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}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.

參數

名稱 類型 描述
_sender address
_recipient address
_amount uint256

回傳值

名稱 類型 描述
bool
transferOwnership(newOwner: address) nonpayable
開發者: Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.

參數

名稱 類型 描述
newOwner address
transferWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, signature: bytes) nonpayable

Execute a transfer with a signed authorization

參數

名稱 類型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
signature bytes
transferWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, v: uint8, r: bytes32, s: bytes32) nonpayable

Execute a transfer with a signed authorization

參數

名稱 類型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
v uint8 v of the signature
r bytes32 r of the signature
s bytes32 s of the signature
updateNameAndSymbol(_name: string, _symbol: string) nonpayable

參數

名稱 類型 描述
_name string
_symbol string

事件

Approval(owner: address, spender: address, value: uint256)
名稱 類型 已索引 描述
owner address
spender address
value uint256
AuthorizationCanceled(authorizer: address, nonce: bytes32)
名稱 類型 已索引 描述
authorizer address
nonce bytes32
AuthorizationUsed(authorizer: address, nonce: bytes32)
名稱 類型 已索引 描述
authorizer address
nonce bytes32
BlockPlaced(_user: address)
名稱 類型 已索引 描述
_user address
BlockReleased(_user: address)
名稱 類型 已索引 描述
_user address
Burn(from: address, amount: uint256)
名稱 類型 已索引 描述
from address
amount uint256
CrosschainBurn(from: address, amount: uint256, sender: address)

Emitted when a crosschain transfer burns tokens.

名稱 類型 已索引 描述
from address Address of the account tokens are being burned from.
amount uint256 Amount of tokens burned.
sender address Address of the caller (msg.sender) who invoked crosschainBurn.
CrosschainMint(to: address, amount: uint256, sender: address)

Emitted when a crosschain transfer mints tokens.

名稱 類型 已索引 描述
to address Address of the account tokens are being minted for.
amount uint256 Amount of tokens minted.
sender address Address of the caller (msg.sender) who invoked crosschainMint.
DestroyedBlockedFunds(_blockedUser: address, _balance: uint256)
名稱 類型 已索引 描述
_blockedUser address
_balance uint256
LogSetOFTContract(oftContract: address)
名稱 類型 已索引 描述
oftContract address
LogUpdateNameAndSymbol(name: string, symbol: string)
名稱 類型 已索引 描述
name string
symbol string
Mint(_destination: address, _amount: uint256)
名稱 類型 已索引 描述
_destination address
_amount uint256
OwnershipTransferred(previousOwner: address, newOwner: address)
名稱 類型 已索引 描述
previousOwner address
newOwner address
Redeem(_amount: uint256)
名稱 類型 已索引 描述
_amount uint256
Transfer(from: address, to: address, value: uint256)
名稱 類型 已索引 描述
from address
to address
value uint256