Permit

What is the permit?

permit ImmutableERC721 & ImmutableERC721MintById is EIP-4494.

An overview is as follows The EIP-4494 license is an approval process in which the owner signs an approvable spender NFT (Non-Fungible Token).

The permit is a locally signed message using the EIP-712 signature. The syntax is as follows.

Permit(address spender, uint256 tokenId, uint256 nonce, uint256 deadline)

where?

  • spender is approve

  • tokenId is the NFT (Non-Fungible Token) token ID used to approve

  • nonce the nonce of the NFT (Non-Fungible Token) and must be equal to nonces(tokenId) also in EIP-4494).

  • deadline is the timestamp of the license expiration

Tips

nonce is an important security feature that prevents signature replay. Specifically, it ensures that a signature cannot be used multiple times on the same contract. It is important to note that nonce is incremented when the ERC721 token is transmitted, not when the license function is called. This distinction helps maintain the integrity of contract security and ensures that each operation is unique and can only be performed once.

Why use a permit?

No Gas Approve

A license allows no Gas-approved owner to sign a license locally and submit it to an off-chain spender. The spender can then submit the transaction themselves.

You can obtain a " Permit " from a user and then submit the permit and destroy it in the same multi-call. It does not require the user to grant an approveForAll multi-caller contract.

Safe

Permit natively ensures that approvals are invalidated once the token has been transferred. It also introduces the concept of a cut-off date, so that if the current time is after the cut-off date, the approval will be effectively revoked.

Why not use Approvals?

The approval fee is the Gas fee, which provides permission for events that may not occur in the future (e.g., an order list may not be executed). The fee for using a license is still the Gas fee, but the fee is only used when the event is expected to occur, e.g., an approved spender will only submit a permit when the transaction is submitted.

When will the permit be used?

Trading: Permits are an important tool in the marketplace that eliminates the need for sellers to pre-approve the listing of their non-futures contracts. The Gas fee associated with the execution of a license is borne by the buyer, although this only occurs when the trade is executed.

Multi-Party Call Contracts: For tasks that use Immutable's pre-defined multi-party call contracts, the license provides versatility for a variety of functions. Detailed information on these features will be provided here once they have been fully developed and are available for use.

Last updated