TetherTokenV2

Sonic ERC-20 Token

0x6047828dc181963ba44974801ff68e538da5eaf9

Proxy 实现合约: 0xc80268ce098296e0e75d925d0d485e7bb4252fad

Solidity v0.8.4+commit.c7e474f2

Fungible token following the ERC-20 standard.

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

概览

读取函数
15
写入函数
22
事件
10

读取函数

CANCEL_AUTHORIZATION_TYPEHASH() view

Returns the EIP-712 type hash used for cancelAuthorization signatures.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 EIP-712 type hash constant for cancelAuthorization (used in signature encoding).✨ AI
DOMAIN_SEPARATOR() view

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

返回值

名称 类型 描述
bytes32 EIP-712 domain separator (bytes32) used to construct and verify typed-data signatures for this contract.✨ AI
RECEIVE_WITH_AUTHORIZATION_TYPEHASH() view

Provide the EIP-712 type hash used for receiveWithAuthorization authorizations.✨ AI

返回值

名称 类型 描述
bytes32 bytes32 EIP-712 type hash for the receiveWithAuthorization authorization struct✨ AI
TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view

Returns the EIP-712 type hash used to authorize off-chain transfer signatures.✨ AI

返回值

名称 类型 描述
bytes32 bytes32 EIP-712 typehash for the TransferWithAuthorization struct used to verify off-chain transfer signatures.✨ AI
allowance(owner: address, spender: address) view

Return the remaining number of tokens that spender is allowed to spend from owner's balance.✨ AI

开发者: See {IERC20-allowance}.

参数

名称 类型 描述
owner address Address of the token owner whose allowance is being queried.✨ AI
spender address Address authorized to spend tokens on behalf of the owner.✨ AI

返回值

名称 类型 描述
uint256 Remaining allowance as a uint256, denominated in the token's smallest unit.✨ 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

Return the token balance for the specified account.✨ AI

开发者: See {IERC20-balanceOf}.

参数

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

返回值

名称 类型 描述
uint256 Token balance of the specified account as a uint256.✨ AI
decimals() view

Returns the number of decimal places the token uses.✨ 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 Number of decimal places (uint8) the token uses for display and arithmetic.✨ AI
isBlocked(address) view

Checks whether the given address is blocked from sending or receiving tokens.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
bool True if the address is blocked from transfers, false otherwise.✨ AI
isTrusted(address) view

Return whether the given address is marked as trusted by the token.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
bool True if the address is marked trusted by the token contract, otherwise false.✨ AI
name() view

Returns the token's name.✨ AI

开发者: Returns the name of the token.

返回值

名称 类型 描述
string Human-readable token name (for example: Tether USD).✨ AI
nonces(owner: address) view

Return the current nonce for the given owner address.✨ AI

开发者: See {IERC20Permit-nonces}.

参数

名称 类型 描述
owner address Address whose nonce to query.✨ AI

返回值

名称 类型 描述
uint256 Current nonce (uint256) for the owner, used to prevent replay of signed messages.✨ AI
owner() view

Returns the contract owner's address.✨ AI

开发者: Returns the address of the current owner.

返回值

名称 类型 描述
address The address of the contract owner (the account with administrative/privileged rights).✨ AI
symbol() view

Returns the token's short symbol used by wallets and interfaces.✨ AI

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

返回值

名称 类型 描述
string The token's symbol string (for example "USDT").✨ AI
totalSupply() view

Returns the total supply of the token.✨ AI

开发者: See {IERC20-totalSupply}.

返回值

名称 类型 描述
uint256 Total number of smallest token units in existence (uint256).✨ AI

写入函数

addToBlockedList(_user: address) nonpayable

Adds an address to the blocked list, preventing it from transferring tokens.✨ AI

参数

名称 类型 描述
_user address Address to add to the blocked list; blocked addresses cannot transfer tokens.✨ AI
approve(spender: address, amount: uint256) nonpayable

Allow a spender to transfer up to amount of your tokens on your behalf.✨ AI

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

参数

名称 类型 描述
spender address Address authorized to spend tokens.✨ AI
amount uint256 Maximum token amount the spender is allowed to transfer.✨ AI

返回值

名称 类型 描述
bool True if the allowance was set successfully.✨ 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
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 authorized to spend tokens on behalf of the caller.✨ AI
subtractedValue uint256 Amount to subtract from the caller's current allowance (in token smallest units).✨ AI

