0

I'm currently trying to write a multiple swap transaction (10 swaps) using lookup tables using Liquidity.makeSwapInstructionSimple.

When writing standard v0 transactions, you simply pass the LUT to compileToV0Message([LUT]) and it works, though i'm struggling to work out how to add the LUT to a Raydium sdk built tx.

Is this possible? Or do i have to write the swap from scratch?

1
  • If you already have a compiled transaction from the Raydium SDK, it's a bit tricky to add an address lookup table. You'll need to deconstruct the message and then replace the addresses with ones from lookup table accounts.
    – Jon C
    Commented Apr 7 at 18:31

1 Answer 1

0
import {
    LOOKUP_TABLE_CACHE,
} from '@raydium-io/raydium-sdk'

You can use lookup table like this. But in my experience, I can perform raydium swap without lookup table. I think lookup table is required when you use several instructions in one tx.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.