SafeTransferFrom

ERC1155 Action Plugin - SafeTransferFrom

Description

Transfers value amount of an id from the from address to the to address specified (with safety call).

Method

safeTransferFrom(address, address, uint256, uint256)

Method Parameters

Example

Example with initParams

const safeBatchTransferFrom = new ERC1155.actions.SafeBatchTransferFrom({
 chainId: 1,
 initParams: {
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     from: "0x...",
     to: "0x...",
     id: "1",
     value: "40"
   }
 }
})

Example without initParams

const safeBatchTransferFrom = new ERC1155.actions.SafeBatchTransferFrom({ chainId: 1 })

safeBatchTransferFrom.input.set({
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     from: "0x...",
     to: "0x...",
     ids: "1",
     values: "40"
   }
})

Learn more

Learn more about EIP1155 Multi Token standard here

Last updated