Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 98a565e

Browse files
committed
Explicit for loop bcos map doesnt seem to work
1 parent 9356562 commit 98a565e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

shared/Governance.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ export const createAndExecuteProposal = async ({
7474
tx = await governor.connect(user)['execute(uint256)'](proposalId);
7575

7676
let result = await tx.wait(1);
77-
targets.map(async (target) => {
78-
// get ABI
79-
let abi = await getABIFromPolygonscan(target);
77+
78+
for (let i = 0; i < targets.length; i++) {
79+
let abi = await getABIFromPolygonscan(targets[i]);
8080
let iface = new ethers.utils.Interface(abi);
8181
let events = result.logs.map((log) => {
8282
try {
@@ -85,10 +85,10 @@ export const createAndExecuteProposal = async ({
8585
// no matching event
8686
}
8787
});
88-
console.log(`### TARGET ${target} EVENTS ###`);
88+
console.log(`### TARGET ${targets[i]} EVENTS ###`);
8989
console.log(events);
9090
console.log(`###################################`);
91-
});
91+
}
9292

9393
let timelockEvents = result.logs.map((log) => {
9494
try {

0 commit comments

Comments
 (0)