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

feat: verify contracts with a post request #1806

Merged
merged 1 commit into from
Apr 23, 2019
Merged

Conversation

zachdaniel
Copy link
Contributor

@zachdaniel zachdaniel commented Apr 22, 2019

Motivation

We are having issues with some contract verifications, and this endpoint will make it easier to verify contracts and test contract verifications. A POST /verified_smart_contracts with the same parameters as the JSONRPC endpoint (except snake cased, not camelcase).

Changelog

Enhancements

  • Adds a contract verification endpoint.
  • I added an entry to CHANGELOG.md with this PR
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • I checked whether I should update the docs and did so if necessary

@coveralls
Copy link

coveralls commented Apr 22, 2019

Pull Request Test Coverage Report for Build 68891808-4978-48b9-b470-807408a08618

  • 11 of 18 (61.11%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.2%) to 82.186%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/block_scout_web/lib/block_scout_web/controllers/api/v1/verified_smart_contract_controller.ex 11 18 61.11%
Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/block/catchup/bound_interval_supervisor.ex 3 85.19%
apps/indexer/lib/indexer/block/catchup/fetcher.ex 4 69.23%
Totals Coverage Status
Change from base Build e1558521-716b-44a8-8013-18178ccc355a: -0.2%
Covered Lines: 4443
Relevant Lines: 5406

💛 - Coveralls

@zachdaniel zachdaniel force-pushed the verify-contracts-post branch 2 times, most recently from 920d31b to e57be07 Compare April 22, 2019 18:43
@zachdaniel zachdaniel force-pushed the verify-contracts-post branch from e57be07 to 5f247e6 Compare April 22, 2019 19:25
@ayrat555
Copy link
Contributor

@zachdaniel looks ok. Are you going to delete get endpoint?

@zachdaniel
Copy link
Contributor Author

I think it should be fine to have both for now. We don’t know if the post endpoint will really help with the issues Andrew has been having.

@zachdaniel zachdaniel merged commit 3d4024b into master Apr 23, 2019
@ghost ghost removed the in progress label Apr 23, 2019
@vbaranov vbaranov deleted the verify-contracts-post branch May 28, 2019 13:24
elijahboston added a commit to NFT42/blockscout-archived that referenced this pull request Aug 30, 2023
# 1.0.0 (2023-08-30)

### Bug Fixes

