SetApprovalForAll

ERC721 Action Plugin - SetApprovalForAll

Description

Enable or disable approval for a third party ("operator") to manage all of NFT assets

Method

setApprovalForAll(address, bool)

Input Parameters

NamePlugin TypeDescription

to

FctAddress

ERC721 Contract Address

Method Parameters

NamePlugin TypeDescription

operator

FctAddress

approved

FctBoolean

Enable or disable approval

Returned Values

No value returned

Example

Example with initParams

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

Example without initParams

const setApprovalForAll = new ERC721.actions.SetApprovalForAll({ chainId: 1 })

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

Learn more

Learn more about EIP712 NFT standard here

Last updated