WrappedSonic

Sonic ERC-20 Token Browse chains

0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38

Solidity v0.8.28+commit.7893614a

Fungible token following the ERC-20 standard.

🤖
Query this contract from your AI
Reference: 0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38
Sample prompt: "Tell me the current state of sonic/0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38"
No AI wired up yet? → mcp.smarts.md · Browse chains
Sonic is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
6
Write Functions
7
Events
4

Read Functions

allowance(owner: address, spender: address) view

Returns the remaining number of tokens that spender is allowed to transfer from owner.✨ AI

dev: See {IERC20-allowance}.

Parameters

Name Type Description
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

Returns

Name Type Description
uint256 Remaining allowance as a uint256 in the token's smallest unit that spender may transfer from owner.✨ AI
balanceOf(account: address) view

Returns the WrappedSonic token balance for the specified account.✨ AI

dev: See {IERC20-balanceOf}.

Parameters

Name Type Description
account address Address whose WrappedSonic token balance will be returned.✨ AI

Returns

Name Type Description
uint256 The account's token balance as a uint256 value.✨ AI
decimals() view

Returns the token's number of decimal places.✨ AI

dev: 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}.

Returns

Name Type Description
uint8 The number of decimals used for token balances (uint8), e.g. 18 for typical ERC-20 tokens.✨ AI
name() view

Returns the token's name used by wallets and user interfaces.✨ AI

dev: Returns the name of the token.

Returns

Name Type Description
string The token name string shown to wallets and interfaces.✨ AI
symbol() view

Returns this token's symbol string used by wallets and user interfaces.✨ AI

dev: Returns the symbol of the token, usually a shorter version of the name.

Returns

Name Type Description
string The token symbol string (e.g., "WSONIC") that represents the asset's short identifier.✨ AI
totalSupply() view

Return the total number of WrappedSonic tokens in circulation.✨ AI

dev: See {IERC20-totalSupply}.

Returns

Name Type Description
uint256 Total token supply as a uint256 representing all existing WrappedSonic tokens.✨ AI

Write Functions

approve(spender: address, value: uint256) nonpayable

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

dev: 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.

Parameters

Name Type Description
spender address Address allowed to spend tokens on behalf of the caller.✨ AI
value uint256 Maximum number of tokens the spender is allowed to transfer.✨ AI

Returns

Name Type Description
bool True if the approval was successful.✨ AI
deposit() payable

Deposit Ether to mint an equal amount of WrappedSonic tokens to your account.✨ AI

dev: Allow to deposit native tokens and mint the corresponding number of wrapped tokens to self account.
depositFor(account: address) payable

Deposit native tokens and mint WrappedSonic tokens credited to the specified account.✨ AI

dev: Allow a user to deposit native tokens and mint the corresponding number of wrapped tokens.

Parameters

Name Type Description
account address The address to receive the minted wrapped tokens.

Returns

Name Type Description
bool True if the deposit and mint operation succeeded.✨ AI
transfer(to: address, value: uint256) nonpayable

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

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

Parameters

Name Type Description
to address Recipient address that will receive the tokens.✨ AI
value uint256 Amount of tokens to transfer, expressed in the token's smallest unit.✨ AI

Returns

Name Type Description
bool True if the transfer succeeds.✨ AI
transferFrom(from: address, to: address, value: uint256) nonpayable

Transfers tokens from one address to another using an approved allowance and returns true on success.✨ AI

dev: 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`.

Parameters

Name Type Description
from address Address to transfer tokens from.✨ AI
to address Recipient address.✨ AI
value uint256 Amount of tokens to transfer, specified in the token's smallest units.✨ AI

Returns

Name Type Description
bool True if the transfer succeeded.✨ AI
withdraw(value: uint256) nonpayable

Burns the caller's wrapped SONIC tokens and transfers the corresponding underlying SONIC tokens to the caller.✨ AI

dev: Allow withdraw by burning own wrapped tokens, the corresponding amount of native tokens are released.

Parameters

Name Type Description
value uint256 Amount to be withdrawn.
withdrawTo(account: address, value: uint256) nonpayable

Burn wrapped tokens and transfer the underlying Sonic to the specified account.✨ AI

dev: Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of native tokens.

Parameters

Name Type Description
account address The recipient of the native tokens.
value uint256 The amount of wrapped tokens to be burned.

Returns

Name Type Description
bool True if the burn and transfer succeeded.✨ AI

Events

Approval(owner: address, spender: address, value: uint256)
Name Type Indexed Description
owner address
spender address
value uint256
Deposit(account: address, value: uint256)
Name Type Indexed Description
account address Account address which receive the minted ERC20 token.
value uint256 The amount of ERC20 tokens deposited.
Transfer(from: address, to: address, value: uint256)
Name Type Indexed Description
from address
to address
value uint256
Withdrawal(account: address, value: uint256)
Name Type Indexed Description
account address Account address which receive the withdrawn native token.
value uint256 The amount of native tokens withdrawn.