Skip to content

Commit 2897165

Browse files
authored
[ADHOC] fix: prevent transfer abi mutation (#372)
1 parent 495708e commit 2897165

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/smart-falcons-joke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@boostxyz/sdk": patch
3+
---
4+
5+
prevent mutatation of Transfer abi by using structuredClone

packages/sdk/src/Actions/EventAction.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,9 @@ export class EventAction extends DeployableTarget<
829829
const filteredLogs = receipt.logs.filter(
830830
(log) => log.topics[0] === TRANSFER_SIGNATURE,
831831
);
832-
const event = abi[
833-
'Transfer(address indexed,address indexed,uint256 indexed)'
834-
] as AbiEvent;
832+
const event = structuredClone(
833+
abi['Transfer(address indexed,address indexed,uint256 indexed)'],
834+
) as AbiEvent;
835835

836836
// ERC721
837837
try {

0 commit comments

Comments
 (0)