Approve

ERC721 Action Plugin - Approve

Description

Change or reaffirm the approved address for an NFT

Method

approve(address, uint256)

Input Parameters

NamePlugin TypeDescription

to

FctAddress

ERC721 Contract Address

Method Parameters

NamePlugin TypeDescription

to

FctAddress

tokenId

FctValue

Returned Values

No value returned

Example

Example with initParams

const approve = new ERC721.actions.Approve({
 chainId: 1,
 initParams: {
   to: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" // BAYC NFT Contract
   methodParams: {
     operator: "0x...",
     approved: true,
   }
 }
})

Example without initParams

const approve = new ERC721.actions.Approve({ chainId: 1 })

approve.input.set({
   to: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" // BAYC NFT Contract
   methodParams: {
     operator: "0x...",
     approved: true,
   }
})

Learn more

Learn more about EIP712 NFT standard here

Last updated