diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 2e64be08..e0eeed9e 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -386,14 +386,14 @@ async def asyncSetUp(self) -> None: async def test_approve_deposit(self): token = Token( - address=Web3.toChecksumAddress('0xeb8f08a975ab53e34d8a0330e0d34de942c95926'), + address=Web3.to_checksum_address('0xeb8f08a975ab53e34d8a0330e0d34de942c95926'), id=20, symbol='USDC', decimals=18) assert await self.ethereum_provider.approve_deposit(token, Decimal(1)) async def test_full_exit(self): token = Token( - address=Web3.toChecksumAddress('0xD2084eA2AE4bBE1424E4fe3CDE25B713632fb988'), + address=Web3.to_checksum_address('0xD2084eA2AE4bBE1424E4fe3CDE25B713632fb988'), id=20, symbol='BAT', decimals=18) assert await self.ethereum_provider.full_exit(token, 6713) @@ -410,7 +410,7 @@ async def test_full_exit_nft(self): """ account_id = 36357 token = Token( - address=Web3.toChecksumAddress('0x5e71f0f9b891f22d79ff8697dd4e3e0db371cda5'), + address=Web3.to_checksum_address('0x5e71f0f9b891f22d79ff8697dd4e3e0db371cda5'), id=70848, symbol='NFT-70848', decimals=0 @@ -419,7 +419,7 @@ async def test_full_exit_nft(self): async def test_is_deposit_approved(self): token = Token( - address=Web3.toChecksumAddress('0xD2084eA2AE4bBE1424E4fe3CDE25B713632fb988'), + address=Web3.to_checksum_address('0xD2084eA2AE4bBE1424E4fe3CDE25B713632fb988'), id=20, symbol='BAT', decimals=18) assert await self.ethereum_provider.is_deposit_approved(token, 1) diff --git a/zksync_sdk/types/responses.py b/zksync_sdk/types/responses.py index 7782d6da..ba5ad5c7 100644 --- a/zksync_sdk/types/responses.py +++ b/zksync_sdk/types/responses.py @@ -28,7 +28,7 @@ class NFT(Token): content_hash: str creator_address: str serial_id: int - decimals = 0 + decimals: int = 0 def decimal_amount(self, amount: int) -> Decimal: return Decimal(amount) diff --git a/zksync_sdk/zksync.py b/zksync_sdk/zksync.py index 4a17df44..b85e6e16 100644 --- a/zksync_sdk/zksync.py +++ b/zksync_sdk/zksync.py @@ -27,7 +27,7 @@ def _call_method(self, method_name, *args, amount=None, **kwargs): transaction.update({'nonce': self.web3.eth.get_transaction_count(self.account.address)}) signed_tx = self.account.sign_transaction(transaction) txn_hash = self.web3.eth.send_raw_transaction(signed_tx.rawTransaction) - txn_receipt = self.web3.eth.waitForTransactionReceipt(txn_hash) + txn_receipt = self.web3.eth.wait_for_transaction_receipt(txn_hash) return txn_receipt diff --git a/zksync_sdk/zksync_provider/v01.py b/zksync_sdk/zksync_provider/v01.py index a539bcbb..7ffbc96b 100644 --- a/zksync_sdk/zksync_provider/v01.py +++ b/zksync_sdk/zksync_provider/v01.py @@ -28,7 +28,7 @@ async def submit_tx(self, tx: EncodedTx, signature: Union[Optional[TxEthSignatur async def get_tokens(self) -> Tokens: data = await self.provider.request("tokens", None) - tokens = [Token(address=Web3.toChecksumAddress(token['address']), + tokens = [Token(address=Web3.to_checksum_address(token['address']), id=token['id'], symbol=token['symbol'], decimals=token['decimals']