poanetwork / token-wizard

(Discontinued) TokenWizard is an DApp to create and manage crowdsale and token contracts using a simple UI
MIT License
386 stars 215 forks source link

(Feature) Allow min cap manage screen #941

Closed fernandomg closed 6 years ago

fernandomg commented 6 years ago

Closes #930

I wasn't able to update minCap after crowdsale creation.

I tried with and without setting an initial minCap value in the crowdsale creation process.

Please @vbaranov review


Besides, @dennis00010011b manage screen layout has slightly changed, so it is possible that e2e test fails.

dennis00010011b commented 6 years ago
  1. Error message if globalMinCap === ""
screen shot 2018-06-05 at 16 40 03
dennis00010011b commented 6 years ago
  1. There is no validation if minCap > totalSupply
  2. Manage page isn't rendered for Dutch
fernandomg commented 6 years ago

@dennis00010011b @vbaranov fixes done, thanks!

Still cannot update minCap, did you guys were able to do it?

dennis00010011b commented 6 years ago

@fernandomg There is still issue, can't add whitelist from manage page. Decimals =18

screen shot 2018-06-06 at 08 54 31
dennis00010011b commented 6 years ago
  1. There is no validation if minCap >totalSupply
  2. In case if all tiers are whitelisted field minCap should be always disabled
  3. minCap enabled if crowdsale not modifiable

Yes, I can't update minCap too

fernandomg commented 6 years ago

In case if all tiers are whitelisted field minCap should be always disabled

fixed

can't add whitelist from manage page. Decimals =18

fixed


There is no validation if minCap >totalSupply

If that's the case, the crowdsale creation process is wrong as well, because if you enable whitelists for only one tier, minCap is disabled and set to zero.

minCap enabled if crowdsale not modifiable

Thinking a bit further, rule should be: if all tiers without whitelist enabled are not modifiable, then minCap should not be modifiable either.

Please @dennis00010011b @vbaranov confirm the last two items.

dennis00010011b commented 6 years ago

@fernandomg There is still issue: minCap field disabled even if tier modifiable, no whitelisted

I think since each tier has own allowModifiy and enableWhitelisted flags then minCap also should be a property of a tier. But these feature doesn't implemented in auth_os yet. Now we have an unambigvious situation with mincap for multitier crowdsale because some tiers can be modifiable some not. May be better to disable modify minCap from manage page for multitier crowdsale and enable it only for single tier crowdsale

vbaranov commented 6 years ago

@dennis00010011b @fernandomg

I guess the rule on the management page could be the same as in step 3 of deployment process:

global min cap is disabled if any of a tier is whitelisted. If none of the tiers is whitelisted, global min cap is enabled and should be less than total crowdsale supply.

fernandomg commented 6 years ago

@dennis00010011b @vbaranov

minCap is editable only if there's no whitelist, and it cannot be greater than the minimum supply for the tiers.

dennis00010011b commented 6 years ago

@fernandomg minCap is editable before start if crowdsale isn't modifiable. Should be disabled.

screen shot 2018-06-07 at 08 05 33
fernandomg commented 6 years ago

minCap is editable before start if crowdsale isn't modifiable

@dennis00010011b Fixed, so if there's at least one editable tier minCap will be editable as well.