You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the code generated by Solana's xfer.
const automaticBridge = await fromChain.getAutomaticTokenBridge();
xfer = automaticBridge.transfer
web3.Transaction.from(transactionBuffer) or web3.VersionedTransaction.deserialize
The returned transaction signature is wrong (Reached end of buffer unexpectedly)
import { wormhole } from "@wormhole-foundation/sdk";
import { toNative, TokenAddress } from "@wormhole-foundation/sdk-definitions";
import { Wormhole } from "@wormhole-foundation/sdk-connect";
import { amount } from "@wormhole-foundation/sdk";
import evm from "@wormhole-foundation/sdk/evm";
import solana from "@wormhole-foundation/sdk/solana";
import sui from "@wormhole-foundation/sdk/sui";
import { TokenTransfer } from "@wormhole-foundation/sdk-connect";
import { Transaction } from "@solana/web3.js";
import { VersionedTransaction } from "@solana/web3.js";
I used the code generated by Solana's xfer.
const automaticBridge = await fromChain.getAutomaticTokenBridge();
xfer = automaticBridge.transfer
web3.Transaction.from(transactionBuffer) or web3.VersionedTransaction.deserialize
The returned transaction signature is wrong (Reached end of buffer unexpectedly)
{
"transaction": {
"recentBlockhash": null,
"feePayer": "HLZFstYdaZYAYdP1nsbPseSd4AouL1g2fFvNwmSSC7YA",
"nonceInfo": null,
"instructions": [
{
"keys": [
{
"pubkey": "HLZFstYdaZYAYdP1nsbPseSd4AouL1g2fFvNwmSSC7YA",
"isSigner": true,
"isWritable": true
},
{
"pubkey": "BYfFFqRS3Vdi7jJjomjLEzPeuNbHXkAYLeTzBiQtXdi5",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "7SAdSwDR7AJyzejaH3NF3Pv5ghq8pycFkpsn6e4kh71n",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "6FFgAjr3dwzFjEo3E7ZmfwGmngToSm9zDu1Le3vnFGQs",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "GjiamzTxjnHGE69ssKQ9Cdz7DRVrAeDajGema7z77YTB",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "3ruHj8LUxcdWVunrwQ7EquBFs9215LoFafKEY2xzmULy",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "AYBTAcgbCoLGeyizPoayf3hj9CmE6Vz9dy6yBm5hsxzq",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "7YL41XffEmWCr9nBNRR3cRbE56ekr7UNm8bbh1z67k7E",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "DapiQYH3BGonhN8cngWcXQ6SrqSm3cwysoznoHr6Sbsx",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "7oPa2PHQdZmjSPqvpZN7MQxnC7Dcf3uL4oLqknGLk2S3",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "2yVjuQwpsvdsrywzsJJVs9Ueh4zayyo5DYJbBNc3DDpn",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "CBcBcetwAgZrkp2Gd27SNkmhHNCqpaPywnpaDmkuJj17",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "Gv1KWf8DT1jKv5pKBmGaTmVszqa56Xn8YGx2Pg7i7qAk",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "GF2ghkjwsR9CHkGk1RvuZrApPZGBZynxMm817VNi51Nf",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "9bFNrXNb2WTx8fMHXCheaZqkLZ3YCCaiqTftHxeintHy",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "11111111111111111111111111111111",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "SysvarC1ock11111111111111111111111111111111",
"isSigner": false,
"isWritable": false
},
{
"pubkey": "SysvarRent111111111111111111111111111111111",
"isSigner": false,
"isWritable": false
}
],
"programId": "3vxKRPwUTiEkeUVyoZ9MXFe1V71sRLbLqu1gRYaWmehQ",
"data": [
25,
63,
69,
217,
250,
9,
127,
122,
0,
45,
49,
1,
0,
0,
0,
0,
198,
11,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
189,
223,
2,
119,
42,
95,
127,
117,
190,
45,
180,
233,
189,
24,
15,
89,
248,
235,
222,
145,
0,
0,
0,
0
]
}
],
"signers": []
}
}
My code
import { wormhole } from "@wormhole-foundation/sdk";
import { toNative, TokenAddress } from "@wormhole-foundation/sdk-definitions";
import { Wormhole } from "@wormhole-foundation/sdk-connect";
import { amount } from "@wormhole-foundation/sdk";
import evm from "@wormhole-foundation/sdk/evm";
import solana from "@wormhole-foundation/sdk/solana";
import sui from "@wormhole-foundation/sdk/sui";
import { TokenTransfer } from "@wormhole-foundation/sdk-connect";
import { Transaction } from "@solana/web3.js";
import { VersionedTransaction } from "@solana/web3.js";
async function testTransfer() {
try {
const wh = await wormhole("Mainnet", [evm, solana, sui], {
chains: {
Solana: {
rpc: "https://api.mainnet-beta.solana.com",
},
Bsc: {
rpc: "https://bsc-dataseed1.binance.org",
},
Sui: {
rpc: "https://sui-mainnet.blockvision.org/",
}
}
});
} catch (error) {
throw error;
}
}
testTransfer().then(result => {
console.log(JSON.stringify(result, null, 2));
}).catch(error => {
console.error("Error:", error.message);
});
The text was updated successfully, but these errors were encountered: