Closed Art3miX closed 1 year ago
@uditvira @bekauz @NoahSaso
Thinking more about it, max_limit is percentage, so no limit for it is basically 100%, which is already done in code.
max_limit_bps
is optional, so:
None - 100%
Some(limit) - limit must be between 1-10000
Only thing missing in code is check between 1-10000
sounds good! maybe we can wrap this in a dedicated struct and do the range validation on that to keep contract logic free of the validations?
I have to_config
helper which already does that.
When users set
max_limit
, they might want to have a no limit which should be represented by 0.But currently if you set 0, it means we will sell nothing (as the max amount allowed for us to sell will always be 0)