Skip to content

Commit

Permalink
chore: remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Aug 25, 2024
1 parent a7084a6 commit effa924
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 281 deletions.
279 changes: 0 additions & 279 deletions contracts/wxdai.json

This file was deleted.

7 changes: 5 additions & 2 deletions scripts/erc20_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@

"""This script prints the wxDAI balance of an address in WEI."""

import json
import sys

from web3 import Web3, HTTPProvider

WXDAI_CONTRACT_ADDRESS = "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"
WXDAI_ABI_PATH = "../contracts/wxdai.json"
WXDAI_ABI_PATH = "../trader/packages/valory/contracts/erc20/build/ERC20.json"


def get_balance() -> int:
Expand All @@ -38,7 +39,9 @@ def get_balance() -> int:
def read_abi() -> str:
"""Read and return the wxDAI contract's ABI."""
with open(WXDAI_ABI_PATH) as f:
return f.read()
data = json.loads(f.read())

return data.get('abi', [])


if __name__ == "__main__":
Expand Down

0 comments on commit effa924

Please sign in to comment.