Fix same checksum problem in set cli command

This commit is contained in:
nolash 2021-11-16 05:48:53 +01:00
parent 6e03dd32ed
commit d7db0c16d4
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 4 additions and 4 deletions

View File

@ -82,7 +82,7 @@ def main():
identifier = config.get('_IDENTIFIER') identifier = config.get('_IDENTIFIER')
registry_address = to_checksum_address(config.get('_EXEC_ADDRESS')) registry_address = to_checksum_address(config.get('_EXEC_ADDRESS'))
if not config.true('_UNSAFE') and registry_address != add_0x(config.get('_EXEC_ADDRESS')): if not config.true('_UNSAFE') and strip_0x(registry_address) != strip_0x(config.get('_EXEC_ADDRESS')):
raise ValueError('invalid checksum address for contract') raise ValueError('invalid checksum address for contract')
if identifier != None: if identifier != None:

View File

@ -63,11 +63,11 @@ def main():
c = ContractRegistry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle) c = ContractRegistry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
subject_address = to_checksum_address(config.get('_ADDRESS')) subject_address = to_checksum_address(config.get('_ADDRESS'))
if not config.true('_UNSAFE') and subject_address != add_0x(config.get('_ADDRESS')): if not config.true('_UNSAFE') and strip_0x(subject_address) != strip_0x(config.get('_ADDRESS')):
raise ValueError('invalid checksum address for subject_address') raise ValueError('invalid checksum address for subject_address')
registry_address = to_checksum_address(config.get('_EXEC_ADDRESS')) registry_address = to_checksum_address(config.get('_EXEC_ADDRESS'))
if not config.true('_UNSAFE') and registry_address != add_0x(config.get('_EXEC_ADDRESS')): if not config.true('_UNSAFE') and strip_0x(registry_address) != strip_0x(config.get('_EXEC_ADDRESS')):
raise ValueError('invalid checksum address for contract') raise ValueError('invalid checksum address for contract')
chain_config_hash = config.get('_CHAIN_HASH') chain_config_hash = config.get('_CHAIN_HASH')

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = eth-contract-registry name = eth-contract-registry
version = 0.7.1 version = 0.7.2a1
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