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: support --via-ir flag #6781

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

mdehoog
Copy link
Contributor

@mdehoog mdehoog commented Jan 13, 2024

Motivation

When you forge create --via-ir, you cannot verify later with forge verify-contract, which does not support the --via-ir flag.

Solution

Introduces a --via-ir flag into verify-contract which causes the standard json-input passed to etherscan to include "viaIR":true, which fixes verification.

Fixes the original problem in #3507, although that issue seems to have evolved to include #6780.

@DaniPopes DaniPopes merged commit 41242d4 into foundry-rs:master Jan 18, 2024
18 of 19 checks passed
@DaniPopes
Copy link
Member

Note that this does only adds it to the local structs, it's not sent off to etherscan

@DaniPopes
Copy link
Member

Sorry but is this even right? I don't see anything referencing "viaIR" in the etherscan docs https://docs.etherscan.io/api-endpoints/contracts

@DaniPopes
Copy link
Member

Nevermind apparently it does exist, just completely undocumented 👍

@mdehoog mdehoog deleted the michael/verify-via-ir branch January 18, 2024 21:12
kevincheng96 added a commit to compound-finance/quark that referenced this pull request Feb 8, 2024
Deploys the latest version of Quark contracts to Goerli. Looks like the contracts built using `via-ir` also now verify after the latest Foundry [fix](foundry-rs/foundry#6781).

```
  =============================================================
  Deploying Quark Factory
  Quark Factory Deployed: 0x6aDEB6d973980cb4093882EE57b75c251b4d6af0
  Deploying Quark Contracts via Quark Factory
  Code Jar Deployed: 0x6385C1d72862D10FD77CEB80C1b896E030Fa8Cce
  Quark State Manager Deployed: 0x57AEAA002075971027C9cD72a86eD1c3D864D80e
  Quark Wallet Implementation Deployed: 0x9EEcB6F3C9b7516094ed78e2E0E76201cbd6aAC0
  Quark Wallet Proxy Factory Deployed: 0x9D8ec03E9DDB71f04DA9db1E38837Aaac1782a97
  Batch Executor Deployed: 0x8BD4C901582460B77aDABcdb00438959071a5567
  Deploying Core Scripts
  Ethcall Deployed: 0x3F289a2BaB7eAbD7C381FEaF51729e22f6d7a2Df
  Multicall Deployed: 0xE240f7A45b6A1DE13a2cd5810c13A32AaFD35Fa9
  =============================================================
  ```
gosuto-inzasheru added a commit to gosuto-inzasheru/book that referenced this pull request Jul 13, 2024
mattsse pushed a commit to foundry-rs/book that referenced this pull request Jul 13, 2024
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.

2 participants