Add missing package file encode
This commit is contained in:
parent
87e202e340
commit
40730bba4b
16
apps/cic-eth/cic_eth/encode.py
Normal file
16
apps/cic-eth/cic_eth/encode.py
Normal 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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user