-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
// Parent::default().instantiate() copied below | ||
// Cannot use given it overrides contract version | ||
let info = ContractInfoResponse { | ||
name: msg.name, | ||
symbol: msg.symbol, | ||
}; | ||
Parent::default().contract_info.save(deps.storage, &info)?; | ||
let minter = deps.api.addr_validate(&msg.minter)?; | ||
Parent::default().minter.save(deps.storage, &minter)?; | ||
|
||
Ok(Response::default()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer an issue as the base contract doesn't set the contract version anymore
#[test] | ||
fn only_token_owner_can_burn() { | ||
let mut mock = MockEnv::new().build().unwrap(); | ||
|
||
let user = Addr::unchecked("user"); | ||
let token_id = mock.mint(&user).unwrap(); | ||
mock.set_health_response(&user, &token_id, &below_max_for_burn()); | ||
|
||
let bad_guy = Addr::unchecked("bad_guy"); | ||
let res = mock.burn(&bad_guy, &token_id); | ||
let err: ContractError = res.unwrap_err().downcast().unwrap(); | ||
assert_eq!(err, BaseError(Ownership(NotOwner))); | ||
|
||
mock.burn(&user, &token_id).unwrap(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from other test file. Better fits here given this is the burn test suite.
f36c46a
to
071ac22
Compare
071ac22
to
2a857f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grod220 I think we need a migrate
entry point on the NFT contract?
See the discussion in this PR: public-awesome/cw-nfts#119
213a974
to
fff2c09
Compare
fff2c09
to
4836c8e
Compare
cw721 = { git = "https://github.com/CosmWasm/cw-nfts/", branch = "main" } | ||
cw721-base = { git = "https://github.com/CosmWasm/cw-nfts/", branch = "main", features = ["library"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should ask them to make a v0.17.1 release to include the features you need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I assumed they'd cut a new release in the next few weeks or so and we can come back and pin this to that version.
This primarily affects how the minting role is handled. Now there is a separate message to manage Ownership using cw-ownable.