Skip to content

Commit

Permalink
Do not decode internal data param without address (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiarods authored Dec 10, 2024
1 parent ade1be3 commit da3a060
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-bottles-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@3loop/transaction-decoder': patch
---

Do not decode internal calldata param without knowing the address
6 changes: 3 additions & 3 deletions packages/transaction-decoder/src/decoding/calldata-decode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ const decodeBytesRecursively = (
}
}

if (isCallDataNode) {
if (isCallDataNode && address) {
const decoded = yield* decodeMethod({
data: node.value as Hex,
chainID: address ? chainID : 0,
contractAddress: address ?? '',
chainID,
contractAddress: address,
}).pipe(Effect.orElseSucceed(() => null))

return decoded
Expand Down

0 comments on commit da3a060

Please sign in to comment.