Skip to content

cargo install doesn't work, error on rococo-runtime-constants v17.0.0 #240

@Lohann

Description

@Lohann

OS: Macbook Pro M1 MAX - Darwin 24.4.0 Darwin Kernel Version 24.4.0 arm64

rust version: rustc 1.86.0 (05f9846f8 2025-03-31)

cargo install contracts-node --version 0.42.0

output:

     Compiling polkadot-runtime-common v17.0.1
     Compiling rococo-runtime-constants v17.0.0
  error[E0050]: method `dry_run_call` has 2 parameters but the declaration in trait `dry_run_call` has 3
      --> /Users/lohannpaternocoutinhoferreira/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rococo-runtime-18.0.1/src/lib.rs:1826:27
       |
  1826 |         fn dry_run_call(origin: OriginCaller, call: RuntimeCall) -> Result<CallDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
       |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 2
       |
       = note: `dry_run_call` from trait: `fn(OriginCaller, Call, u32) -> Result<CallDryRunEffects<Event>, xcm_runtime_apis::dry_run::Error>`

  error[E0061]: this function takes 3 arguments but 2 arguments were supplied
      --> /Users/lohannpaternocoutinhoferreira/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rococo-runtime-18.0.1/src/lib.rs:1827:4
       |
  1827 |             XcmPallet::dry_run_call::<Runtime, xcm_config::XcmRouter, OriginCaller, RuntimeCall>(origin, call)
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------------- argument #3 of type `u32` is missing
       |
  note: associated function defined here
      --> /Users/lohannpaternocoutinhoferreira/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pallet-xcm-17.0.2/src/lib.rs:2479:9
       |
  2479 |     pub fn dry_run_call<Runtime, Router, OriginCaller, RuntimeCall>(
       |            ^^^^^^^^^^^^
  help: provide the argument
       |
  1827 -             XcmPallet::dry_run_call::<Runtime, xcm_config::XcmRouter, OriginCaller, RuntimeCall>(origin, call)
  1827 +             XcmPallet::dry_run_call::<Runtime, xcm_config::XcmRouter, OriginCaller, RuntimeCall>(origin, call, /* u32 */)
       |

  error[E0061]: this function takes 3 arguments but 2 arguments were supplied
      --> /Users/lohannpaternocoutinhoferreira/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rococo-runtime-18.0.1/src/lib.rs:1778:1
       |
  1778 | / sp_api::impl_runtime_apis! {
  1779 | |     impl sp_api::Core<Block> for Runtime {
  1780 | |         fn version() -> RuntimeVersion {
  1781 | |             VERSION
  ...    |
  2584 | | }
       | |_^ argument #3 of type `u32` is missing
       |
  note: associated function defined here
      --> /Users/lohannpaternocoutinhoferreira/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/xcm-runtime-apis-0.4.3/src/dry_run.rs:68:6
       |
  68   |         fn dry_run_call(origin: OriginCaller, call: Call, result_xcms_version: XcmVersion) -> Result<CallDryRunEffects<Event>, Error>;
       |            ^^^^^^^^^^^^
       = note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
  help: provide the argument
       |
  2584 | }(origin, call, /* u32 */)
       |  +++++++++++++++++++++++++

  Some errors have detailed explanations: E0050, E0061.
  For more information about an error, try `rustc --explain E0050`.
  error: could not compile `rococo-runtime` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `contracts-node v0.42.0`, intermediate artifacts can be found at `/var/folders/hx/761yvntd1kl_5mhb47rzj7gw0000gn/T/cargo-installe96W5I`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions