From 45499ec839df7a3cbbd2320021883a7b8482727d Mon Sep 17 00:00:00 2001 From: philip Date: Mon, 20 Dec 2021 10:56:01 +0300 Subject: [PATCH] Refactor to match proof checked for by verify_proofs task. --- apps/contract-migration/scripts/proofs.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/contract-migration/scripts/proofs.py b/apps/contract-migration/scripts/proofs.py index 2d35d5bf..b65afa43 100644 --- a/apps/contract-migration/scripts/proofs.py +++ b/apps/contract-migration/scripts/proofs.py @@ -18,6 +18,7 @@ from eth_address_declarator.declarator import AddressDeclarator from funga.eth.signer import EIP155Signer from funga.eth.keystore.dict import DictKeystore from hexathon import add_0x, strip_0x +from okota.token_index.index import to_identifier # local imports @@ -109,6 +110,7 @@ if __name__ == '__main__': identifier = bytes.fromhex(hashed_token_proof) token_immutable_proof_writer = MetadataRequestsHandler(cic_type=MetadataPointer.NONE, identifier=identifier) write_metadata(token_immutable_proof_writer, token_proof_data) + logg.debug(f'Writing hashed proof: {hashed_token_proof}') write_to_declarator(contract_address=args.address_declarator, contract_wrapper=contract_wrapper, proof=hashed_token_proof, @@ -116,12 +118,11 @@ if __name__ == '__main__': signer_address=args.signer_address, token_address=args.e) - hashed_token_proof = hash_proof(args.token_symbol.encode('utf-8')) - identifier = bytes.fromhex(hashed_token_proof) - token_immutable_proof_writer = MetadataRequestsHandler(cic_type=MetadataPointer.NONE, identifier=identifier) + hashed_token_proof = to_identifier(args.token_symbol) + logg.debug(f'Writing hashed proof: {hashed_token_proof}') write_to_declarator(contract_address=args.address_declarator, contract_wrapper=contract_wrapper, - proof=identifier, + proof=hashed_token_proof, rpc=rpc, signer_address=args.signer_address, token_address=args.e)