frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Support for zkSync smart-contracts

Open rimrakhimov opened this issue 10 months ago • 1 comments

Changes in UI, required for zkSync

  • verification form: zkSync smart-contract verification supports "Solidity Standard JSON input" option only. All other options should be disabled.
  • verification form: In addition to Solc compiler version there should be one more dropdown for "Zk compiler versions". There are no nightly builds there, only stable builds. The list of zk compiler versions can be retrieved via the same /api/v2/smart-contracts/verification/config endpoint. The list will be in zk_compiler_versions property.
  • verified smart-contract page: display zk_compiler_version returned from smart-contract's API endpoint (/api/v2/smart-contracts/:hash).

API breaking changes

optimization_runs is returned as string for zkSync chains.

Sample smart-contract

Smart-contract verification is available at https://zksync.blockscout.com. Sc verification endpoint is the same (api/v2/smart-contracts/:hash/verification/via/standard-input).

Note: You don't need to send constructor_args parameter. You have to send zk_compiler_version with the value from corresponding dropdown. Other input params remains the same.

https://zksync.blockscout.com/address/0x0A7B35CDd9f37fE1893E21EA41e502fd47d75CB3/contract-verification

Solidity Standard JSON Input for it can be taken at https://gist.github.com/vbaranov/d1f62e23ca0a4db1bac8ee8c78c2809c.

Other params:

  "compilerZksolcVersion": "v1.3.5",
  "compilerSolcVersion": "0.8.17",
  "optimizationUsed": true,
  "optimizerMode": null,

Notion

rimrakhimov avatar Apr 02 '24 19:04 rimrakhimov

API task - https://github.com/blockscout/blockscout/issues/9797

tom2drum avatar Apr 02 '24 19:04 tom2drum