eth-prototype 1.0.0__py3-none-any.whl → 1.0.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eth-prototype
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Prototype Ethereum Smart Contracts in Python
5
5
  Home-page: https://github.com/gnarvaja/eth-prototype
6
6
  Author: Guillermo M. Narvaja
@@ -29,13 +29,13 @@ Requires-Dist: pytest ; extra == 'testing'
29
29
  Requires-Dist: gmpy2 ; extra == 'testing'
30
30
  Requires-Dist: pytest-cov ; extra == 'testing'
31
31
  Provides-Extra: testing-w3
32
- Requires-Dist: web3[tester] ; extra == 'testing-w3'
32
+ Requires-Dist: web3[tester] >=6 ; extra == 'testing-w3'
33
33
  Requires-Dist: setuptools ; extra == 'testing-w3'
34
34
  Requires-Dist: pytest ; extra == 'testing-w3'
35
35
  Requires-Dist: pytest-cov ; extra == 'testing-w3'
36
36
  Requires-Dist: boto3 ; extra == 'testing-w3'
37
37
  Provides-Extra: web3
38
- Requires-Dist: web3 ; extra == 'web3'
38
+ Requires-Dist: web3 >=6 ; extra == 'web3'
39
39
 
40
40
  # eth-prototype
41
41
 
@@ -0,0 +1,13 @@
1
+ ethproto/__init__.py,sha256=YWkAFysBp4tZjLWWB2FFmp5yG23pUYhQvgQW9b3soXs,579
2
+ ethproto/build_artifacts.py,sha256=FzgUO6ierhCVBKHRxTkgrRx4AaAL6G5ql5Yzx_oTTmg,5578
3
+ ethproto/contracts.py,sha256=rNVbCK1hURy7lWKhzSdXgVWo3wx9O_Ghk-6PfgOsRNk,18662
4
+ ethproto/defender_relay.py,sha256=05A8TfRZwiBhCpo924Pf9CjfKSir2Wvgg1p_asFxJbw,1777
5
+ ethproto/w3wrappers.py,sha256=MrRf7GLFgDhKYKiTctjNONZHQNTo6nVzqPzprv0BU2w,20607
6
+ ethproto/wadray.py,sha256=JBsu5KcyU9k70bDK03T2IY6qPVFO30WbYPhwrAHdXao,8262
7
+ ethproto/wrappers.py,sha256=9qDwRDOXw3wquzvGfIsub-VPWm98GBWP7dHLFOUPWzg,17307
8
+ eth_prototype-1.0.1.dist-info/AUTHORS.rst,sha256=Ui-05yYXtDZxna6o1yNcfdm8Jt68UIDQ01osiLxlYlU,95
9
+ eth_prototype-1.0.1.dist-info/LICENSE.txt,sha256=U_Q6_nDYDwZPIuhttHi37hXZ2qU2-HlV2geo9hzHXFw,1087
10
+ eth_prototype-1.0.1.dist-info/METADATA,sha256=TE-gm2NZKjLg7mgbihmuddG0XwORT7DrAM8UqtLPMtg,2669
11
+ eth_prototype-1.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
12
+ eth_prototype-1.0.1.dist-info/top_level.txt,sha256=Dl0X7m6N1hxeo4JpGpSNqWC2gtsN0731g-DL1J0mpjc,9
13
+ eth_prototype-1.0.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
ethproto/w3wrappers.py CHANGED
@@ -8,7 +8,7 @@ from eth_account.signers.base import BaseAccount
8
8
  from eth_utils.abi import event_abi_to_log_topic
9
9
  from hexbytes import HexBytes
10
10
  from web3.contract import Contract
11
- from web3.exceptions import ExtraDataLengthError
11
+ from web3.exceptions import ContractLogicError, ExtraDataLengthError
12
12
  from web3.middleware import geth_poa_middleware
13
13
 
14
14
  from .build_artifacts import ArtifactLibrary
@@ -97,7 +97,7 @@ def transact(provider, function, tx_kwargs):
97
97
  else: # it's a string, I try to get the PK from the environment
