Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
How do you send jettons programmatically?


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()
        );
    }
3
3
Posted one year ago
Jeremy
394 × 5 Administrator
1
1

i have tried but always got error from Lite server

Aaron   2 months ago Report
  
  

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"

No Name   13 hours ago Report
153 Views
0 Answers
one year ago
one year ago