Permit2

Arc Browse chains

0x000000000022d473030f116ddee9f6b43ac78ba3

Solidity v0.8.17+commit.8df45f5f

🤖
Query this contract from your AI
Reference: 0x000000000022d473030f116ddee9f6b43ac78ba3
Sample prompt: "Tell me the current state of arc/0x000000000022d473030f116ddee9f6b43ac78ba3"
No AI wired up yet? → mcp.smarts.md · Browse chains

Admin & Risk

Who can change the rules?

No admin risk controls detected from the verified ABI.

Overview

Read Functions
3
Write Functions
12
Events
5

Read Functions

Block #27,573,549 · just now
DOMAIN_SEPARATOR() view → 0xa88a1b742ab6890402e6ee74f2359f3723ab547c6dc3b850249bdbffebe2b18f

Returns the domain separator for the current chain.

dev: Uses cached version if chainid and address are unchanged from construction.

Returns

Name Type Description
— bytes32
allowance(address, address, address) view

The mapping is indexed in the above order see: allowance[ownerAddress][tokenAddress][spenderAddress]

dev: The packed slot holds the allowed amount, expiration at which the allowed amount is no longer valid, and current nonce thats updated on any signature based approvals.

Parameters

Name Type Description
— address
— address
— address

Returns

Name Type Description
amount uint160
expiration uint48
nonce uint48
nonceBitmap(address, uint256) view

A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection

dev: The index, or wordPosition is capped at type(uint248).max

Parameters

Name Type Description
— address
— uint256

Returns

Name Type Description
— uint256

Write Functions

approve(token: address, spender: address, amount: uint160, expiration: uint48) nonpayable

///////////////////////////////////////////////////////////

Parameters

Name Type Description
token address
spender address
amount uint160
expiration uint48
invalidateNonces(token: address, spender: address, newNonce: uint48) nonpayable

Invalidate nonces for a given (token, spender) pair

dev: Can't invalidate more than 2**16 nonces per transaction.

Parameters

Name Type Description
token address The token to invalidate nonces for
spender address The spender to invalidate nonces for
newNonce uint48 The new nonce to set. Invalidates all nonces less than it.
invalidateUnorderedNonces(wordPos: uint256, mask: uint256) nonpayable

Invalidates the bits specified in mask for the bitmap at the word position

dev: The wordPos is maxed at type(uint248).max

Parameters

Name Type Description
wordPos uint256 A number to index the nonceBitmap at
mask uint256 A bitmap masked against msg.sender's current bitmap at the word position
lockdown(approvals: tuple[]) nonpayable

Enables performing a "lockdown" of the sender's Permit2 identity by batch revoking approvals

Parameters

Name Type Description
approvals tuple[] Array of approvals to revoke.
permit(owner: address, permitBatch: tuple, signature: bytes) nonpayable

///////////////////////////////////////////////////////////

Parameters

Name Type Description
owner address
permitBatch tuple
signature bytes
permit(owner: address, permitSingle: tuple, signature: bytes) nonpayable

///////////////////////////////////////////////////////////

Parameters

Name Type Description
owner address
permitSingle tuple
signature bytes
permitTransferFrom(permit: tuple, transferDetails: tuple, owner: address, signature: bytes) nonpayable

Transfers a token using a signed permit message

dev: Reverts if the requested amount is greater than the permitted signed amount

Parameters

Name Type Description
permit tuple The permit data signed over by the owner
transferDetails tuple The spender's requested transfer details for the permitted token
owner address The owner of the tokens to transfer
signature bytes The signature to verify
permitTransferFrom(permit: tuple, transferDetails: tuple[], owner: address, signature: bytes) nonpayable

Transfers a token using a signed permit message

dev: Reverts if the requested amount is greater than the permitted signed amount

Parameters

Name Type Description
permit tuple The permit data signed over by the owner
transferDetails tuple[] The spender's requested transfer details for the permitted token
owner address The owner of the tokens to transfer
signature bytes The signature to verify
permitWitnessTransferFrom(permit: tuple, transferDetails: tuple, owner: address, witness: bytes32, witnessTypeString: string, signature: bytes) nonpayable

Includes extra data provided by the caller to verify signature over

dev: Reverts if the requested amount is greater than the permitted signed amount

Parameters

Name Type Description
permit tuple The permit data signed over by the owner
transferDetails tuple The spender's requested transfer details for the permitted token
owner address The owner of the tokens to transfer
witness bytes32 Extra data to include when checking the user signature
witnessTypeString string The EIP-712 type definition for remaining string stub of the typehash
signature bytes The signature to verify
permitWitnessTransferFrom(permit: tuple, transferDetails: tuple[], owner: address, witness: bytes32, witnessTypeString: string, signature: bytes) nonpayable

Includes extra data provided by the caller to verify signature over

dev: Reverts if the requested amount is greater than the permitted signed amount

Parameters

Name Type Description
permit tuple The permit data signed over by the owner
transferDetails tuple[] The spender's requested transfer details for the permitted token
owner address The owner of the tokens to transfer
witness bytes32 Extra data to include when checking the user signature
witnessTypeString string The EIP-712 type definition for remaining string stub of the typehash
signature bytes The signature to verify
transferFrom(transferDetails: tuple[]) nonpayable

Transfer approved tokens from one address to another

dev: Requires the from address to have approved at least the desired amount of tokens to msg.sender.

Parameters

Name Type Description
transferDetails tuple[]
transferFrom(from: address, to: address, amount: uint160, token: address) nonpayable

Transfer approved tokens from one address to another

dev: Requires the from address to have approved at least the desired amount of tokens to msg.sender.

Parameters

Name Type Description
from address The address to transfer from
to address The address of the recipient
amount uint160 The amount of the token to transfer
token address The token address to transfer

Events

Approval(owner: address, token: address, spender: address, amount: uint160, expiration: uint48)

Emits an event when the owner successfully sets permissions on a token for the spender.

Name Type Indexed Description
owner address ✓
token address ✓
spender address ✓
amount uint160
expiration uint48
Lockdown(owner: address, token: address, spender: address)

Emits an event when the owner sets the allowance back to 0 with the lockdown function.

Name Type Indexed Description
owner address ✓
token address
spender address
NonceInvalidation(owner: address, token: address, spender: address, newNonce: uint48, oldNonce: uint48)

Emits an event when the owner successfully invalidates an ordered nonce.

Name Type Indexed Description
owner address ✓
token address ✓
spender address ✓
newNonce uint48
oldNonce uint48
Permit(owner: address, token: address, spender: address, amount: uint160, expiration: uint48, nonce: uint48)

Emits an event when the owner successfully sets permissions using a permit signature on a token for the spender.

Name Type Indexed Description
owner address ✓
token address ✓
spender address ✓
amount uint160
expiration uint48
nonce uint48
UnorderedNonceInvalidation(owner: address, word: uint256, mask: uint256)

Emits an event when the owner successfully invalidates an unordered nonce.

Name Type Indexed Description
owner address ✓
word uint256
mask uint256