Skip to content

Instantly share code, notes, and snippets.

@PieterT2000
Last active January 20, 2025 13:27
Show Gist options
  • Save PieterT2000/8c761d5401974724245901d53fb5e88a to your computer and use it in GitHub Desktop.
Save PieterT2000/8c761d5401974724245901d53fb5e88a to your computer and use it in GitHub Desktop.
How to fix stuck Wormhole Claim transactions due to timeouts

How to fix stuck Wormhole Claim transactions due to timeouts

Context

When you bridge USDC from Sui (or any other source chain) to Solana using the Wormhole bridge, there are two stages:

  1. Burning the token on the source chain
  2. Claiming, minting the token on the destination chain (Solana in this case). This step involves an actual transaction on the Solana blockchain. The bridging process can pause between the steps, and in that case you can later use the "Resume transaction" section on the Portalbridge DApp to complete the transaction and claim the tokens on the destination chain. image

Problem

When the Solana blockchain is busy the usual fees are too low for transactions to be accepted by validators. DApps often have a hard-coded upper boundary to avoid hefty gas fees for endusers.
Some users experience repeated "transaction failed: timed out" errors.
However, if you are desparate to get your transaction going and you don't mind paying a tad more in gas fees, here is how to do it:

1. Clone or Open the Wormhole Connect Repository

git clone https://github.com/wormhole-foundation/wormhole-connect.git

2. Install the project's dependencies (make sure you have installed Node.js)

 cd wormhole-connect/wormhole-connect
 npm i

3. Update the minimum priority fee.

  1. Check the avg fee on solscan image
  2. Convert the avg fee (in SOL) to micro Lamports here
  3. Open up wormhole-connect/src/utils/wallet/solana.ts and change line #331 to your desired minimum Lamports value
  4. Open wormhole-connect/src/components/DEmoApp/index.tsx and make the following change.
    - <WormholeConnect key={customConfigNonce} config={customConfig} />
    + <WormholeConnect 
    +   key={customConfigNonce} 
    +   config={{{
    +     ...customConfig,
    +     network: 'Mainnet',
    +   }}} 
    +  />

4. Start the demo app (make sure you are in the <PROJECT_ROOT>/wormhole-connect directory)

npm start

The app should open in your localhost:5173 and you should see the following app interface. You can now proceed as you would on the official Wormhole portalbridge website. image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment