encodeValidatorNonce
Encodes the validator address in the nonce key to use in ERC-7579 accounts.
Usage
const nonce = await getAccountNonce(publicClient, {
address: account.address,
entryPointAddress: entryPoint07Address,
key: encodeValidatorNonce({ account, validator: validatorModule }),
})
Parameters
account
- Type:
Account
The account object.
validator
- Type:
Module
The validator module object.
Returns
- Type
bigint
The encoded validator nonce key to query the ERC-4337 EntryPoint with.