From 0ebd1b8499d22b1c83a1051b77a461841e1a4f0d Mon Sep 17 00:00:00 2001 From: Ma Cong Date: Wed, 24 Apr 2024 21:39:08 +0800 Subject: [PATCH] fix: zks_l1_chain_id not returning int type --- tests/integration/test_zksync_web3.py | 2 +- zksync2/module/zksync_module.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_zksync_web3.py b/tests/integration/test_zksync_web3.py index e502516..1729414 100644 --- a/tests/integration/test_zksync_web3.py +++ b/tests/integration/test_zksync_web3.py @@ -770,7 +770,7 @@ def test_get_all_account_balances(self): # @skip("Integration test, used for develop purposes only") def test_get_l1_chain_id(self): - l1_chain_id = self.web3.zksync.zks_l1_chain_id() + self.assertIsInstance(self.web3.zksync.zks_l1_chain_id(), int) # @skip("Integration test, used for develop purposes only") def test_get_bridge_addresses(self): diff --git a/zksync2/module/zksync_module.py b/zksync2/module/zksync_module.py index 3bb7983..4768396 100644 --- a/zksync2/module/zksync_module.py +++ b/zksync2/module/zksync_module.py @@ -525,7 +525,7 @@ def zks_get_token_price(self, token_address: TokenAddress) -> Decimal: return self._zks_get_token_price(token_address) def zks_l1_chain_id(self) -> int: - return self._zks_l1_chain_id() + return int(self._zks_l1_chain_id(), 16) def zks_get_balance( self,