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

Cw721-base: Minter attribute #137

Closed
Morgandri1 opened this issue Aug 17, 2023 · 2 comments
Closed

Cw721-base: Minter attribute #137

Morgandri1 opened this issue Aug 17, 2023 · 2 comments

Comments

@Morgandri1
Copy link

Hey guys, i'm super new to this and came across this issue when testing:

error[E0609]: no field `minter` on type `cw721_base::Cw721Contract<'_, T, C, E, Q>`
  --> src/upgrades/v0_17.rs:15:26
   |
15 |     let minter = tract16.minter.load(deps.storage)?;
   |                          ^^^^^^ unknown field
   |
   = note: available fields are: `contract_info`, `token_count`, `operators`, `tokens`

error[E0609]: no field `minter` on type `cw721_base::Cw721Contract<'_, T, C, E, Q>`
  --> src/upgrades/v0_17.rs:16:13
   |
16 |     tract16.minter.remove(deps.storage);
   |             ^^^^^^ unknown field
   |
   = note: available fields are: `contract_info`, `token_count`, `operators`, `tokens`

For more information about this error, try `rustc --explain E0609`.
error: could not compile `injective721` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0308]: mismatched types
   --> src/multi_tests.rs:134:5
    |
134 |     assert_eq!(m.minter, admin().to_string());
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     expected `Option<String>`, found `String`
    |     expected because this is `std::option::Option<std::string::String>`
    |
    = note: expected enum `std::option::Option<std::string::String>`
             found struct `std::string::String`
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try wrapping the expression in `Some`
   --> /Users/metatron/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/macros/mod.rs:40:35
    |
40  |                 if !(*left_val == Some(*right_val)) {
    |                                   +++++          +

Some errors have detailed explanations: E0308, E0609.
For more information about an error, try `rustc --explain E0308`.

It seems the default contract wasnt fully migrated? let me know. thanks

@taitruong
Copy link
Collaborator

Assuming you are upgrading to v0.18.0. This might be related to #132

@taitruong
Copy link
Collaborator

Simply said, migration logic expects contract to be version v0.16.0, but most likely contract is v0.17 or later.

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

2 participants