NonceHolder

Abstract

0x0000000000000000000000000000000000008003

Solidity v0.8.20+commit.a1b79de6

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

概覽

讀取函式
6
寫入函式
4
事件
1

讀取函式

getDeploymentNonce(_address: address) view

Returns the deployment nonce for the accounts used for CREATE opcode.

參數

名稱 類型 描述
_address address The address to return the deploy nonce of.

回傳值

名稱 類型 描述
deploymentNonce uint256 deploymentNonce The deployment nonce of the account.
getMinNonce(_address: address) view

Returns the current minimal nonce for account.

參數

名稱 類型 描述
_address address The account to return the minimal nonce for

回傳值

名稱 類型 描述
uint256 The current minimal nonce for this account.
getRawNonce(_address: address) view

Returns the raw version of the current minimal nonce

開發者: It is equal to minNonce + 2^128 * deployment nonce.

參數

名稱 類型 描述
_address address The account to return the raw nonce for

回傳值

名稱 類型 描述
uint256 The raw nonce for this account.
getValueUnderNonce(_key: uint256) view

Gets the value stored under a custom nonce for msg.sender.

參數

名稱 類型 描述
_key uint256 The key under which to get the stored value.

回傳值

名稱 類型 描述
uint256 The value stored under the `_key` for the msg.sender.
isNonceUsed(_address: address, _nonce: uint256) view

A method that checks whether the nonce has been used before.

參數

名稱 類型 描述
_address address The address the nonce of which is being checked.
_nonce uint256 The nonce value which is checked.

回傳值

名稱 類型 描述
bool `true` if the nonce has been used, `false` otherwise.
validateNonceUsage(_address: address, _key: uint256, _shouldBeUsed: bool) view

Checks and reverts based on whether the nonce is used (not used).

開發者: This method should be used by the bootloader.

參數

名稱 類型 描述
_address address The address the nonce of which is being checked.
_key uint256 The nonce value which is tested.
_shouldBeUsed bool The flag for the method. If `true`, the method checks that whether this nonce is marked as used and reverts if this is not the case. If `false`, this method will check that the nonce has *not* been used yet, and revert otherwise.

寫入函式

increaseMinNonce(_value: uint256) nonpayable

Increases the minimal nonce for the msg.sender and returns the previous one.

參數

名稱 類型 描述
_value uint256 The number by which to increase the minimal nonce for msg.sender.

回傳值

名稱 類型 描述
oldMinNonce uint256 oldMinNonce The value of the minimal nonce for msg.sender before the increase.
incrementDeploymentNonce(_address: address) nonpayable

Increments the deployment nonce for the account and returns the previous one.

參數

名稱 類型 描述
_address address The address of the account which to return the deploy nonce for.

回傳值

名稱 類型 描述
prevDeploymentNonce uint256 prevDeploymentNonce The deployment nonce at the time this function is called.
incrementMinNonceIfEquals(_expectedNonce: uint256) nonpayable

A convenience method to increment the minimal nonce if it is equal to the `_expectedNonce`.

參數

名稱 類型 描述
_expectedNonce uint256 The expected minimal nonce for the account.
setValueUnderNonce(_key: uint256, _value: uint256) nonpayable

Sets the nonce value `key` for the msg.sender as used.

開發者: The value must be non-zero.

參數

名稱 類型 描述
_key uint256 The nonce key under which the value will be set.
_value uint256 The value to store under the _key.

事件

ValueSetUnderNonce(accountAddress: address, key: uint256, value: uint256)
名稱 類型 已索引 描述
accountAddress address
key uint256
value uint256