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

Building contracts failed #117

Closed
toschdev opened this issue Oct 12, 2020 · 0 comments · Fixed by #121
Closed

Building contracts failed #117

toschdev opened this issue Oct 12, 2020 · 0 comments · Fixed by #121
Assignees

Comments

@toschdev
Copy link

On current master branch I tried to build with

sudo docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/workspace-optimizer:0.10.3

and got

error[E0593]: function is expected to take 3 arguments, but it takes 2 arguments
   --> contracts/cw1-whitelist/src/lib.rs:9:1
    |
9   |   cosmwasm_std::create_entry_points!(contract);
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected function that takes 3 arguments
    | 
   ::: contracts/cw1-whitelist/src/contract.rs:125:1
    |
125 | / pub fn query<S: Storage, A: Api, Q: Querier>(
126 | |     deps: &Extern<S, A, Q>,
127 | |     msg: QueryMsg,
128 | | ) -> StdResult<Binary> {
...   |
132 | |     }
133 | | }
    | |_- takes 2 arguments
    |
    = note: required for the cast to the object type `dyn for<'r> std::ops::Fn(&'r cosmwasm_std::Extern<cosmwasm_std::ExternalStorage, cosmwasm_std::ExternalApi, cosmwasm_std::ExternalQuerier>, cosmwasm_std::Env, _) -> std::result::Result<cosmwasm_std::Binary, _>`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0593`.
error: could not compile `cw1-whitelist`.
To learn more, run the command again with --verbose.
Traceback (most recent call last):
  File "/usr/local/bin/optimize_workspace.py", line 45, in <module>
    subprocess.check_call(cmd, cwd=contract)
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cargo', '-Z=unstable-options', 'build', '--release', '--target=wasm32-unknown-unknown', '--locked', '--out-dir=/tmp/contracts/cw1-whitelist']' returned non-zero exit status 101.

My versions

> rustc --version
rustc 1.48.0-nightly (5099914a1 2020-09-08)
> cargo --version
cargo 1.48.0-nightly (126907a7c 2020-08-31)
@ethanfrey ethanfrey self-assigned this Oct 12, 2020
@ethanfrey ethanfrey added this to To do in Contract development via automation Oct 12, 2020
Contract development automation moved this from To do to Done Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants