Hi, I am trying to interract with my contract using tonconnect. I couldn't find any doc about contract interactions. Where to start?
Mar 10, 2023, 10:41 PM
I tried something like this, it sends the transaction but data doesn't change at contract.
'''
const messageBody = beginCell()
.storeUint(1, 32) // op (op #1 = increment)
.storeUint(0, 64) // query id
.endCell();
const contractAddress = Address.parse('EQBQe02m6v7svDm2LZq0KcXdSDQrjPSbMtpobOxECyeeucKj').toString();
const defaultTx2 = {
validUntil: Date.now() + 1000000,
messages: [
{
address: contractAddress,
amount: '2000000',
messageBody
},
],
};
tonConnectUi.sendTransaction(defaultTx2)
'''
'''
const messageBody = beginCell()
.storeUint(1, 32) // op (op #1 = increment)
.storeUint(0, 64) // query id
.endCell();
const contractAddress = Address.parse('EQBQe02m6v7svDm2LZq0KcXdSDQrjPSbMtpobOxECyeeucKj').toString();
const defaultTx2 = {
validUntil: Date.now() + 1000000,
messages: [
{
address: contractAddress,
amount: '2000000',
messageBody
},
],
};
tonConnectUi.sendTransaction(defaultTx2)
'''
Mar 10, 2023, 10:44 PM
maybe can take reference here:
https://answers.ton.org/question/1544874631742099456/how-do-you-send-jettons-programmatically
https://answers.ton.org/question/1544874631742099456/how-do-you-send-jettons-programmatically
is there more tutorial about TON Storage yet?
https://ton.org/docs/develop/howto/compile#storage-daemon
https://ton.org/docs/develop/howto/compile#storage-daemon
Mar 11, 2023, 1:58 AM