NonceHolder

Abstract

0x0000000000000000000000000000000000008003

Solidity v0.8.20+commit.a1b79de6

🤖
Query this contract from your AI
Reference: 0x0000000000000000000000000000000000008003
Sample prompt: "Tell me the current state of abstract/0x0000000000000000000000000000000000008003"
No AI wired up yet? → mcp.smarts.md
Abstract is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
6
Write Functions
4
Events
1

Read Functions

getDeploymentNonce(_address: address) view

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

Parameters

Name Type Description
_address address The address to return the deploy nonce of.

Returns

Name Type Description
deploymentNonce uint256 deploymentNonce The deployment nonce of the account.
getMinNonce(_address: address) view

Returns the current minimal nonce for account.

Parameters

Name Type Description
_address address The account to return the minimal nonce for

Returns

Name Type Description
uint256 The current minimal nonce for this account.
getRawNonce(_address: address) view

Returns the raw version of the current minimal nonce

dev: It is equal to minNonce + 2^128 * deployment nonce.

Parameters

Name Type Description
_address address The account to return the raw nonce for

Returns

Name Type Description
uint256 The raw nonce for this account.
getValueUnderNonce(_key: uint256) view

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

Parameters

Name Type Description
_key uint256 The key under which to get the stored value.

Returns

Name Type Description
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.

Parameters

Name Type Description
_address address The address the nonce of which is being checked.
_nonce uint256 The nonce value which is checked.

Returns

Name Type Description
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).

dev: This method should be used by the bootloader.

Parameters

Name Type Description
_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.

Write Functions

increaseMinNonce(_value: uint256) nonpayable

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

Parameters

Name Type Description
_value uint256 The number by which to increase the minimal nonce for msg.sender.

Returns

Name Type Description
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.

Parameters

Name Type Description
_address address The address of the account which to return the deploy nonce for.

Returns

Name Type Description
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`.

Parameters

Name Type Description
_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.

dev: The value must be non-zero.

Parameters

Name Type Description
_key uint256 The nonce key under which the value will be set.
_value uint256 The value to store under the _key.

Events

ValueSetUnderNonce(accountAddress: address, key: uint256, value: uint256)
Name Type Indexed Description
accountAddress address
key uint256
value uint256