From d1656d655b9d6edbd9b569e52f56498683935c18 Mon Sep 17 00:00:00 2001 From: Akhilleshgoswami Date: Fri, 14 Oct 2022 17:15:08 +0530 Subject: [PATCH 1/2] removed gasPrice check condtion in eth.py file that was cusing Unknown kwargs 'gasPrice' error --- .gitignore | 1 + dydx3/modules/eth.py | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 9ec1712..6209931 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ __pycache__/ *.py[cod] .pytest_cache/ +.idea/ # C extensions *.so diff --git a/dydx3/modules/eth.py b/dydx3/modules/eth.py index 0f864ba..ff6ef49 100644 --- a/dydx3/modules/eth.py +++ b/dydx3/modules/eth.py @@ -120,15 +120,7 @@ def send_eth_transaction( auto_detect_nonce = 'nonce' not in options if auto_detect_nonce: options['nonce'] = self.get_next_nonce(options['from']) - if 'gasPrice' not in options: - try: - options['gasPrice'] = ( - self.web3.eth.gasPrice + DEFAULT_GAS_PRICE_ADDITION - ) - except Exception: - options['gasPrice'] = DEFAULT_GAS_PRICE - if 'value' not in options: - options['value'] = 0 + gas_multiplier = options.pop('gasMultiplier', DEFAULT_GAS_MULTIPLIER) if 'gas' not in options: try: From c7ab54ef88f5ca0849faa29992995428a7eaaa21 Mon Sep 17 00:00:00 2001 From: Akhilleshgoswami <71202802+Akhilleshgoswami@users.noreply.github.com> Date: Wed, 9 Nov 2022 20:19:35 +0530 Subject: [PATCH 2/2] Update eth.py --- dydx3/modules/eth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dydx3/modules/eth.py b/dydx3/modules/eth.py index ff6ef49..5929bf9 100644 --- a/dydx3/modules/eth.py +++ b/dydx3/modules/eth.py @@ -120,7 +120,8 @@ def send_eth_transaction( auto_detect_nonce = 'nonce' not in options if auto_detect_nonce: options['nonce'] = self.get_next_nonce(options['from']) - + if 'value' not in options: + options['value'] = 0 gas_multiplier = options.pop('gasMultiplier', DEFAULT_GAS_MULTIPLIER) if 'gas' not in options: try: