Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial step 2 - Uplift to latest ink! and Openbrush #14

Open
wants to merge 4 commits into
base: tutorial/mint-step2
Choose a base branch
from

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

@@ -29,4 +22,4 @@ std = [

"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.

2 participants