Skip to content

Commit

Permalink
add main so no error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tritium committed Oct 9, 2023
1 parent a3c4cfc commit 1e5fc40
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions action-scripts/brownie/scripts/pokeInjectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@
from brownie import network, accounts, Contract
import os

## LOAD wallet
mnemonic = os.environ["KEYWORDS"]
account = accounts.from_mnemonic(mnemonic)
print(f"Keeper Address: {account.address}")
## ZKEVM
network.disconnect()
network.connect("zkevm-main")
book = AddrBook("zkevm")
injectors = book.extras.maxiKeepers.gaugeRewardsInjectors.values()
for injectorAddress in injectors:
injector = Contract(injectorAddress)
(ready, performdata) = injector.checkUpkeep(b"")
if ready:
injector.performUpkeep(performdata, {"from": account})
def main()
## LOAD wallet
mnemonic = os.environ["KEYWORDS"]
account = accounts.from_mnemonic(mnemonic)
print(f"Keeper Address: {account.address}")
## ZKEVM
network.disconnect()
network.connect("zkevm-main")
book = AddrBook("zkevm")
injectors = book.extras.maxiKeepers.gaugeRewardsInjectors.values()
for injectorAddress in injectors:
injector = Contract(injectorAddress)
(ready, performdata) = injector.checkUpkeep(b"")
if ready:
injector.performUpkeep(performdata, {"from": account})
else:
print(f"{injector.address} not ready")

if __name__ == "__main__":
main()

0 comments on commit 1e5fc40

Please sign in to comment.