Skip to content

Commit 5ecd30e

Browse files
authored
increase attestation timeout (#9)
1 parent 7c67326 commit 5ecd30e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "cctp-cross-chain-transfer",
2+
"name": "demo-ts-sdk",
33
"version": "1.0.0",
44
"type": "module",
55
"main": "index.js",

src/scripts/native-transfer.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { SignerStuff, getSigner, getTokenDecimals } from '../helpers/helpers';
1818
const wh = await wormhole('Testnet', [evm, solana, sui, aptos]);
1919

2020
// Grab chain Contexts -- these hold a reference to a cached rpc client
21-
const sendChain = wh.getChain('Aptos');
22-
const rcvChain = wh.getChain('Solana');
21+
const sendChain = wh.getChain('BaseSepolia');
22+
const rcvChain = wh.getChain('Monad');
2323

2424
// Get signer from local key but anything that implements
2525
// Signer interface (e.g. wrapper around web wallet) should work
@@ -30,7 +30,7 @@ import { SignerStuff, getSigner, getTokenDecimals } from '../helpers/helpers';
3030
const token = Wormhole.tokenId(sendChain.chain, 'native');
3131

3232
// Define the amount of tokens to transfer
33-
const amt = '1';
33+
const amt = '0.01';
3434

3535
// Set automatic transfer to false for manual transfer
3636
const automatic = false;
@@ -104,7 +104,8 @@ async function tokenTransfer<N extends Network>(
104104

105105
// 2) Wait for the VAA to be signed and ready (not required for auto transfer)
106106
console.log('Getting Attestation');
107-
await xfer.fetchAttestation(400_000);
107+
const timeout = 30 * 60 * 1000; // Timeout in milliseconds (20 minutes)
108+
await xfer.fetchAttestation(timeout);
108109
// console.log(`Got Attestation: `, attestIds);
109110
console.log(' ');
110111

0 commit comments

Comments
 (0)