返回值

名称 类型 描述
bool Boolean indicating whether the allowance was successfully decreased.✨ AI
destroyBlockedFunds(_blockedUser: address) nonpayable

Permanently burn the frozen token balance held by a blocked address.✨ AI

参数

名称 类型 描述
_blockedUser address Address whose frozen token balance will be permanently removed.✨ AI
increaseAllowance(spender: address, addedValue: uint256) nonpayable

Increases the caller's allowance for spender by addedValue and returns true on success.✨ 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 to add to the existing allowance, denominated in the token's smallest units.✨ AI

返回值

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

Initializes the token name, symbol, and decimals for the TetherTokenV2 contract.✨ AI

参数

名称 类型 描述
_name string Token name to set.✨ AI
_symbol string Token symbol to set.✨ AI
_decimals uint8 Number of decimals to use for the token.✨ AI
mint(_destination: address, _amount: uint256) nonpayable

Mint new tokens and credit them to the specified destination address.✨ AI

参数

名称 类型 描述
_destination address Destination address that will receive the minted tokens.✨ AI
_amount uint256 Amount of tokens to mint, expressed in the token's base units.✨ AI
multiTransfer(_recipients: address[], _values: uint256[]) nonpayable

Transfer specified token amounts to multiple recipient addresses in a single transaction.✨ AI

参数

名称 类型 描述
_recipients address[] Array of recipient addresses to receive tokens.✨ AI
_values uint256[] Array of token amounts to send, matched by index to _recipients.✨ AI
permit(owner_: address, spender: address, value: uint256, deadline: uint256, signature: bytes) nonpayable

Allows an owner to approve a spender using an off-chain signature before a deadline.✨ AI

开发者: See {IERC20Permit-permit}.

参数

名称 类型 描述
owner_ address Address of the token owner who signed the approval.✨ AI
spender address Address allowed to spend the owner's tokens.✨ AI
value uint256 Amount of tokens to approve (in smallest unit).✨ AI
deadline uint256 Unix timestamp after which the permit is invalid.✨ AI
signature bytes
permit(owner_: address, spender: address, value: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32) nonpayable

Allows an owner to approve a spender using an off-chain signature before a deadline.✨ AI

开发者: See {IERC20Permit-permit}.

参数

名称 类型 描述
owner_ address Address of the token owner who signed the approval.✨ AI
spender address Address allowed to spend the owner's tokens.✨ AI
value uint256 Amount of tokens to approve (in smallest unit).✨ AI
deadline uint256 Unix timestamp after which the permit is invalid.✨ AI
v uint8 Signature recovery id (part of the ECDSA signature).✨ AI
r bytes32 First 32 bytes of the ECDSA signature.✨ AI
s bytes32 Second 32 bytes of the 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

Redeem the specified amount of Tether tokens from the caller, reducing their balance and initiating withdrawal.✨ AI

参数

名称 类型 描述
_amount uint256 Amount of tokens to redeem, expressed in the token's smallest unit.✨ AI
removeFromBlockedList(_user: address) nonpayable

Remove an address from the contract's blocked list so the address can transfer tokens again.✨ AI

参数

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

Relinquish contract ownership, leaving the contract without an owner.✨ 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.
transfer(recipient: address, amount: uint256) nonpayable

Transfer tokens from the caller's account to the recipient.✨ AI

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

参数

名称 类型 描述
recipient address Address receiving the tokens.✨ AI
amount uint256 Number of tokens to transfer, expressed in the token's smallest unit.✨ AI

返回值

名称 类型 描述
bool True if the transfer succeeded, false otherwise.✨ AI
transferFrom(_sender: address, _recipient: address, _amount: uint256) nonpayable

Transfers _amount tokens from _sender to _recipient using the caller's allowance and returns true on success.✨ 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}. 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 Account whose tokens will be withdrawn.✨ AI
_recipient address Account that will receive the tokens.✨ AI
_amount uint256 Number of tokens to transfer.✨ AI

返回值

名称 类型 描述
bool True if the transfer succeeded.✨ AI
transferOwnership(newOwner: address) nonpayable

Transfers contract ownership to a new address.✨ AI

开发者: Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.

参数

名称 类型 描述
newOwner address Address to become the contract owner.✨ AI
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

事件

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
DestroyedBlockedFunds(_blockedUser: address, _balance: uint256)
名称 类型 已索引 描述
_blockedUser address
_balance uint256
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