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

forge verify-contract command adds "/" suffix to verifier url #5160

Closed
1 of 2 tasks
islishude opened this issue Jun 15, 2023 · 4 comments
Closed
1 of 2 tasks

forge verify-contract command adds "/" suffix to verifier url #5160

islishude opened this issue Jun 15, 2023 · 4 comments
Labels
T-bug Type: bug

Comments

@islishude
Copy link

islishude commented Jun 15, 2023

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (ce687fc 2023-06-15T00:16:21.518016000Z)

What command(s) is the bug in?

forge verify-contract

Operating System

macOS (Intel)

Describe the bug

Command

Note that the verifier url doesn't have / suffix

forge verify-contract --verifier=blockscout --verifier-url=https://example.com/api 0x9c6554832dc990710a686be993558a52fb55d838 src/Counter.sol:Counter

the following log is from blockscout, you can see that the request has / suffix, and blockscout can't handle it.

2023-06-15T14:24:40.011 application=api request_id=F2jbNL1OUofKgP4AAJKm [info] /api/?module=contract&action=getabi&address=0x9c6554832dc990710a686be993558a52fb55d838
2023-06-15T14:24:40.011 application=api request_id=F2jbNL1OUofKgP4AAJKm [info] Sent 500 in 62µs

and I have tested with curl, blockscout returns {"message":"Something went wrong.","result":null,"status":"0"}

but if I use the request without / then blockscout returns {"message":"Contract source code not verified","result":null,"status":"0"}.

@islishude islishude added the T-bug Type: bug label Jun 15, 2023
@Evalir
Copy link
Member

Evalir commented Jun 20, 2023

This is expected behavior—try appending \? at the end, like so: https://example.com/api\?

We'll do a better job at documenting this.

@Evalir Evalir closed this as completed Jun 20, 2023
@oveddan
Copy link

oveddan commented Jul 11, 2023

wow, glad to come across this issue, adding the \? to the url solved the same problem for us too, when trying to verify on the Zora chains (with verification urls located at https://testnet.explorer.zora.energy/api and https://explorer.zora.energy/api).

@MarcusWentz
Copy link

@Evalir

I opened this pull request
foundry-rs/book#967
to document the fix commented here
#5160 (comment)

@Kongarto
Copy link

goods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

5 participants