diff --git a/bin/libbfa/__init__.py b/bin/libbfa/__init__.py index 61f8f9668291373f927f2c9de1f4fbfcda5b7cea..a57c900abb1b1d2f1f6d1ce945a8f914c6e1f35f 100755 --- a/bin/libbfa/__init__.py +++ b/bin/libbfa/__init__.py @@ -181,20 +181,20 @@ class Account: signed = web3.Web3().eth.account.sign_transaction(tx, self.key) return signed - # if kwargs has extragas=50000 then we add that number to the amount - # of gas for the transaction def calculate_tx_details(self, w3: web3.Web3, *args, **kwargs) -> dict: - # Nonce may have increase on the network without us noticing + # if kwargs has extragas=50000 then we add that number to the amount + # of gas for the transaction + afunction = kwargs.get('function') + # Nonce may have increased on the network without us noticing # or past transactions may not yet have been mined (and a flooded # txpool). # This is a resonable fix (try not to send too many transactions) # If you use waitForTransactionReceipt() between each transaction # you will not have problems because of this. - afunction = kwargs.get('function') self.nonce = max(self.nonce, w3.eth.getTransactionCount(self.address)) # Set minimum gasPrice to 1 Gwei, but allow more if the network says so. details = { - 'chainId': w3.eth.chain_id(), + 'chainId': w3.eth.chain_id, 'gasPrice': min(w3.toWei('1', 'gwei'), w3.eth.gasPrice), 'nonce': self.nonce, 'from': self.address, diff --git a/bin/libbfa/requirements.txt b/bin/libbfa/requirements.txt index 08b1a03bf0a6d5cefc84a40351ed873cffa9e184..4a9410712db408ee9f1b73e52d3bf6e81f3eefcc 100644 --- a/bin/libbfa/requirements.txt +++ b/bin/libbfa/requirements.txt @@ -2,3 +2,4 @@ web3 rusty-rlp ecdsa Crypto +dnspython