I have changed query_id and other parameters, but I always get the Failed error
Failed error screenshot
I tried it on javascript:
const receiver = 'UQBgyXy6AhPB_rVRaTlc40IFMSpAFm_KrQYzKNbKZzxoKGRA';
const sender = 'UQB3yamV4Zt69EqTigJDHPDt2pO_zeO7xxslihmCJUvtSGSt';
const body = beginCell()
.storeUint(0xf8a7ea5, 32) // jetton transfer op code
.storeUint(9875646865464364689, 64) // query_id:uint64
.storeCoins(10000000000) // amount:(VarUInteger 16) - Jetton amount for transfer (decimals = 6 - jUSDT, 9 - default)
.storeAddress(Address.parse(receiver)) // destination:MsgAddress
.storeAddress(Address.parse(sender)) // response_destination:MsgAddress
.storeUint(0, 1) // custom_payload:(Maybe ^Cell)
.storeCoins(8e6) // forward_ton_amount:(VarUInteger 16) - if >0, will send notification message
.storeUint(0,1) // forward_payload:(Either Cell ^Cell)
.endCell();
const base64 = body.toBoc().toString("base64");
const tonweb = new TonWeb();
const jettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, { address: "EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT" });
const address = await jettonMinter.getJettonWalletAddress(new TonWeb.utils.Address(sender));
let a = address.toString(true, true, true);
const transaction = {
validUntil: Math.floor(Date.now() / 1000) + 60, // 60 sec
messages: [
{
address: a,
amount: 8e6,
payload: base64
}
]
}
const result = await tonConnectUI.sendTransaction(transaction);
And I tried it on C#:
// Create a receiver address and the amount to send
Address receiver = new("UQBgyXy6AhPB_rVRaTlc40IFMSpAFm_KrQYzKNbKZzxoKGRA");
Address sender = new("UQB3yamV4Zt69EqTigJDHPDt2pO_zeO7xxslihmCJUvtSGSt");
// define jetton amount to send
Coins amount = new Coins(100); // for ex 100 jettons
Random random = new Random();
ulong randomUlong = (ulong)random.Next() | ((ulong)random.Next() << 32);
// create jetton transfer options
JettonTransferOptions options = new JettonTransferOptions()
{
Amount = amount,
Destination = receiver,
QueryId = randomUlong
};
// create a message body for the jetton transfer
Cell jettonTransfer = JettonWallet.CreateTransferRequest(options);
// Create an array of messages to send
Message[] sendTons =
{
new Message(
sender,
new("0.01"),
payload: jettonTransfer),
};
// Set the valid until timestamp for the transaction (expiration time in seconds from the current moment)
long validUntil = DateTimeOffset.Now.ToUnixTimeSeconds() + 600;
// Create a SendTransactionRequest object
SendTransactionRequest transactionRequest = new SendTransactionRequest(sendTons, validUntil);
But I always get the Same error.
I have studied the documentation and made each line according to the documentation. I have already tried everything and I cannot understand why my transaction is not accepted by the network.
New contributor
Александр А is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.