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

Minimum Sell Amounts #93

Merged
merged 4 commits into from
Dec 6, 2023
Merged

Minimum Sell Amounts #93

merged 4 commits into from
Dec 6, 2023

Conversation

kevin-fruitful
Copy link
Contributor

Implement minimum sell amounts allowed on the marketplace to prevent griefing with really small order amounts.

Mentioned in Immunify 24703.

@kevin-fruitful kevin-fruitful changed the base branch from main to dev December 1, 2023 08:40
@kevin-fruitful
Copy link
Contributor Author

@kevin-fruitful kevin-fruitful marked this pull request as ready for review December 4, 2023 09:59
Comment on lines 110 to 112
function objectMinimumSell(bytes32 _objectId) external view returns (uint256) {
return LibAdmin._objectMinimumSell(_objectId);
}
Copy link
Member

Choose a reason for hiding this comment

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

Why not make this a getMinimumSell in the MarketFacet, setter is already there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking we could make the getters the same name as the variable, and drop the get prefix, but for consistency with the rest of the codebase we could add the get prefix. I'll move everything to Market.

Comment on lines 180 to 183
function _objectMinimumSell(bytes32 _objectId) internal view returns (uint256) {
AppStorage storage s = LibAppStorage.diamondStorage();
return s.objectMinimumSell[_objectId];
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it makes more sense to put this into LibMarket?

@kevin-fruitful kevin-fruitful merged commit 89a7567 into dev Dec 6, 2023
4 of 5 checks passed
@kevin-fruitful kevin-fruitful deleted the IM24703_minimum_sell_amount branch December 6, 2023 06:36
@amarinkovic amarinkovic changed the title minimum sell amounts Minimum Sell Amounts Dec 11, 2023
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