NonceHolder
Abstract0x0000000000000000000000000000000000008003
Solidity v0.8.20+commit.a1b79de6
概览
读取函数
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. |
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. |
Returns the raw version of the current minimal nonce
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _address | address | The account to return the raw nonce for |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The raw nonce for this account. |
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. |
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. |
Checks and reverts based on whether the nonce is used (not used).
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _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. |
写入函数
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. |
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. |
A convenience method to increment the minimal nonce if it is equal to the `_expectedNonce`.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _expectedNonce | uint256 | The expected minimal nonce for the account. |
Sets the nonce value `key` for the msg.sender as used.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _key | uint256 | The nonce key under which the value will be set. |
| _value | uint256 | The value to store under the _key. |
事件
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| accountAddress | address | ✓ | |
| key | uint256 | ✓ | |
| value | uint256 |