WETH

Unichain ERC-20 Token

0x4200000000000000000000000000000000000006

Solidity v0.8.15+commit.e14f2714

Fungible token following the ERC-20 standard.

🤖
Query this contract from your AI
Reference: 0x4200000000000000000000000000000000000006
Sample prompt: "Tell me the current state of unichain/0x4200000000000000000000000000000000000006"
No AI wired up yet? → mcp.smarts.md
Unichain 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
7
Write Functions
5
Events
4

Read Functions

allowance(address, address) view

Returns the amount of WETH that the spender can transfer on behalf of the owner.

Parameters

Name Type Description
address
address

Returns

Name Type Description
uint256 The amount of WETH that the spender can transfer on behalf of the owner.
balanceOf(address) view

Returns the balance of the given address.

Parameters

Name Type Description
address

Returns

Name Type Description
uint256 The balance of the given address.
decimals() view

Returns the number of decimals the token uses.

Returns

Name Type Description
uint8 The number of decimals the token uses.
name() view

Returns the name of the wrapped native asset. Will be "Wrapped Ether" if the native asset is Ether.

Returns

Name Type Description
name_ string
symbol() view

Returns the symbol of the wrapped native asset. Will be "WETH" if the native asset is Ether.

Returns

Name Type Description
symbol_ string
totalSupply() view

Returns the total supply of WETH.

Returns

Name Type Description
uint256 The total supply of WETH.
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.

Returns

Name Type Description
string Semver contract version as a string.

Write Functions

approve(guy: address, wad: uint256) nonpayable

Approves the given address to transfer the WETH on behalf of the caller.

Parameters

Name Type Description
guy address The address that is approved to transfer the WETH.
wad uint256 The amount that is approved to transfer.

Returns

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

Allows WETH to be deposited by sending ether to the contract.

transfer(dst: address, wad: uint256) nonpayable

Transfers the given amount of WETH to the given address.

Parameters

Name Type Description
dst address The address to transfer the WETH to.
wad uint256 The amount of WETH to transfer.

Returns

Name Type Description
bool True if the transfer was successful.
transferFrom(src: address, dst: address, wad: uint256) nonpayable

Transfers the given amount of WETH from the given address to the given address.

Parameters

Name Type Description
src address The address to transfer the WETH from.
dst address The address to transfer the WETH to.
wad uint256 The amount of WETH to transfer.

Returns

Name Type Description
bool True if the transfer was successful.
withdraw(wad: uint256) nonpayable

Withdraws an amount of ETH.

Parameters

Name Type Description
wad uint256 The amount of ETH to withdraw.

Events

Approval(src: address, guy: address, wad: uint256)

Emitted when an approval is made.

Name Type Indexed Description
src address The address that approved the transfer.
guy address The address that was approved to transfer.
wad uint256 The amount that was approved to transfer.
Deposit(dst: address, wad: uint256)

Emitted when a deposit is made.

Name Type Indexed Description
dst address The address that deposited the WETH.
wad uint256 The amount of WETH that was deposited.
Transfer(src: address, dst: address, wad: uint256)

Emitted when a transfer is made.

Name Type Indexed Description
src address The address that transferred the WETH.
dst address The address that received the WETH.
wad uint256 The amount of WETH that was transferred.
Withdrawal(src: address, wad: uint256)

Emitted when a withdrawal is made.

Name Type Indexed Description
src address The address that withdrew the WETH.
wad uint256 The amount of WETH that was withdrawn.