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

Extend getsourcecode API view with new output fields #2857

Merged
merged 7 commits into from
Dec 10, 2019

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Nov 14, 2019

Closes #751

Motivation

getsourcecode API endpoint doesn't return all fields Blockscout reserved for a smart-contracts in DB

Changelog

Add the new fields to the view:

  • constructor_arguments
  • external_libraries
  • optimization_runs
  • evm_version

Configure hiding of output fields in the view if they are empty

Checklist for your Pull Request (PR)

@vbaranov vbaranov self-assigned this Nov 14, 2019
@vbaranov vbaranov force-pushed the vb-extend-contract-api-view branch from b9af04b to ef0a51c Compare November 14, 2019 10:17
@vbaranov vbaranov added the wip label Nov 14, 2019
@vbaranov vbaranov marked this pull request as ready for review November 14, 2019 10:18
@vbaranov vbaranov force-pushed the vb-extend-contract-api-view branch from ef0a51c to aeb17ff Compare November 14, 2019 10:21
@coveralls
Copy link

coveralls commented Nov 14, 2019

Pull Request Test Coverage Report for Build 23f16034-99dc-4dfa-9a63-946ab8f3a244

  • 20 of 22 (90.91%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 75.124%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex 20 22 90.91%
Files with Coverage Reduction New Missed Lines %
apps/block_scout_web/lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 2 71.43%
Totals Coverage Status
Change from base Build 24fc869e-c854-4191-9ac9-0087b47c143a: 0.03%
Covered Lines: 5297
Relevant Lines: 7051

💛 - Coveralls

@vbaranov vbaranov force-pushed the vb-extend-contract-api-view branch from aeb17ff to b5bce41 Compare November 14, 2019 11:19
@vbaranov vbaranov added ready for review This PR is ready for reviews. and removed wip labels Nov 14, 2019
@vbaranov vbaranov requested a review from ayrat555 November 14, 2019 11:27
"OptimizationRuns" => "",
"EVMVersion" => "",
"ConstructorArguments" => "",
"ExternalLibraries" => ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no tests for ExternalLibraries and ConstructorArguments fields

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayrat555 requested tests have been added bde993f

@vbaranov vbaranov requested a review from ayrat555 December 10, 2019 13:14
Copy link
Contributor

@ayrat555 ayrat555 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one style comment. Otherwise, LGTM

@vbaranov vbaranov force-pushed the vb-extend-contract-api-view branch from b28c988 to 4ed9fdd Compare December 10, 2019 14:08
@vbaranov vbaranov merged commit a443aa9 into master Dec 10, 2019
@vbaranov vbaranov deleted the vb-extend-contract-api-view branch December 10, 2019 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API endpoint contract#getsourcecode enhancement
3 participants