Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unverified_smart_contract function: add md5 of bytecode to the changeset #5455

Merged
merged 1 commit into from Apr 13, 2022

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Apr 13, 2022

Motivation

An error like this on smart-contract verification with wrong data:

2022-04-12T13:51:39.560 application=block_scout_web request_id=FuUqcBSo6HEjK1cAADtS [error] Something went wrong while publishing the contract.{:error, #Ecto.Changeset<action: :insert, changes: %{address_hash: %Explorer.Chain.Hash{byte_count: 20, bytes: <<55, 208, 237, 37, 143, 55, 169, 102, 243, 59, 117, 181, 174, 116, 134, 145, 122, 10, 230, 20>>}, compiler_version: "0.8.13+commit.abaa5c0e", contract_source_code: "pragma solidity ^0.8.0; contract Example { }", is_vyper_contract: false, name: "Example", optimization: false, optimization_runs: 200}, errors: [contract_source_code: {"There was an error compiling your contract.", []}, contract_code_md5: {"can't be blank", [validation: :required]}], data: #Explorer.Chain.SmartContract<>, valid?: false>}

Changelog

add md5 of smart-contract's bytecode to the changeset

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-fix-unverified_smart_contract branch from e114177 to 3cb6de8 Compare April 13, 2022 08:06
@vbaranov vbaranov merged commit 9e937f0 into master Apr 13, 2022
@vbaranov vbaranov deleted the vb-fix-unverified_smart_contract branch April 13, 2022 08:31
sidhujag pushed a commit to syscoin/blockscout that referenced this pull request May 11, 2022
…smart_contract

Fix unverified_smart_contract function: add md5 of bytecode to the changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant