sendCoin method
- required TransferIntent<
EvmFeeInformation< intent,EvmGasPrice> > - required String from,
- required Uint8List seed,
Send Currency
Implementation
Future<String> sendCoin({
required TransferIntent<EvmFeeInformation> intent,
required String from,
required Uint8List seed,
}) async {
final tx = await buildTransaction(
sender: from,
recipient: intent.recipient,
seed: seed,
feeInfo: intent.feeInfo,
data: intent.encodedMemo,
value: intent.amount.value,
accessList: intent.accessList,
);
final balance = await fetchBalance(address: toChecksumAddress(from)).then(
(amount) => amount.value,
);
if (balance < tx.gasFee + tx.value) {
throw Failure("Insufficient funds to pay native gas fee");
}
return await sendRawTransaction(tx.serialized.toHex);
}