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