Skip to content

Commit

Permalink
Merge branch 'main' into gha-payload-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Tritium committed Oct 10, 2023
2 parents de4740a + c368e23 commit 6948f7a
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/merge_json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
with:
commit-message: "Combined JSON Payloads ${{ github.event.inputs.directory }}"
title: "Combined JSON payloads ${{ github.event.inputs.directory }}"
reviewers: solarcurvey
assignees: tritium-vlk
branch: gha-payload-merge
delete-branch: true
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/poke_injectors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Poke Onchain Rewards Injectors

on:
workflow_dispatch:
schedule:
cron: "0/5 * * * *"
env:
KEYWORDS: ${{ secrets.KEEPER_PRIVATE_WORDS }}
jobs:
merge_jsons:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Run script with JSON files
run: |
cd action-scripts/brownie
pip3 install -r requirements-actions.txt
brownie run scripts/pokeInjectors.py
65 changes: 65 additions & 0 deletions BIPs/00notGov/10-2023-zkevn-injectors/fund1week.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"version": "1.0",
"chainId": "1101",
"createdAt": 1696892599288,
"meta": {
"name": "Transactions Batch",
"description": "",
"txBuilderVersion": "1.16.3",
"createdFromSafeAddress": "0xB59Ab49CA8d064E645Bf2c546d9FE6d1d4147a09",
"createdFromOwnerAddress": "",
"checksum": "0x592b2f195628d853e8614557eac6a16bbf2a4e9d91d0ec45553adab62fa8d65a"
},
"transactions": [
{
"to": "0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035",
"value": "0",
"data": null,
"contractMethod": {
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"name": "transfer",
"payable": false
},
"contractInputsValues": {
"to": "0x2F1901f2A82fcC3Ee9010b809938816B3b06FA6A",
"amount": "4000000000"
}
},
{
"to": "0xa2036f0538221a77A3937F1379699f44945018d0",
"value": "0",
"data": null,
"contractMethod": {
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"name": "transfer",
"payable": false
},
"contractInputsValues": {
"to": "0x3fb4ee715987eD98EDbeEb144F9b6b034C4c9F02",
"amount": "4000000000000000000000"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"1.0","chainId":"1101","createdAt":1696940219100,"meta":{"name":"Transactions Batch","description":"","txBuilderVersion":"1.16.3","createdFromSafeAddress":"0xB59Ab49CA8d064E645Bf2c546d9FE6d1d4147a09","createdFromOwnerAddress":"","checksum":"0x609551a404a1811d27ae899a6afb25ea83e12e63530cd78bca076e0af372a8f9"},"transactions":[{"to":"0x7733650c7aaF2074FD1fCf98f70cbC09138E1Ea5","value":"0","data":null,"contractMethod":{"inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"name":"set_reward_distributor","payable":false},"contractInputsValues":{"_reward_token":"0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035","_distributor":"0x2F1901f2A82fcC3Ee9010b809938816B3b06FA6A"}},{"to":"0x544BDCE27174EA8Ba829939bd3568efc6A6c9c53","value":"0","data":null,"contractMethod":{"inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"name":"set_reward_distributor","payable":false},"contractInputsValues":{"_reward_token":"0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035","_distributor":"0x2F1901f2A82fcC3Ee9010b809938816B3b06FA6A"}},{"to":"0x544BDCE27174EA8Ba829939bd3568efc6A6c9c53","value":"0","data":null,"contractMethod":{"inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"name":"set_reward_distributor","payable":false},"contractInputsValues":{"_reward_token":"0xa2036f0538221a77A3937F1379699f44945018d0","_distributor":"0x3fb4ee715987eD98EDbeEb144F9b6b034C4c9F02"}},{"to":"0x05257970368Efd323aeFfeC95F7e28C806c2e37F","value":"0","data":null,"contractMethod":{"inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"name":"set_reward_distributor","payable":false},"contractInputsValues":{"_reward_token":"0xa2036f0538221a77A3937F1379699f44945018d0","_distributor":"0x3fb4ee715987eD98EDbeEb144F9b6b034C4c9F02"}}]}
19 changes: 19 additions & 0 deletions action-scripts/brownie/scripts/pokeInjectors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from bal_addresses import AddrBook, BalPermissions, MultipleMatchesError, NoResultError
from brownie import network, accounts, Contract
import os

## LOAD wallet
mnemonic = os.environ["GITHUB_REPOSITORY"]
account = accounts.from_mnemonic(mnemonic)
print(f"Keeper Address: {account.address}")
## ZKEVM
network.disconnect()
network.connect("zkevm-main")
book = AddrBook("zkvem")
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})

0 comments on commit 6948f7a

Please sign in to comment.