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

Use OpenBrush with ink! v4 beta (could not find metadata in ink) #190

Open
wottpal opened this issue Dec 6, 2022 · 2 comments
Open

Use OpenBrush with ink! v4 beta (could not find metadata in ink) #190

wottpal opened this issue Dec 6, 2022 · 2 comments

Comments

@wottpal
Copy link

wottpal commented Dec 6, 2022

hey, i'm trying out ink! v4.0.0-beta right now and want to use OpenBrush with it. how do i install it as a dependency from the update-to-ink-4.0.0-beta branch?

@wottpal
Copy link
Author

wottpal commented Dec 6, 2022

Update: I might got it working via a dependency import in Cargo.toml like:

openbrush = { git = "https://github.com/Supercolony-net/openbrush-contracts", branch = "feature/update-to-ink-4.0.0-beta", default-features = false, features = ["psp34"] }

But now, during the build I get the following error:

error[E0433]: failed to resolve: could not find `metadata` in `ink`
  --> /Users/…/.cargo/git/checkouts/openbrush-contracts-67504c0ed06fb3b5/34f8308/lang/src/storage/mapping.rs:28:10
   |
28 | use ink::metadata::layout::RootLayout;
   |          ^^^^^^^^ could not find `metadata` in `ink`

error[E0433]: failed to resolve: could not find `metadata` in `ink`
  --> /Users/…/.cargo/git/checkouts/openbrush-contracts-67504c0ed06fb3b5/34f8308/lang/src/storage/multi_mapping.rs:30:5
   |
30 |     metadata::layout::RootLayout,
   |     ^^^^^^^^ could not find `metadata` in `ink`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `openbrush_lang` due to 2 previous errors

@wottpal wottpal changed the title How to try out OpenBrush with ink! v4 beta? Use OpenBrush with ink! v4 beta (could not find metadata in ink) Dec 6, 2022
@wottpal
Copy link
Author

wottpal commented Dec 6, 2022

This is the full Cargo.toml:

[package]
name = "azns_registry"
version = "0.0.2"
authors = ["AZERO Domains <[email protected]>"]
edition = "2021"
publish = false

[dependencies]
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2.3", default-features = false, features = ["derive"], optional = true }

ink = { version = "4.0.0-beta", default-features = false }

openbrush = { git = "https://github.com/Supercolony-net/openbrush-contracts", branch = "feature/update-to-ink-4.0.0-beta", default-features = false, features = ["psp34"] }

azns_name_checker = { path = "../azns_name_checker", default-features = false, features = ["ink-as-dependency"] }

[lib]
name = "azns_registry"
path = "lib.rs"
crate-type = ["cdylib"]

[features]
default = ["std"]
std = [
    "scale/std",
    "scale-info/std",
    "ink/std",
    "openbrush/std",
    "azns_name_checker/std",
]
ink-as-dependency = []

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