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
I am currently building a NFT project that imports cw721-metadata-onchain. I assume the same problem will be relevant here.
Imported cw721-metadata-onchain with library feature in dependencies, but since I am using multitest library for testing, I need entry package which is ignored in dev-dependencies. This makes it impossible to use multitest and have reduced binary size at the same time.
Made research and found updating to resolver to version 2. Yet I could not make it work and above my rust knowledge :(
The text was updated successfully, but these errors were encountered:
Just copy these minimal execute/instaniate/query definitions into your test helpers
Export them, but wrap each entry point definition in library (a bit more verbose and change upstream)
The first would be to add something like this to your multitest test helper:
use cw721_onchain_metadata::Cw721MetadataContract;pubfninstantiate(deps:DepsMut,env:Env,info:MessageInfo,msg:InstantiateMsg,) -> StdResult<Response>{Cw721MetadataContract::default().instantiate(deps, env, info, msg)}
The second would be to change cw721_onchain_metadata like:
pubmod entry {usesuper::*;use cosmwasm_std::entry_point;use cosmwasm_std::{Binary,Deps,DepsMut,Env,MessageInfo,Response,StdResult};// This makes a conscious choice on the various generics used by the contract#[cfg_attr(not(feature = "library"), entry_point)]pubfninstantiate(deps:DepsMut,env:Env,info:MessageInfo,msg:InstantiateMsg,) -> StdResult<Response>{Cw721MetadataContract::default().instantiate(deps, env, info, msg)}}
I am currently building a NFT project that imports
cw721-metadata-onchain
. I assume the same problem will be relevant here.Imported cw721-metadata-onchain with
library
feature in dependencies, but since I am using multitest library for testing, I needentry
package which is ignored in dev-dependencies. This makes it impossible to use multitest and have reduced binary size at the same time.Made research and found updating to resolver to version 2. Yet I could not make it work and above my rust knowledge :(
The text was updated successfully, but these errors were encountered: