-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: Blueprint contracts support #10058
Conversation
0424d28
to
3c86c29
Compare
3c86c29
to
815eb79
Compare
…nvalid 'is_blueprint' value in fixture
837e1c8
to
761cc35
Compare
def solidity_multiple_files_verification_url, | ||
do: "#{base_api_url()}" <> "/verifier/solidity/sources:verify-multi-part" | ||
do: "#{base_api_url()}" <> "/verifier/solidity/sources%3Averify-multi-part" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, what is the rationale to transform ":" to URL-encoded value? And 2nd question is why only this symbol is URL-encoded, and not a whole URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to mock the endpoint response with Bypass
library fails when a request path contains ':' symbol (PSPDFKit-labs/bypass#122). Url-encoding allows to overcome this limitation.
Left the comment motivating that change: https://github.com/blockscout/blockscout/pull/10058/files#diff-8131861b04d9bfc97d0f9d8782437c3a8814d5b4b62e1665c200c8e3798ca964R157
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link to the related Bypass issue in 1d5c0d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually we workaround it in this way, but if your approach is works fine, it's nice finding
TestHelper.get_eip1967_implementation_zero_addresses() | ||
|
||
request = get(conn, "/api/v2/smart-contracts/#{Address.checksum(contract_address.hash)}") | ||
response = json_response(request, 200) | ||
|
||
assert response["is_blueprint"] == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before 761cc35, I've made explicit query to the database to check that the correct is_blueprint
value is stored inside (diff)
I've just thought that as we started checking api call here, test inside smart_contract_controller_test (https://github.com/blockscout/blockscout/pull/10058/files#diff-d392946298d6d844a2da500a13598d44cd57bc512c6fef7bad81886ceb87903aR475) may be redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep both tests since, seems, they different a bit.
* master: (65 commits) fix: Add healthcheck endpoints for indexer-only setup (#10076) 6.6.0 fix: Rework revert_reason (#9212) fix: Eliminate from_address_hash == #{address_hash} clause for transactions query in case of smart-contracts (#9469) feat: Add optional retry of NFT metadata fetch in Indexer.Fetcher.Tok… (#10036) fix: Separate indexer setup (#10032) feat: Blueprint contracts support (#10058) chore: Update hackney pool size: add new fetchers accounting (#9941) fix: Disallow batched queries in GraphQL endpoint (#10050) feat: Clone with immutable arguments proxy pattern (#10039) fix: vyper contracts re-verificaiton (#10053) refactor: Refactor get_additional_sources/4 -> get_additional_sources/3 (#10046) chore: Bump credo from 1.7.5 to 1.7.6 (#10060) chore: Bump redix from 1.5.0 to 1.5.1 (#10059) chore: Bump ex_doc from 0.32.1 to 0.32.2 (#10061) fix: Fix Unknown UID bug at smart-contract verification (#9986) refactor: test database config (#9662) chore: remove `has_methods` from `/addresses` (#10051) feat: Improve retry NFT fetcher (#10027) chore: Add support of Blast-specific L1 OP withdrawal events (#10049) ...
Resolves #10038
Motivation
Adding indication if the verified contract is blueprint (EIP-5202 compatible) contract
Changelog
is_blueprint
field to smart_contracts tableis_blueprint
to/api/v2/smart-contracts/0x.../
endpoint responseChecklist for your Pull Request (PR)
master
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.