From 9b3c100e8b729f34f7f02557edbba40a4a9bdc40 Mon Sep 17 00:00:00 2001 From: badrogger Date: Sun, 18 Jun 2023 15:50:17 +0000 Subject: [PATCH] Update skale.py to 6.0dev0 --- requirements.txt | 2 +- tests/docker_test.py | 4 ++-- tests/processor_test.py | 4 ++-- tests/utils/account.py | 6 +++--- transaction_manager/eth.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/requirements.txt b/requirements.txt index 05c9b8ee..f748eb9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -skale.py==5.8dev4 +skale.py==6.0dev0 diff --git a/tests/docker_test.py b/tests/docker_test.py index 412301fb..4ce6ff8b 100644 --- a/tests/docker_test.py +++ b/tests/docker_test.py @@ -51,8 +51,8 @@ def make_tx(w3, wallet, failed=False): number = 3 if failed else 4 return tester.functions.setOnlyEven( number - ).buildTransaction({ - 'gasPrice': w3.eth.gasPrice, + ).build_transaction({ + 'gasPrice': w3.eth.gas_price, 'gas': DEFAULT_GAS, 'from': wallet.address }) diff --git a/tests/processor_test.py b/tests/processor_test.py index af6f48cd..48be47a5 100644 --- a/tests/processor_test.py +++ b/tests/processor_test.py @@ -31,8 +31,8 @@ def make_tx(w3, wallet, failed=False): number = 3 if failed else 4 return tester.functions.setOnlyEven( number - ).buildTransaction({ - 'gasPrice': w3.eth.gasPrice, + ).build_transaction({ + 'gasPrice': w3.eth.gas_price, 'gas': DEFAULT_GAS, 'from': wallet.address }) diff --git a/tests/utils/account.py b/tests/utils/account.py index 8894fe34..2c167461 100644 --- a/tests/utils/account.py +++ b/tests/utils/account.py @@ -19,11 +19,11 @@ def send_eth( 'to': address, 'value': amount, 'gas': 8000000, - 'gasPrice': w3.eth.gasPrice + 'gasPrice': w3.eth.gas_price } signed_txn = wallet.sign(tx) - h = w3.eth.sendRawTransaction(signed_txn.rawTransaction) - w3.eth.waitForTransactionReceipt(h, timeout=60) + h = w3.eth.send_raw_transaction(signed_txn.rawTransaction) + w3.eth.wait_for_transaction_receipt(h, timeout=60) def generate_address(w3: Web3) -> str: diff --git a/transaction_manager/eth.py b/transaction_manager/eth.py index b7d1e0eb..54d493c8 100644 --- a/transaction_manager/eth.py +++ b/transaction_manager/eth.py @@ -86,7 +86,7 @@ def chain_id(self) -> int: return self.w3.eth.chain_id def get_balance(self, address: str) -> int: - checksum_addres = self.w3.toChecksumAddress(address) + checksum_addres = self.w3.to_checksum_address(address) return self.w3.eth.get_balance(checksum_addres) TX_ATTRS = [ @@ -190,7 +190,7 @@ def send_tx(self, signed_tx: Dict) -> str: return tx_hash def get_nonce(self, address: str) -> int: - checksum_addres = self.w3.toChecksumAddress(address) + checksum_addres = self.w3.to_checksum_address(address) return self.w3.eth.get_transaction_count(checksum_addres) def wait_for_blocks(