WETH

Base ERC-20 Token

0x4200000000000000000000000000000000000006

Solidity v0.5.17+commit.d19bba13

Fungible token following the ERC-20 standard.

🤖
通过你的 AI 查询此合约
引用: 0x4200000000000000000000000000000000000006
示例提示词: "Tell me the current state of base/0x4200000000000000000000000000000000000006"
还没有接入 AI?→ mcp.smarts.md

管理与风险

谁能修改规则?

No admin risk controls detected from the verified ABI.

概览

读取函数
6
写入函数
5
事件
4

读取函数

Block #46,488,830 · 13s ago
allowance(address, address) view

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

参数

名称 类型 描述
address
address

返回值

名称 类型 描述
uint256 Remaining token allowance as an unsigned integer (uint256).✨ AI
balanceOf(address) view

Return the token balance for a specified address.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
uint256 The token balance of the given address as a uint256 in the token's smallest unit.✨ AI
decimals() view → 18

Returns the number of decimal places used by the token.✨ AI

返回值

名称 类型 描述
uint8 The token's decimals as an unsigned 8-bit integer (e.g., 18).✨ AI
name() view → Wrapped Ether

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

返回值

名称 类型 描述
string The token name string, e.g. "Wrapped Ether".✨ AI
symbol() view → WETH

Return the token's short symbol used to identify this token.✨ AI

返回值

名称 类型 描述
string The token symbol string (for example, "WETH").✨ AI
totalSupply() view → 279,491.70 WETH

Returns the total supply of WETH tokens.✨ AI

返回值

名称 类型 描述
uint256 Total number of WETH tokens in existence, expressed in the token's smallest unit (wei).✨ AI

写入函数

approve(guy: address, wad: uint256) nonpayable

Approve an address to spend up to a specified amount of tokens on your behalf.✨ AI

参数

名称 类型 描述
guy address Address that will be allowed to spend the caller's tokens.✨ AI
wad uint256 Amount of tokens allowed (in the token's smallest unit, e.g., wei).✨ AI

返回值

名称 类型 描述
bool True if the approval succeeded.✨ AI
deposit() payable

Deposit ETH and receive the same amount of WETH tokens credited to your account.✨ AI

transfer(dst: address, wad: uint256) nonpayable

Transfer wad tokens from the caller to dst and return true on success.✨ AI

参数

名称 类型 描述
dst address Recipient address to receive the tokens.✨ AI
wad uint256 Amount of tokens to transfer, in wei units.✨ AI

返回值

名称 类型 描述
bool True if the transfer succeeded.✨ AI
transferFrom(src: address, dst: address, wad: uint256) nonpayable

Transfer wad tokens from src to dst, using the caller's allowance when applicable.✨ AI

开发者: Reverts if src has insufficient balance. If caller != src, requires allowance >= wad; allowance is not reduced when equal to max uint256.✨ AI

参数

名称 类型 描述
src address Address to debit tokens from (source).✨ AI
dst address Address to credit tokens to (destination).✨ AI
wad uint256 Amount of tokens to transfer, in wei (smallest unit).✨ AI

返回值

名称 类型 描述
bool True on success.✨ AI
withdraw(wad: uint256) nonpayable

Withdraws specified WETH amount and sends equivalent ETH to the caller.✨ AI

参数

名称 类型 描述
wad uint256 Amount of WETH to convert to ETH, specified in wei.✨ AI

事件

Approval(src: address, guy: address, wad: uint256)
名称 类型 已索引 描述
src address
guy address
wad uint256
Deposit(dst: address, wad: uint256)
名称 类型 已索引 描述
dst address
wad uint256
Transfer(src: address, dst: address, wad: uint256)
名称 类型 已索引 描述
src address
dst address
wad uint256
Withdrawal(src: address, wad: uint256)
名称 类型 已索引 描述
src address
wad uint256