createTonTransferBody method
Cell
createTonTransferBody({})
Implementation
Cell createTonTransferBody({
required BigInt tonAmount,
required InternalAddress refundAddress,
Cell? forwardPayload,
BigInt? queryId,
}) {
Builder b = beginCell()
.storeUint(PtonOpCodes.TON_TRANSFER.op, 32)
.storeUint(queryId ?? BigInt.zero, 64)
.storeCoins(tonAmount)
.storeAddress(refundAddress);
if (forwardPayload != null) {
b.storeBool(true).storeRef(forwardPayload);
}
return b.endCell();
}