optInTokenTransfer method
Future<String>
optInTokenTransfer(
- AptosAccount sender,
- bool optIn, {
- BigInt? maxGasAmount,
- BigInt? gasUnitPrice,
- BigInt? expireTimestamp,
User opt-in or out direct transfer through a boolean flag, return the hash of the transaction submitted to the API.
Implementation
Future<String> optInTokenTransfer(
AptosAccount sender,
bool optIn, {
BigInt? maxGasAmount,
BigInt? gasUnitPrice,
BigInt? expireTimestamp
}) {
final payload = transactionBuilder.buildTransactionPayload("0x3::token::opt_in_direct_transfer", [], [optIn]);
return aptosClient.generateSignSubmitTransaction(
sender,
payload,
maxGasAmount: maxGasAmount,
gasUnitPrice: gasUnitPrice,
expireTimestamp: expireTimestamp
);
}