erc20Transfer static method
Request data when send erc20 token.
contractAddress
is token address.
sender
is sender public address.
amount
is token amount that you want to send, for example send 0.01 token,
and token decimals is 18, pass 10000000000000000.
Implementation
static Future<String> erc20Transfer(
String contractAddress, String sender, BigInt amount) async {
var list2 = [sender, amount.toString()];
var list1 = [contractAddress, "erc20_transfer", list2];
const method = "particle_abi_encodeFunctionCall";
final params = list1;
return await EvmService.rpc(method, params);
}