token-wizard
token-wizard copied to clipboard
(Bug) Deployment failed if number of reserved addresses more than 45
Reproducibility 5/5
Steps:
- Start wizard https://wizard.oracles.org/
- Start creating, add 50 reserved addresses
- Continue and finish deployment.
Expected result:
- token should be deployed without issue
- user should able to distribute tokens to reserved addresses
Actual result:
- transaction 'Register addresses for reserved tokens' skipped
- manage page does not contain button 'Distribute'
If you are reporting a problem with Token Wizard, please include the following information:
Which network did you use? (Mainnet, Kovan, Rinkeby, etc.)
Sokol, Rinkeby
If you were able to create it, what is the URL of your crowdsale?
https://wizard.oracles.org/invest?addr=0x3cab0D682C7F95Dcad39030895775e7b0799E4c4&networkID=4
Do you have screenshots showing the problem?
Do you see errors in the dev console? If yes, please include a screenshot
Yes

If you see errors, please right click on them and "Save as..". Zip saved file and attach it to the Issue.
bundleReservedTokens.log icowizard_Rinkeby_0xE375BB8C92112B841eFD313E7b02ea5b8F3c2aa6.zip
I'll work on this after #777, so that manual testing it is easier.
@vbaranov I just realized that this is going to need a change in the contract:
function setReservedTokensListMultiple(
address[] addrs,
uint[] inTokens,
uint[] inPercentageUnit,
uint[] inPercentageDecimals
) public canMint onlyOwner {
assert(!reservedTokensDestinationsAreSet);
assert(addrs.length == inTokens.length);
assert(inTokens.length == inPercentageUnit.length);
assert(inPercentageUnit.length == inPercentageDecimals.length);
for (uint iterator = 0; iterator < addrs.length; iterator++) {
if (addrs[iterator] != address(0)) {
setReservedTokensList(addrs[iterator], inTokens[iterator], inPercentageUnit[iterator], inPercentageDecimals[iterator]);
}
}
reservedTokensDestinationsAreSet = true;
}
The method does not allow calling it more than once, but if we want to reserve a lot of addresses (say, hundreds) then we'll need to do it in chunks.
I have already made the changes in the frontend to do this, but of course the method fails the second time is called.
But my question is, does it make sense to modify this if we are going to migrate everything to auth_os? How should we approach this?
cc @pablofullana
Yes, it is contract limitation for now. Let's put this issue on hold until migration to auth_os.