JoinColony / colonyJS

🎪 Colony TypeScript libraries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changes to Token contract

sprusr opened this issue · comments

Description

In the upcoming JoinColony/colonyNetwork#479, the ERC20ExtendedToken is removed in favour of the Dappsys DSToken.

The ERC20ExtendedToken constructor accepted name, symbol and decimals, whereas DSToken accepts only symbol, with hardcoded decimals = 18 and name optionally being later set with setName.

Both symbol and name were previously of type string, but are now bytes32. We will likely need to handle the conversion to/from hex in this library (before/after ethers).

Notes

  • There's a decision to be made about ColonyNetworkClient.createToken, as to whether we want to allow name to be set with this one method (send two transactions with one helper function), or if it should be a separate action (separately call setName after creation). If the latter, we'll need to make some changes in the dApp (Colony creation needs to send two transactions).

TODO

  • New Token constructor
  • Set Token name with setName
  • Handle conversion of strings to/from hex strings (bytes32) for name and symbol