From e7a702aad5d4ee0410bfa06573323098aaff3519 Mon Sep 17 00:00:00 2001 From: Divide-By-0 Date: Wed, 22 May 2024 15:43:11 +0900 Subject: [PATCH] fixed log parsing --- packages/safe_tracker/safe_tracker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/safe_tracker/safe_tracker.ts b/packages/safe_tracker/safe_tracker.ts index 71cda1b7..f1f7753b 100644 --- a/packages/safe_tracker/safe_tracker.ts +++ b/packages/safe_tracker/safe_tracker.ts @@ -101,8 +101,8 @@ const main = async () => { const subscriptionSafeSetup = alchemy.ws.on([safeSetupEvent], async (log: LogType, event: { event: string }) => { console.log("Safe setup detected!"); const abiCoder = new ethers.AbiCoder(); - const decodedData = abiCoder.decode(["address", "address[]", "uint256", "address", "address"], log.data); - const owners = decodedData[1]; + const decodedData = abiCoder.decode(["address[]", "uint256", "address", "address"], log.data); + const owners = decodedData[0]; console.log(`Owners: ${owners}`); const eventSenderAddress = log.address; console.log(`Event Sender Address: ${eventSenderAddress}`);