eth-prototype 1.0.0__tar.gz → 1.0.1__tar.gz
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.
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/.github/workflows/test.yaml +1 -1
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/PKG-INFO +3 -3
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/setup.cfg +2 -2
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/eth_prototype.egg-info/PKG-INFO +3 -3
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/eth_prototype.egg-info/requires.txt +2 -2
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/ethproto/w3wrappers.py +9 -5
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/ethproto/wrappers.py +0 -4
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tox.ini +3 -4
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/.coveragerc +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/.github/workflows/publish.yaml +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/.gitignore +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/.isort.cfg +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/.pre-commit-config.yaml +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/.readthedocs.yml +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/AUTHORS.rst +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/CHANGELOG.rst +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/LICENSE.txt +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/README.md +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/Makefile +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/_static/.gitignore +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/authors.rst +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/changelog.rst +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/conf.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/index.rst +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/license.rst +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/readme.rst +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/docs/requirements.txt +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/pyproject.toml +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/setup.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/eth_prototype.egg-info/SOURCES.txt +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/eth_prototype.egg-info/dependency_links.txt +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/eth_prototype.egg-info/not-zip-safe +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/eth_prototype.egg-info/top_level.txt +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/ethproto/__init__.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/ethproto/build_artifacts.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/ethproto/contracts.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/ethproto/defender_relay.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/src/ethproto/wadray.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/conftest.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/README.md +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/artifacts2/TestCurrency.sol/TestCurrency.json +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/Count.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/Counter.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/CounterUpgradeable.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/CounterUpgradeableWithLibrary.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/CounterWithLibrary.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/Datatypes.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/TestCurrency.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/TestCurrencyUUPS.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/TestNFT.sol +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/hardhat.config.js +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/package-lock.json +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/package.json +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/test_build_artifacts.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/test_contracts.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/test_defender.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/test_time_control.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/test_w3.py +0 -0
- {eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/test_wadray.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: eth-prototype
|
3
|
-
Version: 1.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
|
@@ -20,7 +20,7 @@ Requires-Dist: requests
|
|
20
20
|
Requires-Dist: hexbytes
|
21
21
|
Requires-Dist: importlib-metadata; python_version < "3.8"
|
22
22
|
Provides-Extra: web3
|
23
|
-
Requires-Dist: web3; extra == "web3"
|
23
|
+
Requires-Dist: web3>=6; extra == "web3"
|
24
24
|
Provides-Extra: defender
|
25
25
|
Requires-Dist: boto3; extra == "defender"
|
26
26
|
Provides-Extra: gmpy2
|
@@ -31,7 +31,7 @@ Requires-Dist: pytest; extra == "testing"
|
|
31
31
|
Requires-Dist: gmpy2; extra == "testing"
|
32
32
|
Requires-Dist: pytest-cov; extra == "testing"
|
33
33
|
Provides-Extra: testing-w3
|
34
|
-
Requires-Dist: web3[tester]; extra == "testing-w3"
|
34
|
+
Requires-Dist: web3[tester]>=6; extra == "testing-w3"
|
35
35
|
Requires-Dist: setuptools; extra == "testing-w3"
|
36
36
|
Requires-Dist: pytest; extra == "testing-w3"
|
37
37
|
Requires-Dist: pytest-cov; extra == "testing-w3"
|
@@ -35,7 +35,7 @@ exclude =
|
|
35
35
|
|
36
36
|
[options.extras_require]
|
37
37
|
web3 =
|
38
|
-
web3
|
38
|
+
web3>=6
|
39
39
|
defender =
|
40
40
|
boto3
|
41
41
|
gmpy2 =
|
@@ -46,7 +46,7 @@ testing =
|
|
46
46
|
gmpy2
|
47
47
|
pytest-cov
|
48
48
|
testing-w3 =
|
49
|
-
web3[tester]
|
49
|
+
web3[tester]>=6
|
50
50
|
setuptools
|
51
51
|
pytest
|
52
52
|
pytest-cov
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: eth-prototype
|
3
|
-
Version: 1.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
|
@@ -20,7 +20,7 @@ Requires-Dist: requests
|
|
20
20
|
Requires-Dist: hexbytes
|
21
21
|
Requires-Dist: importlib-metadata; python_version < "3.8"
|
22
22
|
Provides-Extra: web3
|
23
|
-
Requires-Dist: web3; extra == "web3"
|
23
|
+
Requires-Dist: web3>=6; extra == "web3"
|
24
24
|
Provides-Extra: defender
|
25
25
|
Requires-Dist: boto3; extra == "defender"
|
26
26
|
Provides-Extra: gmpy2
|
@@ -31,7 +31,7 @@ Requires-Dist: pytest; extra == "testing"
|
|
31
31
|
Requires-Dist: gmpy2; extra == "testing"
|
32
32
|
Requires-Dist: pytest-cov; extra == "testing"
|
33
33
|
Provides-Extra: testing-w3
|
34
|
-
Requires-Dist: web3[tester]; extra == "testing-w3"
|
34
|
+
Requires-Dist: web3[tester]>=6; extra == "testing-w3"
|
35
35
|
Requires-Dist: setuptools; extra == "testing-w3"
|
36
36
|
Requires-Dist: pytest; extra == "testing-w3"
|
37
37
|
Requires-Dist: pytest-cov; extra == "testing-w3"
|
@@ -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.
|
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.
|
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
|
372
|
-
raise RevertError(
|
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
|
@@ -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
|
|
@@ -4,13 +4,12 @@
|
|
4
4
|
|
5
5
|
[tox]
|
6
6
|
minversion = 3.15
|
7
|
-
envlist = {
|
7
|
+
envlist = {py39,py310}, {py39,py310}-w3
|
8
8
|
|
9
9
|
[gh-actions]
|
10
10
|
python =
|
11
|
-
3.7: py37, py37-w3
|
12
|
-
3.8: py38, py38-w3
|
13
11
|
3.9: py39, py39-w3
|
12
|
+
3.10: py310, py310-w3
|
14
13
|
|
15
14
|
[testenv]
|
16
15
|
description = invoke pytest to run automated tests
|
@@ -27,7 +26,7 @@ commands =
|
|
27
26
|
pytest {posargs}
|
28
27
|
|
29
28
|
|
30
|
-
[testenv:{
|
29
|
+
[testenv:{py39,py310}-w3]
|
31
30
|
description = invoke pytest to run automated tests
|
32
31
|
isolated_build = True
|
33
32
|
setenv =
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/CounterUpgradeable.sol
RENAMED
File without changes
|
File without changes
|
{eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/CounterWithLibrary.sol
RENAMED
File without changes
|
File without changes
|
{eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/TestCurrency.sol
RENAMED
File without changes
|
{eth-prototype-1.0.0 → eth_prototype-1.0.1}/tests/hardhat-project/contracts/TestCurrencyUUPS.sol
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|