Code Monkey home page Code Monkey logo

Comments (8)

essential-writer-codebase avatar essential-writer-codebase commented on September 4, 2024

Yea, tonkeeper response error Warning: Unknown error if sended with payload.

from sdk.

siandreev avatar siandreev commented on September 4, 2024

Hi @OlegShalagin. You can add your message to the messages array

const defaultTx = {
validUntil: Date.now() + 1000000,
messages: [
message1,
message2
]
};

const result = await connector.sendTransaction(defaultTx);

from sdk.

siandreev avatar siandreev commented on September 4, 2024

If you need to send a message with a comment, you should create cell with op=0, add your comment, convert this cell to Base64, and pass result as the message payload

from sdk.

OlegShalagin avatar OlegShalagin commented on September 4, 2024

If you need to send a message with a comment, you should create cell with op=0, add your comment, convert this cell to Base64, and pass result as the message payload

give a code example please

from sdk.

siandreev avatar siandreev commented on September 4, 2024

const payload = beginCell().storeUint(0, 32).storeStringTail("YOUR_COMMENT").endCell().toBoc().toString("base64")

from sdk.

siandreev avatar siandreev commented on September 4, 2024

@bogdan-kotlubay @OlegShalagin is that what you were looking for?

Full example


const defaultTx = {
        validUntil: Date.now() + 1000000,
        messages: [
            {
                address: '0:0####',
                amount: '20000000',
                payload: beginCell().storeUint(0, 32).storeStringTail("YOUR_COMMENT").endCell().toBoc().toString("base64")
            }
        ]
    };

const result = await connector.sendTransaction(defaultTx);


from sdk.

OlegShalagin avatar OlegShalagin commented on September 4, 2024

@OlegShalagin is that what you were looking for?

@siandreev looks great, i`ll try it, thank you!

from sdk.

essential-writer-codebase avatar essential-writer-codebase commented on September 4, 2024

@bogdan-kotlubay @OlegShalagin is that what you were looking for?

Full example


const defaultTx = {
        validUntil: Date.now() + 1000000,
        messages: [
            {
                address: '0:0####',
                amount: '20000000',
                payload: beginCell().storeUint(0, 32).storeStringTail("YOUR_COMMENT").endCell().toBoc().toString("base64")
            }
        ]
    };

const result = await connector.sendTransaction(defaultTx);

yea, thanks!

from sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.