erc1155SafeTransferFrom static method
Request data when send erc1155 nft.
contractAddress
is nft contract address.
sender
is sender public address.
to
is receiver public address.
tokenId
is nft token id.
amount
is nft amount that you want to send, for example send 10 nft, pass "10"
data
can pass "0x"
Implementation
static Future<String> erc1155SafeTransferFrom(
String contractAddress,
String sender,
String to,
String tokenId,
String amount,
String data) async {
var list2 = [sender, to, tokenId, amount, data];
var list1 = [contractAddress, "erc1155_safeTransferFrom", list2];
const method = "particle_abi_encodeFunctionCall";
final params = list1;
return await EvmService.rpc(method, params);
}