3

Trying to build Astar shibuya-runtime crate is failing after adding the ink_env dependency an astar-frame chain-extension.

Here are the changes to both Astar and astar-frame.

Run: cargo build --release -p shibuya-runtime

Error:

  error[E0152]: duplicate lang item in crate `ink_env` (which `nomination_pool_staking_chain_extension_types` depends on): `panic_impl`.
    |
    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)
    = note: first definition in `sp_io` loaded from /Users/snowmead/opt/projects/Astar/target/release/wbuild/shibuya-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0c1432171814e3b5.rmeta
    = note: second definition in `ink_env` loaded from /Users/snowmead/opt/projects/Astar/target/release/wbuild/shibuya-runtime/target/wasm32-unknown-unknown/release/deps/libink_env-71d05e5639e89bfd.rmeta

The ink_env dependency is included in the nomination-pool chain extension types crate here

2

1 Answer 1

0

I don't think you should have ink_env as a dependency of your chain extension, If you want to use the shared nomination-pool-staking-chain-extension-types package, you might need to rely on optional dependencies and feature flags to only compile the ink_env::chain_extension::FromStatusCode trait implementation when you compile it inside your contract

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.