You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anchor 0.30.0 require CoreAsset and CoreCollection to implement the Discriminator trait to build IDL.
When using anchor 0.30.0, compiling IDL will encounter the following errors:
error[E0599]: no function or associated item named `create_type` found for struct `mpl_core::CoreAsset` in the current scope
--> programs/solana-marketplace/src/ins/mpl/mpl_core/core_sell_nft.rs:20:10
|
20 | #[derive(Accounts)]
| ^^^^^^^^ function or associated item not found in `CoreAsset`
|
::: programs/solana-marketplace/src/ins/mpl/mpl_core/mod.rs:20:1
|
20 | pub struct CoreAsset(mpl_core::accounts::BaseAssetV1);
| -------------------- function or associated item `create_type` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `create_type`, perhaps you need to implement it:
candidate #1: `anchor_lang::IdlBuild`
= note: this error originates in the derive macro `Accounts` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `mpl_core::CoreAsset: Discriminator` is not satisfied
--> programs/solana-marketplace/src/ins/mpl/mpl_core/core_sell_nft.rs:56:40
|
56 | pub core_asset: Box<Account<'info, CoreAsset>>,
| ^^^^^^^^^ the trait `Discriminator` is not implemented for `mpl_core::CoreAsset`
|
= help: the following other types implement trait `Discriminator`:
BuyCnft
CancelBuyCnft
CancelCollectionBuyCnft
CancelSellCnft
CollectionBuyCnft
ExecuteBuyCnft
ExecuteCollectionBuyCnft
ExecuteSellCnft
and 49 others
The text was updated successfully, but these errors were encountered:
Hey @alphafitz11, thanks for calling this out. Right now Core isn't supported as an explicit account in the Accounts structure. This is because of the way it's composed of a set of base data and a collection of plugins, with most users only needing to read a subset. However integrating this into the Anchor Accounts is something we're actively working on. Right now the recommended way to work with Core in Anchor is to treat it as an UncheckedAccount and deserialize it within the instruction.
Anchor 0.30.0 require CoreAsset and CoreCollection to implement the Discriminator trait to build IDL.
When using anchor 0.30.0, compiling IDL will encounter the following errors:
The text was updated successfully, but these errors were encountered: