Closed brianmcmichael closed 3 years ago
Is there some nice way to have these strings be constant
? dynamic types and memory
parameters are quite annoying for FV.
@xwvvvvwx that gets into a philosophical discussion. In ds-token now, they symbol is set via the constructor and the name is set via a setter function. To be constant you'd have to hard-code them into the contract prior to deployment and you wouldn't be able to pass them as params. I don't want to change those patterns without the blessing of the maintainers. solc 0.6.5+
allows for immutable
variables to be set via a constructor, but I'm not sure if that would achieve any benefit by way of formal verification, and the existing ds-token
isn't 0.6.x
compatible anyways.
Unfortunately immutable
doesn't work with string type.
@brianmcmichael If you rebase this onto latest master I will merge
Rebased.
oops, looks like merging the decimals PR created a conflict here, can you rebase again.
Rebased again.
Recent versions of
solc
do not treatbytes32
andstring
in the same way that it used to, they are no longer comparable or directly castable. Therefore, creating token integrations with more recent versions ofsolc
have difficulty processing the DS-Token'sbytes32
return fromname
andstring
. The ERC20 standard does call forstring
types to be used for these optional returns so I'm just putting this forth as a suggestion.