Skip to content

Commit

Permalink
feat(task/l1:whitelist): do nothing if the state is not changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlee42 committed Feb 27, 2024
1 parent d13b904 commit d8854ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ts-src/tasks/l1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ task("l1:whitelist", "Whitelist an sequencer address")
console.log(`Removing ${args["addr"]} from whitelist`);
}

const whitelisted = await lockingManager.whitelist(addr);
if (whitelisted == enable) {
console.log("No changes");
return;
}

const tx = await lockingManager.setWhitelist(addr, enable);
console.log("Confrimed at", tx.hash);
});
Expand Down

0 comments on commit d8854ae

Please sign in to comment.