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

try to fix verification bundle #38

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charles-cooper
Copy link
Member

What I did

How I did it

How to verify it

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@PatrickAlphaC
Copy link
Collaborator

PatrickAlphaC commented Dec 3, 2024

  File "/Users/patrick/code/vitto-bday/script/verify.py", line 17, in moccasin_main
    verify()
    ~~~~~~^^
  File "/Users/patrick/code/vitto-bday/script/verify.py", line 12, in verify
    resp = active_network.moccasin_verify(coffee)
  File "/Users/patrick/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/moccasin/config.py", line 170, in moccasin_verify
    return boa_zksync.verify(contract, verifier_instance)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/patrick/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa_zksync/__init__.py", line 47, in verify
    constructor_calldata=contract.constructor_calldata,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ZksyncContract' object has no attribute 'constructor_calldata'

Hold on tho...

@PatrickAlphaC
Copy link
Collaborator

PatrickAlphaC commented Dec 3, 2024

Ok, I think I got it. We need to send a body in this format:

body = {
    "contractAddress": "0x220E8B563c82acC7111346B18259583d712D1185",
    "sourceCode": {
        "hi.vy": '# pragma version 0.4.0\n\n"""\n@license MIT\n"""\n\nnumber: public(uint256)\n\n@external \ndef set_number(num: uint256):\n    self.number = num',
    },
    "codeFormat": "vyper-multi-file",
    "contractName": "hi",
    "compilerVyperVersion": "0.4.0",
    "compilerZkvyperVersion": "v1.5.7",
    "constructorArguments": "0x",
    "optimizationUsed": True,
}

But we are currently sending:

{
  "contractAddress": "0x220E8B563c82acC7111346B18259583d712D1185",
  "sourceCode": {
    "zkvyper_version": "v1.5.7",
    "language": "Vyper",
    "sources": {
      "hi": {
        "content": "# pragma version 0.4.0\n\n\"\"\"\n@license MIT\n\"\"\"\n\nnumber: public(uint256)\n\n@external \ndef set_number(num: uint256):\n    self.number = num",
        "sha256sum": "5d0acbacb0d752accb6cf4b941fd0b0bd88f0de36496aec425adfbd30fc027e0"
      }
    },
    "settings": {
      "outputSelection": {
        "<unknown>": [
          "*"
        ]
      },
      "search_paths": [
        "."
      ],
      "optimize": "none"
    },
    "compiler_version": "v0.4.0+commit.e9db8d9",
    "integrity": "3dc9b57abf731faea6153fae28c8d01d38532cb996e9cef79dc24580c2672592"
  },
  "codeFormat": "vyper-multi-file",
  "contractName": "hi",
  "compilerVyperVersion": "0.4.0",
  "compilerZkvyperVersion": "v1.5.7",
  "constructorArguments": "0x",
  "optimizationUsed": True
}

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