SetApprovalForAll

ERC1155 Action Plugin - SetApprovalForAll

Description

Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.

Method

safeTransferFrom(address, address, uint256, uint256)

Method Parameters

NamePlugin TypeDescription

operator

FctAddress

approved

FctBoolean

Example

Example with initParams

const setApprovalForAll = new ERC1155.actions.SetApprovalForAll({
 chainId: 1,
 initParams: {
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     operator: "0x...",
     approved: true
   }
 }
})

Example without initParams

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

setApprovalForAll.input.set({
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     operator: "0x...",
     approved: true
   }
})

Learn more

Learn more about EIP1155 Multi Token standard here

Last updated