Skip to content

Commit

Permalink
Merge branch 'main' into function_for_main_script
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang authored Nov 14, 2024
2 parents efe27e9 + aca9623 commit edb7e7a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ DUNE_API_KEY=

# Safe Transaction Service Requirements.
SAFE_ADDRESS=0xA03be496e67Ec29bC62F01a428683D7F9c204930
INFURA_KEY=
NETWORK=mainnet
PROPOSER_PK=

NODE_URL=

# Slack Bot Credentials
SLACK_TOKEN=
SLACK_CHANNEL=
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ jobs:
- name: Unit Tests
run:
python -m pytest tests/unit
env:
# We make a rinkeby request in one unit test
INFURA_KEY: ${{ secrets.INFURA_KEY }}
8 changes: 2 additions & 6 deletions src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,16 @@
SAFE_ADDRESS = Web3.to_checksum_address(
ENV.get("SAFE_ADDRESS", "0xA03be496e67Ec29bC62F01a428683D7F9c204930")
)
# Found this exposed infura key on https://rpc.info/
INFURA_KEY = ENV.get("INFURA_KEY", "9aa3d95b3bc440fa88ea12eaa4456161")

NETWORK_STRING = ENV.get("NETWORK", "mainnet")
NODE_URL = f"https://{NETWORK_STRING}.infura.io/v3/{INFURA_KEY}"
NODE_URL = ENV.get("NODE_URL")
NETWORK = {
"mainnet": EthereumNetwork.MAINNET,
"gnosis": EthereumNetwork.GNOSIS,
"goerli": EthereumNetwork.GOERLI,
}[NETWORK_STRING]
SHORT_NAME = {
"mainnet": "eth",
"rinkeby": "rin",
"gnosis": "gno",
"goerli": "gor",
}[NETWORK_STRING]

CSV_APP_HASH = "Qme49gESuwpSvwANmEqo34yfCkzyQehooJ5yL7aHmKJnpZ"
Expand Down
2 changes: 2 additions & 0 deletions src/fetch/transfer_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def auto_propose(
# Check for required env vars early
# so not to wait for query execution to realize it's not available.
signing_key = os.environ["PROPOSER_PK"]

assert NODE_URL is not None, "NODE_URL env variable not set!"
client = EthereumClient(URI(NODE_URL))

log_saver.print(Transfer.summarize(transfers), category=Category.TOTALS)
Expand Down

0 comments on commit edb7e7a

Please sign in to comment.