Explicit prerelease of signer

This commit is contained in:
nolash 2021-08-24 21:28:17 +02:00
parent c02ad2404d
commit 801de977bf
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,5 @@
import logging
# external imports # external imports
from chainlib.jsonrpc import JSONRPCRequest from chainlib.jsonrpc import JSONRPCRequest
from chainlib.eth.contract import ( from chainlib.eth.contract import (
@ -18,6 +20,7 @@ from .encoding import (
to_identifier, to_identifier,
) )
logg = logging.getLogger(__name__)
class Registry(TxFactory): class Registry(TxFactory):
@ -29,6 +32,7 @@ class Registry(TxFactory):
enc.method('addressOf') enc.method('addressOf')
enc.typ(ABIContractType.BYTES32) enc.typ(ABIContractType.BYTES32)
identifier = to_identifier(identifier_string) identifier = to_identifier(identifier_string)
logg.debug('identifier {} {}'.format(identifier, identifier_string))
enc.bytes32(identifier) enc.bytes32(identifier)
data = add_0x(enc.encode()) data = add_0x(enc.encode())
tx = self.template(sender_address, contract_address) tx = self.template(sender_address, contract_address)

View File

@ -15,7 +15,6 @@ import logging
# external imports # external imports
import chainlib.eth.cli import chainlib.eth.cli
from chainlib.chain import ChainSpec from chainlib.chain import ChainSpec
from chainlib.eth.connection import EthHTTPConnection
from chainlib.eth.tx import receipt from chainlib.eth.tx import receipt
from chainlib.eth.constant import ZERO_CONTENT from chainlib.eth.constant import ZERO_CONTENT
from chainlib.error import JSONRPCException from chainlib.error import JSONRPCException
@ -51,7 +50,10 @@ chain_spec = ChainSpec.from_chain_str(config.get('CHAIN_SPEC'))
def out_element(e, w=sys.stdout): def out_element(e, w=sys.stdout):
w.write(e[0] + '\t' + e[1] + '\n') if config.get('_RAW'):
w.write(e[1] + '\n')
else:
w.write(e[0] + '\t' + e[1] + '\n')
def element(ifc, conn, registry_address, identifier, w=sys.stdout): def element(ifc, conn, registry_address, identifier, w=sys.stdout):
@ -84,7 +86,7 @@ def main():
raise ValueError('invalid checksum address for contract') raise ValueError('invalid checksum address for contract')
if identifier != None: if identifier != None:
element(c, conn, identifier, registry_address, w=sys.stdout) element(c, conn, registry_address, identifier, w=sys.stdout)
else: else:
ls(c, conn, registry_address, w=sys.stdout) ls(c, conn, registry_address, w=sys.stdout)

View File

@ -1,3 +1,3 @@
confini>=0.3.6rc3,<0.5.0 confini>=0.3.6rc3,<0.5.0
crypto-dev-signer>=0.4.14b7,<0.4.14 crypto-dev-signer>=0.4.15a1,<=0.4.15
chainlib-eth>=0.0.7a4,<=0.1.0 chainlib-eth>=0.0.9a3,<=0.1.0

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = eth-contract-registry name = eth-contract-registry
version = 0.6.1a1 version = 0.6.3a3
description = Ethereum Smart Contract key-value registry description = Ethereum Smart Contract key-value registry
author = Louis Holbrook author = Louis Holbrook
author_email = dev@holbrook.no author_email = dev@holbrook.no