OpenST / mosaic-contracts

Mosaic-0: Gateways and anchors on top of Ethereum to scale DApps
https://discuss.openst.org/c/mosaic
MIT License
114 stars 31 forks source link

Update unit test to handle arbitrary token decimals. #735

Closed deepesh-kn closed 5 years ago

deepesh-kn commented 5 years ago

Update unit test to handle arbitrary token decimals. Detail of the ticket is here https://github.com/OpenST/JLP/issues/98#issuecomment-492484237

schemar commented 5 years ago

Some solidity contracts have the decimals hard-coded in configs. E.g. MockToken or OSTPrime. In the scope of this ticket, I should only address the cases where the decimals are given in the constructor, correct?

Adding it also to the configured, hard-coded contracts is a much bigger change as it also includes updating the constructors and all the places where they are instantiated.

Or should that also be part of this ticket?

/cc @deepesh-kn

schemar commented 5 years ago

Hm, I think I have to include the MockToken changes in this ticket. Otherwise it skips a lot of relevant test cases actually.

I will make the changes to set the decimals on the constructor, but it will require a little extra effort.

schemar commented 5 years ago

I created a draft PR for the ticket. Right now it includes the MockToken change. I will keep it updated with further work.