diff --git a/constants/agni.py b/constants/agni.py index f4f88c3..093ac69 100644 --- a/constants/agni.py +++ b/constants/agni.py @@ -22,12 +22,12 @@ MAX_TICK_RANGE=887272 START_BLOCK=72629606 -usde_cmeth_025 = "0x95D39c45668D59141dc5bCC940e6C191f1ebB98c" -usde_usdt_001 = "0x36A7aff497eeF6a9cd7d0e7bc243793fcb3E57E2" -susde_usde_005 = "0x07277F7c1567b5324aA50a3d2F1F003E2287fBfc" -usdc_usde_001 = "0xBCf99c834E65E8a58090E20eDc058279317865BD" -agni_position_manager = "0x218bf598D1453383e2F4AA7b14fFB9BfB102D637" -usde_address = '0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34' +usde_cmeth_025 = Web3.to_checksum_address("0x95D39c45668D59141dc5bCC940e6C191f1ebB98c") +usde_usdt_001 = Web3.to_checksum_address("0x36A7aff497eeF6a9cd7d0e7bc243793fcb3E57E2") +susde_usde_005 = Web3.to_checksum_address("0x07277F7c1567b5324aA50a3d2F1F003E2287fBfc") +usdc_usde_001 = Web3.to_checksum_address("0xBCf99c834E65E8a58090E20eDc058279317865BD") +agni_position_manager = Web3.to_checksum_address("0x218bf598D1453383e2F4AA7b14fFB9BfB102D637") +usde_address = Web3.to_checksum_address('0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34') diff --git a/integrations/agni_integration.py b/integrations/agni_integration.py index 2d2d2c2..6ea57ac 100644 --- a/integrations/agni_integration.py +++ b/integrations/agni_integration.py @@ -58,7 +58,7 @@ def get_block_balances( block_data: Dict[int, Dict[ChecksumAddress, float]] = {} for block in blocks: - user_data = {} + user_data:Dict[ChecksumAddress, float] = {} for pool_info in pool_info_list: pool_user_balance = get_agni_all_user_balance(pool_info, pool_info_list[pool_info], block) for user in pool_user_balance: diff --git a/utils/agni.py b/utils/agni.py index dc8400d..c0b8020 100644 --- a/utils/agni.py +++ b/utils/agni.py @@ -124,23 +124,23 @@ def calculate_agni_tokens(tick, tick_lower, tick_upper, sqrt_ratio_x96, liquidit def get_agni_all_user_balance(pool: ChecksumAddress, users: Dict[ChecksumAddress, Set[int]], - block=w3_mantle.eth.get_block_number()): + block=w3_mantle.eth.get_block_number()) -> Dict[ChecksumAddress, float]: try: if block < START_BLOCK: return {} - if pool == Web3.to_checksum_address(usde_cmeth_025): + if pool == usde_cmeth_025: contract = usde_cmeth_025_contract - elif pool == Web3.to_checksum_address(usde_usdt_001): + elif pool == usde_usdt_001: contract = usde_usdt_001_contract - elif pool == Web3.to_checksum_address(susde_usde_005): + elif pool == susde_usde_005: contract = susde_usde_005_contract - elif pool == Web3.to_checksum_address(usdc_usde_001): + elif pool == usdc_usde_001: contract = usdc_usde_001_contract else: raise Exception("Unknown pool") print(users) - all_user_total_balances = {} + all_user_total_balances:Dict[ChecksumAddress, float] = {} if len(users) == 0: return all_user_total_balances