1

Getting the following error

RangeError: The value of "offset" is out of range. It must be >= 0 and <= 8. Received 9

When I try to call decodeTransferCheckedInstructionUnchecked on the 3rd tx instruction of this tx: https://solscan.io/tx/5Aybc2PhNy9KJepxTML95K137FvMhZWhbpdcxgtuqE5yj2X6Q7QpSQ5Fg2ttkinB7NHn1s8wqNMRLcQkWwhmnmJw

decodeTransferCheckedInstructionUnchecked is from the "@solana/spl-token" package https://solana-labs.github.io/solana-program-library/token/js/modules.html#decodeTransferCheckedInstructionUnchecked Any idea why?

1 Answer 1

1

Very simply, that instruction is a transfer instruction, and not a transferChecked instruction. Instead of using decodeTransferCheckedInstructionUnchecked, use decodeTransferInstruction or decodeTransferInstructionUnchecked.

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.