Add missing package file encode

This commit is contained in:
nolash 2021-08-28 12:43:53 +02:00
parent 87e202e340
commit 40730bba4b
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,16 @@
# external imports
from chainlib.eth.constant import ZERO_ADDRESS
from chainqueue.encode import TxHexNormalizer
from chainlib.eth.tx import unpack
tx_normalize = TxHexNormalizer()
ZERO_ADDRESS_NORMAL = tx_normalize.wallet_address(ZERO_ADDRESS)
def unpack_normal(signed_tx_bytes, chain_spec):
tx = unpack(signed_tx_bytes, chain_spec)
tx['hash'] = tx_normalize.tx_hash(tx['hash'])
tx['from'] = tx_normalize.wallet_address(tx['from'])
tx['to'] = tx_normalize.wallet_address(tx['to'])
return tx

View File

@ -1,9 +1,9 @@
sarafu-faucet~=0.0.7a1
cic-eth[tools]~=0.12.4a4
cic-eth[tools]~=0.12.4a7
cic-types~=0.1.0a14
crypto-dev-signer>=0.4.15a1,<=0.4.15
faker==4.17.1
chainsyncer~=0.0.6a1
chainsyncer~=0.0.6a3
chainlib-eth~=0.0.9a7
eth-address-index~=0.2.3a4
eth-contract-registry~=0.6.3a3