* add coin_balance_status to address_validations ([3f17c1f](StealthHash@3f17c1f))
* add fields for contrat filter performance ([d2336bc](StealthHash@d2336bc))
* add height for footer logo ([50216d9](StealthHash@50216d9))
* **apps:** adjust gas_used to Decimal ([de1a101](StealthHash@de1a101))
* arbitrum tx receipt ([#3](https://github.com/NFT42/blockscout/issues/3)) ([7acefac](StealthHash@7acefac))
* author ([d3b98f3](StealthHash@d3b98f3))
* author ([08d4e42](StealthHash@08d4e42))
* **ci:** gas_limit and gas_used is decimal ([624787b](StealthHash@624787b))
* cleanup uncataloged fetcher query, and push_front ([30031c3](StealthHash@30031c3))
* configure BLOCKSCOUT_VERSION in a standard way ([fb68e8f](StealthHash@fb68e8f))
* consolidate address w/ balance one at a time ([0a32431](StealthHash@0a32431))
* constructor_arguments must be type `text` ([99f7858](StealthHash@99f7858))
* creds ([efac76c](StealthHash@efac76c))
* deploy ([9e38ea5](StealthHash@9e38ea5))
* don't reload every page ([d4f5c3e](StealthHash@d4f5c3e))
* **explorer:** gas_used/gas_limit should be numeric, not int ([765cc13](StealthHash@765cc13))
* external library is only for verified contract ([85b7634](StealthHash@85b7634))
* fix to/from filters on tx list pages ([6a065bf](StealthHash@6a065bf))
* handle case where contract is not verified ([ee3c1b3](StealthHash@ee3c1b3))
* ignore  messages without error ([8f7fcb8](StealthHash@8f7fcb8))
* import clique genesis blocks ([949a971](StealthHash@949a971))
* logs list endpoint performance ([b15d645](StealthHash@b15d645))
* match more explicitly on ABI decoding result ([04ae8cf](StealthHash@04ae8cf))
* permissions ([6279759](StealthHash@6279759))
* permissions ([f4a49ca](StealthHash@f4a49ca))
* permissions ([c42a010](StealthHash@c42a010))
* poll on import completion and only new blocks ([c8fb42a](StealthHash@c8fb42a))
* publish ([d8502ea](StealthHash@d8502ea))
* release ([bd69efc](StealthHash@bd69efc))
* release ([5659221](StealthHash@5659221))
* release config ([41e68c8](StealthHash@41e68c8))
* release config ([25549a4](StealthHash@25549a4))
* release workflow ([6c8873d](StealthHash@6c8873d))
* remove source code fields from list endpoint ([1d2c11c](StealthHash@1d2c11c))
* render a nicer error when creator cannot be determined ([d5dc6a3](StealthHash@d5dc6a3))
* resolve false positive constructor arguments ([e08b9f7](StealthHash@e08b9f7))
* resolve flaky tests via sequential builds ([a8b300d](StealthHash@a8b300d))
* resolve lodash security alert ([e9eeb5e](StealthHash@e9eeb5e))
* show creating internal transactions ([6f3accc](StealthHash@6f3accc))
* sleep when throttled to prevent stampedes ([8efb861](StealthHash@8efb861))
* split constructor args for verification ([c3a5218](StealthHash@c3a5218))
* store solc versions locally for performance ([2e0bab6](StealthHash@2e0bab6))
* support https for wobserver polling ([c35e6bb](StealthHash@c35e6bb))
* tag name ([094b518](StealthHash@094b518))
* token ([f715744](StealthHash@f715744))
* token ([8dd07b7](StealthHash@8dd07b7))
* token ([ab59aa9](StealthHash@ab59aa9))
* tokens ([7233c39](StealthHash@7233c39))
* typo ([fc2210f](StealthHash@fc2210f))
* typo ([cec9b80](StealthHash@cec9b80))
* uniq by hash, instead of transaction ([77e8f45](StealthHash@77e8f45))
* update spandex for run time config ([5a19a04](StealthHash@5a19a04))
* use better queries for listLogs endpoint ([2ccdfab](StealthHash@2ccdfab))
* use better queries for listLogs endpoint ([817cc4a](StealthHash@817cc4a))
* user ([e85814c](StealthHash@e85814c))
* workflow ([988dcfb](StealthHash@988dcfb))
* workflow ([8798935](StealthHash@8798935))
* workflow ([5f72357](StealthHash@5f72357))
* workflow trigger ([68cc5cc](StealthHash@68cc5cc))

### Features

* add a minimum polling interval to protect from overrun ([ec6c24e](StealthHash@ec6c24e))
* add alt tags to logos ([fefd439](StealthHash@fefd439))
* add an admin method to import contract methods. ([b9ade78](StealthHash@b9ade78))
* add BLOCKSCOUT_HOST, and use it in API docs ([262b59a](StealthHash@262b59a))
* add eth_getLogs rpc endpoint ([a28b4b6](StealthHash@a28b4b6))
* add eth_getLogs rpc endpoint ([2551fd5](StealthHash@2551fd5))
* add fields to tx apis, small cleanups ([9ea62f0](StealthHash@9ea62f0))
* add listcontracts endpoint ([e694d14](StealthHash@e694d14))
* add not_decompiled_with_version filter ([5606ca2](StealthHash@5606ca2))
* add on demand fetching and stale attr to rpc ([bbbb8b7](StealthHash@bbbb8b7))
* Add RSK support ([8c1bb01](StealthHash@8c1bb01))
* allow decoding input as utf-8 ([343a9bd](StealthHash@343a9bd))
* allow deferring js to specific pages ([76ea93f](StealthHash@76ea93f))
* allow setting different configuration just for realtime fetcher ([75b558b](StealthHash@75b558b))
* better footer, configurable network list ([91df652](StealthHash@91df652))
* calculate RSK market cap ([4a63b97](StealthHash@4a63b97))
* decode transaction input on overview ([dd5dec4](StealthHash@dd5dec4))
* decoding candidates for unverified contracts ([48f363e](StealthHash@48f363e))
* display init for selfdestructed contracts. ([6c85f8b](StealthHash@6c85f8b))
* document eth rpc api mimicking endpoints ([f6f9302](StealthHash@f6f9302))
* eth_get_balance rpc endpoint ([e40027e](StealthHash@e40027e))
* exclude empty contracts by default ([833cdb3](StealthHash@833cdb3))
* fix ABI decodding, and decode tx logs ([21a1c14](StealthHash@21a1c14))
* make replaced transactions disabled ([c97ce0c](StealthHash@c97ce0c))
* optimize/rework `init` for replaced transactions fetcher ([47032c0](StealthHash@47032c0))
* remove dropped/replaced transactions in pending transactions list ([c861879](StealthHash@c861879))
* render addresses according to eip-55 ([c68d59a](StealthHash@c68d59a))
* render block time with up to one decimal point of accuracy ([1c77ef0](StealthHash@1c77ef0))
* restart on heartbeat timeout ([ea961f2](StealthHash@ea961f2))
* rpc address to list addresses ([5bc627d](StealthHash@5bc627d))
* set a ping_interval from config, defaulting to 300 seconds ([e4d0fef](StealthHash@e4d0fef))
* show an approximation of transaction time ([8b46986](StealthHash@8b46986))
* show raw transaction traces ([8683b66](StealthHash@8683b66))
* slightly more informative json rpc error messages + logging ([1918de7](StealthHash@1918de7))
* store average block time in a genserver ([b02383a](StealthHash@b02383a))
* support tracing via spandex ([5d12613](StealthHash@5d12613))
* synchronously fetch coin balances when an address is viewed. ([5582c3d](StealthHash@5582c3d))
* verify contracts via an RPC endpoint ([1f05f67](StealthHash@1f05f67))
* verify contracts with a post request ([5f247e6](StealthHash@5f247e6))
* verify contracts with a post request ([blockscout#1806](https://github.com/NFT42/blockscout/issues/1806)) ([3d4024b](StealthHash@3d4024b))

### Reverts

* Revert "Reset GA cache" ([0dc8cff](StealthHash@0dc8cff))
* Revert "Add this branch for ci tests." ([4ad1dd7](StealthHash@4ad1dd7))
* Revert "put history_chart loader back in" ([651a714](StealthHash@651a714))
* Revert "Add circleci config to solidity cli" ([2ebd5ea](StealthHash@2ebd5ea))
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.

5 participants