Unanswered
The following is from a test file in tonweb. Here's the entire file. https://github.com/toncenter/tonweb/blob/master/src/test-jetton.js
It should be enough for your needs!
const transfer = async () => {
const seqno = (await wallet.methods.seqno().call()) || 0;
console.log({seqno})
console.log(
await wallet.methods.transfer({
secretKey: keyPair.secretKey,
toAddress: JETTON_WALLET_ADDRESS,
amount: TonWeb.utils.toNano('0.05'),
seqno: seqno,
payload: await jettonWallet.createTransferBody({
jettonAmount: TonWeb.utils.toNano('500'),
toAddress: new TonWeb.utils.Address(WALLET2_ADDRESS),
forwardAmount: TonWeb.utils.toNano('0.01'),
forwardPayload: new TextEncoder().encode('gift'),
responseAddress: walletAddress
}),
sendMode: 3,
}).send()
);
}
353 Views
0
Answers
one year ago
one year ago
i have tried but always got error from Lite server
I meet this problem when testing the code above
"TS2353: Object literal may only specify known properties, and jettonAmount does not exist in type TransferBodyParams"