Skip to content

Conversation

@bobo-k2
Copy link
Collaborator

@bobo-k2 bobo-k2 commented Jul 28, 2023

No description provided.

@bobo-k2 bobo-k2 requested a review from Maar-io July 28, 2023 09:53
@bobo-k2 bobo-k2 changed the title Tutorial step 1 - Uplift to latest ink! and Openbrush Tutorial step 2 - Uplift to latest ink! and Openbrush Jul 28, 2023
Copy link
Member

@Maar-io Maar-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +21 to 25
#[overrider(PSP34Mintable)]
#[openbrush::modifiers(only_owner)]
fn mint(&mut self, account: AccountId, id: Id) -> Result<(), PSP34Error> {
psp34::InternalImpl::_mint_to(self, account, id)
}
Copy link
Member

@Maar-io Maar-io Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is not needed since we added mint() in the contract implementation.
However if OB can now support payable in the overriden function then mint is not needed in the contract implementation

instance._init_with_owner(instance.env().caller());
let collection_id = instance.collection_id();
instance._set_attribute(
let mut _instance = Self::default();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not use _ since the variable is used

"openbrush/std",
]
ink-as-dependency = []
ink-as-dependency = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new line

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

Successfully merging this pull request may close these issues.

3 participants