dkg 8.0.0a0__py3-none-any.whl → 8.0.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dkg/constants.py +0 -6
- dkg/providers/blockchain.py +7 -11
- {dkg-8.0.0a0.dist-info → dkg-8.0.0a1.dist-info}/METADATA +1 -1
- {dkg-8.0.0a0.dist-info → dkg-8.0.0a1.dist-info}/RECORD +7 -7
- {dkg-8.0.0a0.dist-info → dkg-8.0.0a1.dist-info}/LICENSE +0 -0
- {dkg-8.0.0a0.dist-info → dkg-8.0.0a1.dist-info}/NOTICE +0 -0
- {dkg-8.0.0a0.dist-info → dkg-8.0.0a1.dist-info}/WHEEL +0 -0
dkg/constants.py
CHANGED
dkg/providers/blockchain.py
CHANGED
@@ -23,7 +23,7 @@ from pathlib import Path
|
|
23
23
|
from typing import Any, Type
|
24
24
|
|
25
25
|
import requests
|
26
|
-
from dkg.constants import BLOCKCHAINS
|
26
|
+
from dkg.constants import BLOCKCHAINS
|
27
27
|
from dkg.exceptions import (
|
28
28
|
AccountMissing,
|
29
29
|
EnvironmentNotSupported,
|
@@ -181,13 +181,15 @@ class BlockchainProvider:
|
|
181
181
|
"account."
|
182
182
|
)
|
183
183
|
|
184
|
-
gas_price = self.gas_price or gas_price or self._get_network_gas_price()
|
185
|
-
|
186
184
|
options = {
|
187
|
-
"gasPrice": gas_price,
|
188
185
|
"gas": gas_limit or contract_function(**args).estimate_gas(),
|
189
186
|
}
|
190
187
|
|
188
|
+
gas_price = self.gas_price or gas_price or self._get_network_gas_price()
|
189
|
+
|
190
|
+
if gas_price is not None:
|
191
|
+
options["gasPrice"] = gas_price
|
192
|
+
|
191
193
|
tx_hash = contract_function(**args).transact(options)
|
192
194
|
tx_receipt = self.w3.eth.wait_for_transaction_receipt(tx_hash)
|
193
195
|
|
@@ -213,12 +215,6 @@ class BlockchainProvider:
|
|
213
215
|
if self.environment == "development":
|
214
216
|
return None
|
215
217
|
|
216
|
-
blockchain_name, _ = self.blockchain_id.split(":")
|
217
|
-
|
218
|
-
default_gas_price = self.w3.to_wei(
|
219
|
-
DEFAULT_GAS_PRICE_GWEI[blockchain_name], "gwei"
|
220
|
-
)
|
221
|
-
|
222
218
|
def fetch_gas_price(oracle_url: str) -> Wei | None:
|
223
219
|
try:
|
224
220
|
response = requests.get(oracle_url)
|
@@ -244,7 +240,7 @@ class BlockchainProvider:
|
|
244
240
|
if gas_price is not None:
|
245
241
|
return gas_price
|
246
242
|
|
247
|
-
return
|
243
|
+
return None
|
248
244
|
|
249
245
|
def _init_contracts(self):
|
250
246
|
for contract in self.abi.keys():
|
@@ -1,7 +1,7 @@
|
|
1
1
|
dkg/__init__.py,sha256=2pZEIrpDODunXXZmcLuKLWUrTrWLlYj10f11VzK5oLs,108
|
2
2
|
dkg/assertion.py,sha256=Sp7mqLHuR588CRZ5JpMVDS2U0yOcwg-qbBl4xYOtRH8,2490
|
3
3
|
dkg/asset.py,sha256=EpKkRHcfzrfyPfw-2S_7OKt6XEpEHLiIMZkvmZVlLzY,29695
|
4
|
-
dkg/constants.py,sha256=
|
4
|
+
dkg/constants.py,sha256=wX63DvazwooCM5gvmyC_3QPco_d0jnQy8cCOpTFE5TU,2163
|
5
5
|
dkg/data/interfaces/AssertionStorage.json,sha256=WNvimMROngLiDmu4t-mn9wNDPPvrvEOkMYFfF8ayui4,4346
|
6
6
|
dkg/data/interfaces/ContentAsset.json,sha256=pLyn7H7D0NuDsxRKFGInENP1gp-sMXmrhSsyy5j14aI,16325
|
7
7
|
dkg/data/interfaces/ContentAssetStorage.json,sha256=08TVURiV1t_oCUIp35mvQTEtJfU6FKCUxMD3xo5tHKU,14579
|
@@ -24,7 +24,7 @@ dkg/network.py,sha256=MjVIWiGLBROXq4uANM_CmFN7x-K7mUg1VpU5Gj1n5_A,2165
|
|
24
24
|
dkg/node.py,sha256=qKPVDfB2DpGP1k5hCNAqtzghu8f1Tsr9OAl2f1a2Bqg,1212
|
25
25
|
dkg/paranet.py,sha256=bL6mC4FANw01c3NuOzJEFXzjGCkj8YjAlz63JjxcFqw,15734
|
26
26
|
dkg/providers/__init__.py,sha256=Z3Wp3ap4U4mnFgMQx8A-oyUdUAKrl3WKxGLYX15aj4s,99
|
27
|
-
dkg/providers/blockchain.py,sha256=
|
27
|
+
dkg/providers/blockchain.py,sha256=HnPSyI6SZqrY8InnWkNpNVAHxgJOsHZjvcb2DZ8aUO4,10964
|
28
28
|
dkg/providers/node_http.py,sha256=9pxUiIRDKlGMNHOqP0SJO178B9MkBekfMJyePVSXOFA,2393
|
29
29
|
dkg/types/__init__.py,sha256=moFFBT-0POVOZShfLPUOZDCVwPhJW9P2ic7SmB3-6TM,550
|
30
30
|
dkg/types/blockchain.py,sha256=hsBpFLgpcEmgODLK0g_cUW1AB69ZZYeX4AcW6wpAMtA,1682
|
@@ -44,8 +44,8 @@ dkg/utils/node_request.py,sha256=FEVo7IiJao55pEgz8gA0k30HNrBhCx3Ts5XbFOWAv5w,532
|
|
44
44
|
dkg/utils/rdf.py,sha256=FF4O4JOftiFVxjr6k8TmxYBcB7dVbpnDOMWk8BvTBRE,2860
|
45
45
|
dkg/utils/string_transformations.py,sha256=UtoXbuy4Y0ontbX6l9HwcrZ9tEXJEith00hW7pz4sKg,971
|
46
46
|
dkg/utils/ual.py,sha256=g7PFyS4Sbwjmwkq-eB20uRULEC2wlPGZr31BVQjs5OQ,1569
|
47
|
-
dkg-8.0.
|
48
|
-
dkg-8.0.
|
49
|
-
dkg-8.0.
|
50
|
-
dkg-8.0.
|
51
|
-
dkg-8.0.
|
47
|
+
dkg-8.0.0a1.dist-info/LICENSE,sha256=Dr70w2zcW8-jrPGlpTTTlJPL8lR4j2zpDD32tdEFgjY,11375
|
48
|
+
dkg-8.0.0a1.dist-info/METADATA,sha256=Ng0_5JZwxKqDB9qz4Cw7BoX3jZ9mSRsMCHakec8YUP4,10608
|
49
|
+
dkg-8.0.0a1.dist-info/NOTICE,sha256=Rk5toFR2ZqPwVZ3P_P4wE6U1xCnWR9KD3rNBqfPY7h8,368
|
50
|
+
dkg-8.0.0a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
51
|
+
dkg-8.0.0a1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|