From 3795b4ee1c53d0757c87d56eaaf506d07df0ecbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Claudio=20Nale?= Date: Thu, 16 Feb 2023 16:48:26 -0300 Subject: [PATCH] Fixes struct parsing in sdk. --- sdk/src/structs.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/src/structs.ts b/sdk/src/structs.ts index 70ccd8f..680351f 100644 --- a/sdk/src/structs.ts +++ b/sdk/src/structs.ts @@ -86,6 +86,7 @@ export function parseDeliveryInstructionsContainer( ) idx += 32 const executionParameters = parseExecutionParameters(bytes, idx) + idx += 37 instructions.push( // dumb typechain format { @@ -123,8 +124,8 @@ export function parseRedeliveryByTxHashInstruction( const sourceTxHash = bytes.slice(idx, idx + 32) idx += 32 - const sourceNonce = BigNumber.from(bytes.slice(idx, idx + 32)) - idx += 32 + const sourceNonce = BigNumber.from(bytes.slice(idx, idx + 4)) + idx += 4 const targetChain = bytes.readUInt16BE(idx) idx += 2 @@ -143,6 +144,7 @@ export function parseRedeliveryByTxHashInstruction( idx += 32 const executionParameters = parseExecutionParameters(bytes, idx) + idx += 37 return { payloadId, sourceChain,