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

Feat: Revert to one-step minter #326

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

tekkac
Copy link
Member

@tekkac tekkac commented Jan 24, 2024

closes #315

@tekkac tekkac requested a review from cloudvenger January 24, 2024 11:21
Copy link
Contributor

@cloudvenger cloudvenger left a comment

Choose a reason for hiding this comment

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

Look Good to Me

If needed, we will add more test for minter later

let reserved_value = self._mint_reserved_value.read();
let total_value = IProjectDispatcher { contract_address: project_address }
.total_value(slot);
total_value + reserved_value >= max_value
Copy link
Contributor

Choose a reason for hiding this comment

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

How can you have the total_value + reserved_valkue > to max_value ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Short answer: It shouldn't happen if there is only one correct minter.

It might happen with multiple minters, in that case we rely on the external view total_value and from the initializer requirements on project_value.

@cloudvenger cloudvenger merged commit 9a9d6fb into Carbonable:main Jan 30, 2024
2 checks passed
@tekkac tekkac deleted the feat/revert-to-one-step-minter branch January 31, 2024 22:22
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.

Rollback 2 steps minting
2 participants