L2BaseToken

Abstract

0x000000000000000000000000000000000000800a

Solidity v0.8.20+commit.a1b79de6

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

概覽

讀取函式
5
寫入函式
4
事件
4

讀取函式

balanceOf(_account: uint256) view

Returns ETH balance of an account

開發者: It takes `uint256` as an argument to be able to properly simulate the behaviour of the Ethereum's `BALANCE` opcode that accepts uint256 as an argument and truncates any upper bits

參數

名稱 類型 描述
_account uint256 The address of the account to return the balance of.

回傳值

名稱 類型 描述
uint256
decimals() pure

Returns the number of decimals used by the token.✨ AI

開發者: This method has not been stabilized and might be removed later on.

回傳值

名稱 類型 描述
uint8 The token's decimals (number of decimal places) as a uint8.✨ AI
name() pure

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

開發者: This method has not been stabilized and might be removed later on.

回傳值

名稱 類型 描述
string The token name as a string.✨ AI
symbol() pure

Returns the token's symbol.✨ AI

開發者: This method has not been stabilized and might be removed later on.

回傳值

名稱 類型 描述
string The token symbol string.✨ AI
totalSupply() view

Returns the total number of tokens in circulation.✨ AI

開發者: Returns the amount of tokens in existence.

回傳值

名稱 類型 描述
uint256 Total supply of tokens as a uint256, expressed in the token's smallest indivisible unit.✨ AI

寫入函式

mint(_account: address, _amount: uint256) nonpayable

Increase the total supply of tokens and balance of the receiver.

開發者: This method is only callable by the bootloader.

參數

名稱 類型 描述
_account address The address which to mint the funds to.
_amount uint256 The amount of ETH in wei to be minted.
transferFromTo(_from: address, _to: address, _amount: uint256) nonpayable

Transfer tokens from one address to another.

開發者: This function also emits "Transfer" event, which might be removed later on.

參數

名稱 類型 描述
_from address The address to transfer the ETH from.
_to address The address to transfer the ETH to.
_amount uint256 The amount of ETH in wei being transferred.
withdraw(_l1Receiver: address) payable

Initiate the withdrawal of the base token, funds will be available to claim on L1 `finalizeEthWithdrawal` method.

參數

名稱 類型 描述
_l1Receiver address The address on L1 to receive the funds.
withdrawWithMessage(_l1Receiver: address, _additionalData: bytes) payable

Initiate the withdrawal of the base token, with the sent message. The funds will be available to claim on L1 `finalizeEthWithdrawal` method.

參數

名稱 類型 描述
_l1Receiver address The address on L1 to receive the funds.
_additionalData bytes Additional data to be sent to L1 with the withdrawal.

事件

Mint(account: address, amount: uint256)
名稱 類型 已索引 描述
account address
amount uint256
Transfer(from: address, to: address, value: uint256)
名稱 類型 已索引 描述
from address
to address
value uint256
Withdrawal(_l2Sender: address, _l1Receiver: address, _amount: uint256)
名稱 類型 已索引 描述
_l2Sender address
_l1Receiver address
_amount uint256
WithdrawalWithMessage(_l2Sender: address, _l1Receiver: address, _amount: uint256, _additionalData: bytes)
名稱 類型 已索引 描述
_l2Sender address
_l1Receiver address
_amount uint256
_additionalData bytes