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

ValueError: Expected exactly one contract key, found /path/mox-cu/mox-favorites-cu/src/favorites.vy, extra_data #31

Open
PatrickAlphaC opened this issue Nov 15, 2024 · 1 comment

Comments

@PatrickAlphaC
Copy link
Collaborator

I'm getting this error:

  File "/path/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa/interpret.py", line 87, in create_module
    ret = load_partial(self.path)
  File "/path/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa/interpret.py", line 267, in load_partial
    return loads_partial(
        f.read(), name=filename, filename=filename, compiler_args=compiler_args
    )
  File "/path/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa/interpret.py", line 262, in loads_partial
    return deployer_class(data, filename=filename)
  File "/path/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa_zksync/deployer.py", line 23, in __init__
    zkvyper_data = self._compile(compiler_data, contract_name, filename)
  File "/path/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa_zksync/deployer.py", line 40, in _compile
    return compile_zksync(contract_name, filename, compiler_args)
  File "/path/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa_zksync/compile.py", line 31, in compile_zksync
    compile_output = get_compiler_output(output)
  File "/path/.local/share/uv/tools/moccasin/lib/python3.13/site-packages/boa_zksync/compiler_utils.py", line 93, in get_compiler_output
    raise ValueError(f"Expected exactly one contract key, found {unexpected}")
ValueError: Expected exactly one contract key, found /path/mox-cu/mox-favorites-cu/src/favorites.vy, extra_data

Here is how you can reproduce it:

python -m venv ./.venv
source .venv/bin/activate
pip install titanoboa-zksync # or `uv add titanoboa-zksync`
pip install "vyper==0.4.0" # or `uv add "vyper==0.4.0"`
echo "# pragma version 0.4.0/nhi: uint256" > my_contract.vy
python

Then, in your python shell:

>>> import boa_zksync
>>> import boa
>>> boa_zksync.set_zksync_test_env()
>>> boa.load("my_contract.vy")

You'll get the error.

@PatrickAlphaC
Copy link
Collaborator Author

Oh. It looks like it's fixed here:

cbf76a2

we just need to cut a release.

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

No branches or pull requests

1 participant