From 47b7fa7eef969f271699a02a41b247d80212d97d Mon Sep 17 00:00:00 2001 From: nolash Date: Mon, 18 Oct 2021 14:23:54 +0200 Subject: [PATCH] Replace crypto_dev_signer with funga --- chainlib/eth/address.py | 2 +- chainlib/eth/cli/wallet.py | 2 +- chainlib/eth/gas.py | 2 +- chainlib/eth/pytest/fixtures_ethtester.py | 4 ++-- chainlib/eth/pytest/fixtures_signer.py | 1 - chainlib/eth/runnable/balance.py | 2 +- chainlib/eth/runnable/count.py | 4 ++-- chainlib/eth/runnable/encode.py | 4 ++-- chainlib/eth/runnable/info.py | 2 +- chainlib/eth/runnable/raw.py | 4 ++-- chainlib/eth/tx.py | 8 +++++--- chainlib/eth/unittest/base.py | 4 ++-- chainlib/eth/unittest/ethtester.py | 4 ++-- requirements.txt | 4 ++-- setup.cfg | 2 +- 15 files changed, 25 insertions(+), 24 deletions(-) diff --git a/chainlib/eth/address.py b/chainlib/eth/address.py index 151fc9e..8bcbe5a 100644 --- a/chainlib/eth/address.py +++ b/chainlib/eth/address.py @@ -4,7 +4,7 @@ from hexathon import ( strip_0x, uniform, ) -from crypto_dev_signer.encoding import ( +from funga.eth.encoding import ( is_address, is_checksum_address, to_checksum_address, diff --git a/chainlib/eth/cli/wallet.py b/chainlib/eth/cli/wallet.py index 94c3f78..a0d664e 100644 --- a/chainlib/eth/cli/wallet.py +++ b/chainlib/eth/cli/wallet.py @@ -1,5 +1,5 @@ # external imports -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer +from funga.eth.signer import EIP155Signer from chainlib.cli import Wallet as BaseWallet # local imports diff --git a/chainlib/eth/gas.py b/chainlib/eth/gas.py index 8295c73..6b76a13 100644 --- a/chainlib/eth/gas.py +++ b/chainlib/eth/gas.py @@ -6,7 +6,7 @@ from hexathon import ( add_0x, strip_0x, ) -from crypto_dev_signer.eth.transaction import EIP155Transaction +from funga.eth.transaction import EIP155Transaction # local imports from chainlib.fee import FeeOracle diff --git a/chainlib/eth/pytest/fixtures_ethtester.py b/chainlib/eth/pytest/fixtures_ethtester.py index da593c9..53ad810 100644 --- a/chainlib/eth/pytest/fixtures_ethtester.py +++ b/chainlib/eth/pytest/fixtures_ethtester.py @@ -5,8 +5,8 @@ import logging # external imports import eth_tester import pytest -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer -from crypto_dev_signer.keystore.dict import DictKeystore +from funga.eth.signer import EIP155Signer +from funga.eth.keystore.dict import DictKeystore # local imports from chainlib.eth.unittest.base import * diff --git a/chainlib/eth/pytest/fixtures_signer.py b/chainlib/eth/pytest/fixtures_signer.py index 484a52b..8131f09 100644 --- a/chainlib/eth/pytest/fixtures_signer.py +++ b/chainlib/eth/pytest/fixtures_signer.py @@ -3,7 +3,6 @@ # external imports import pytest -#from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer @pytest.fixture(scope='function') diff --git a/chainlib/eth/runnable/balance.py b/chainlib/eth/runnable/balance.py index bfb205f..f605b22 100644 --- a/chainlib/eth/runnable/balance.py +++ b/chainlib/eth/runnable/balance.py @@ -24,7 +24,7 @@ from chainlib.eth.gas import ( balance, ) from chainlib.chain import ChainSpec -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer +from funga.eth.signer import EIP155Signer logging.basicConfig(level=logging.WARNING) logg = logging.getLogger() diff --git a/chainlib/eth/runnable/count.py b/chainlib/eth/runnable/count.py index 48763ec..5ae76f8 100644 --- a/chainlib/eth/runnable/count.py +++ b/chainlib/eth/runnable/count.py @@ -15,8 +15,8 @@ from chainlib.eth.connection import EthHTTPConnection from chainlib.eth.tx import count from chainlib.chain import ChainSpec from chainlib.jsonrpc import IntSequenceGenerator -from crypto_dev_signer.keystore.dict import DictKeystore -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer +from funga.eth.keystore.dict import DictKeystore +from funga.eth.signer import ReferenceSigner as EIP155Signer from hexathon import add_0x logging.basicConfig(level=logging.WARNING) diff --git a/chainlib/eth/runnable/encode.py b/chainlib/eth/runnable/encode.py index af7680c..0efaffa 100644 --- a/chainlib/eth/runnable/encode.py +++ b/chainlib/eth/runnable/encode.py @@ -13,8 +13,8 @@ import sha3 # external imports import chainlib.eth.cli from chainlib.eth.cli.encode import CLIEncoder -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer -from crypto_dev_signer.keystore.dict import DictKeystore +from funga.eth.signer import ReferenceSigner as EIP155Signer +from funga.eth.keystore.dict import DictKeystore from hexathon import ( add_0x, strip_0x, diff --git a/chainlib/eth/runnable/info.py b/chainlib/eth/runnable/info.py index 9ee0458..f4a4f53 100644 --- a/chainlib/eth/runnable/info.py +++ b/chainlib/eth/runnable/info.py @@ -16,7 +16,7 @@ from hexathon import ( even, ) import sha3 -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer +from funga.eth.signer import EIP155Signer # local imports from chainlib.eth.address import AddressChecksum diff --git a/chainlib/eth/runnable/raw.py b/chainlib/eth/runnable/raw.py index 784d537..0571b71 100644 --- a/chainlib/eth/runnable/raw.py +++ b/chainlib/eth/runnable/raw.py @@ -11,8 +11,8 @@ import urllib # external imports import chainlib.eth.cli -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer -from crypto_dev_signer.keystore.dict import DictKeystore +from funga.eth.signer import EIP155Signer +from funga.eth.keystore.dict import DictKeystore from hexathon import ( add_0x, strip_0x, diff --git a/chainlib/eth/tx.py b/chainlib/eth/tx.py index b0e0c6f..fcc04d5 100644 --- a/chainlib/eth/tx.py +++ b/chainlib/eth/tx.py @@ -13,9 +13,11 @@ from hexathon import ( ) from rlp import decode as rlp_decode from rlp import encode as rlp_encode -from crypto_dev_signer.eth.transaction import EIP155Transaction -from crypto_dev_signer.encoding import public_key_to_address -from crypto_dev_signer.eth.encoding import chain_id_to_v +from funga.eth.transaction import EIP155Transaction +from funga.eth.encoding import ( + public_key_to_address, + chain_id_to_v, + ) from potaahto.symbols import snake_and_camel from chainlib.hash import keccak256_hex_to_hex from chainlib.status import Status diff --git a/chainlib/eth/unittest/base.py b/chainlib/eth/unittest/base.py index 0ae8be0..ea2d6ce 100644 --- a/chainlib/eth/unittest/base.py +++ b/chainlib/eth/unittest/base.py @@ -25,8 +25,8 @@ from hexathon import ( ) from chainlib.eth.tx import receipt -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer -from crypto_dev_signer.encoding import private_key_to_address +from funga.eth.signer import EIP155Signer +from funga.eth.encoding import private_key_to_address logg = logging.getLogger().getChild(__name__) diff --git a/chainlib/eth/unittest/ethtester.py b/chainlib/eth/unittest/ethtester.py index 1c54c0b..ad450cb 100644 --- a/chainlib/eth/unittest/ethtester.py +++ b/chainlib/eth/unittest/ethtester.py @@ -5,8 +5,8 @@ import logging # external imports import eth_tester -from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer -from crypto_dev_signer.keystore.dict import DictKeystore +from funga.eth.signer import EIP155Signer +from funga.eth.keystore.dict import DictKeystore from hexathon import ( strip_0x, add_0x, diff --git a/requirements.txt b/requirements.txt index 3ba976b..d9daa70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -crypto-dev-signer>=0.4.15rc2,<=0.4.15 +funga>=0.5.1a1,<0.6.0 pysha3==1.0.2 hexathon~=0.0.1a8 websocket-client==0.57.0 potaahto~=0.0.1a1 -chainlib==0.0.9rc1 +chainlib==0.0.10a2 confini>=0.4.1a1,<0.5.0 diff --git a/setup.cfg b/setup.cfg index 43e28c4..88ee2c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainlib-eth -version = 0.0.9rc5 +version = 0.0.10a1 description = Ethereum implementation of the chainlib interface author = Louis Holbrook author_email = dev@holbrook.no