Skip to content

Commit

Permalink
Make rpc url and web3_client constants
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanpeterson1 committed Apr 9, 2024
1 parent 6d486df commit cfa3202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions verify/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

ATTESTATION_DOC_B64_PATH = "attestation_doc_b64.txt"

RPC_URL = "https://devnet.galadriel.com"
web3_client = Web3(Web3.HTTPProvider(RPC_URL))

def _get_oracle_address(tx_hash: str) -> str:
web3_client = Web3(Web3.HTTPProvider("https://devnet.galadriel.com"))
try:
tx = web3_client.eth.get_transaction(tx_hash)
return tx.to
Expand All @@ -21,7 +22,6 @@ def _get_oracle_address(tx_hash: str) -> str:


def _read_onchain_attestation(oracle_address: str) -> Tuple[str, str]:
web3_client = Web3(Web3.HTTPProvider("https://devnet.galadriel.com"))
with open("oracle_abi.json", "r", encoding="utf-8") as f:
oracle_abi = json.loads(f.read())

Expand Down

0 comments on commit cfa3202

Please sign in to comment.