I'm in a situation where a user can mint new NFTs of a certain type B only if they are owner of NFT of type A. B NFT checks if caller has A NFT in a mint function. To instantiate a B contract I would need to pass A NFT address in the constructor.
The question is how do I get a hash of freshly created contract in test environment
fn minting_works() {
let accounts = default_accounts();
let mut a_contract= AContract::new();
set_sender(accounts.alice);
a_contract.mint(cid.clone()); // Mint A NFT to a user
let mut b_contract= BContract::new(contract_hash);
b_contract.mint(cid.clone()); // Mint B NFT to a user
}