0

I read that a token can NOT be changed after it is released. At the same time we need to mint XXXXX tokens to get started on our end. We can not possibly know all the contract variables this early in the process. They will change for sure, possibly even monthly as we find and adapt more uses for our specific ERC20 token. Some people have said "no problem, you just swap out the new tokens with old ones". That does not seem like a optimal process. Has anyone dealt with this issue and have any suggestions?

Thanks in advance!

1
  • It should be clarified that it's the contract which can NOT be changed after it's released. The token itself will do whatever the contract is coded to allow it to do.
    – supakaity
    Apr 6, 2018 at 13:48

1 Answer 1

3

You could do the following:

Declare a storage boolean final, which would indicate that the parameters of the contract can still be altered by the owner.

Also, declare a method setFinal() which sets the boolean final to true. This method should require that it is called by the owner.

For each parameter you want to be able to alter, you create a setter method, with the following modifier:

modifier notFinal() {
    require(!final);
    _;
}

Now, when you decide that you are done altering parameters, call setFinal() from the owner's address. Your users will be happy to find that all parameters are definite from now on!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.