98
98
  from_ = provider.address_book.get_signer_account(from_)
99
99
  tx_kwargs["from"] = from_.address
100
- tx = function.buildTransaction(
100
+ tx = function.build_transaction(
101
101
  {
102
102
  **tx_kwargs,
103
103
  **{"nonce": provider.w3.eth.get_transaction_count(from_.address)},
@@ -109,7 +109,7 @@ def transact(provider, function, tx_kwargs):
109
109
  from .defender_relay import send_transaction
110
110
 
111
111
  tx_kwargs = {**provider.tx_kwargs, **tx_kwargs}
112
- tx = function.buildTransaction(tx_kwargs)
112
+ tx = function.build_transaction(tx_kwargs)
113
113
  return send_transaction(tx)
114
114
 
115
115
  return provider.w3.eth.wait_for_transaction_receipt(tx_hash)
@@ -368,8 +368,12 @@ class W3ETHCall(ETHCall):
368
368
  return ReceiptWrapper(receipt, wrapper.contract)
369
369
 
370
370
  def _handle_exception(self, err):
371
- if str(err).startswith("execution reverted: "):
372
- raise RevertError(str(err)[len("execution reverted: ") :])
371
+ if isinstance(err, ContractLogicError):
372
+ raise RevertError(
373
+ err.message[len("execution reverted: ") :]
374
+ if err.message and err.message.startswith("execution reverted: ")
375
+ else err.message
376
+ )
373
377
  super()._handle_exception(err)
374
378
 
375
379
  @classmethod
ethproto/wrappers.py CHANGED
@@ -49,10 +49,6 @@ def auto_register_provider(provider_key):
49
49
  from .w3wrappers import register_w3_provider
50
50
 
51
51
  register_w3_provider()
52
- elif provider_key == "brownie":
53
- from .brwrappers import BrownieProvider
54
-
55
- register_provider("brownie", BrownieProvider())
56
52
  else:
57
53
  raise RuntimeError(f"Unknown provider {provider_key}")
58
54
 
@@ -1,13 +0,0 @@
1
- ethproto/__init__.py,sha256=YWkAFysBp4tZjLWWB2FFmp5yG23pUYhQvgQW9b3soXs,579
2
- ethproto/build_artifacts.py,sha256=FzgUO6ierhCVBKHRxTkgrRx4AaAL6G5ql5Yzx_oTTmg,5578
3
- ethproto/contracts.py,sha256=rNVbCK1hURy7lWKhzSdXgVWo3wx9O_Ghk-6PfgOsRNk,18662
4
- ethproto/defender_relay.py,sha256=05A8TfRZwiBhCpo924Pf9CjfKSir2Wvgg1p_asFxJbw,1777
5
- ethproto/w3wrappers.py,sha256=Z4REzEE56pv2IYbV1cNIh6xfYj24oE1llmI9Nyh0wgs,20445
6
- ethproto/wadray.py,sha256=JBsu5KcyU9k70bDK03T2IY6qPVFO30WbYPhwrAHdXao,8262
7
- ethproto/wrappers.py,sha256=gUB4ml9jFZNXbmOnUJH2OdGz7G7qxHS9si7a64DpCTE,17448
8
- eth_prototype-1.0.0.dist-info/AUTHORS.rst,sha256=Ui-05yYXtDZxna6o1yNcfdm8Jt68UIDQ01osiLxlYlU,95
9
- eth_prototype-1.0.0.dist-info/LICENSE.txt,sha256=U_Q6_nDYDwZPIuhttHi37hXZ2qU2-HlV2geo9hzHXFw,1087
10
- eth_prototype-1.0.0.dist-info/METADATA,sha256=cW-aeuxBJW1QpvCQ6tZgAUN_Qm9oXAqrADsfC3pT7TU,2661
11
- eth_prototype-1.0.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
- eth_prototype-1.0.0.dist-info/top_level.txt,sha256=Dl0X7m6N1hxeo4JpGpSNqWC2gtsN0731g-DL1J0mpjc,9
13
- eth_prototype-1.0.0.dist-info/RECORD,,