Dynamic models, controllers, routes, and code itself for currencies
What do you think about shell script for automated adding new currencies. Maybe with those steps:
- Put configuration (coin name,rpc, on which coin it's based...)
- Clone currency on which new currency is based
- Rename files and content of new (cloned) currency with $SED -i After running script only thing left to do will be create pairs and test everything.
I know current files will need changes but this script can save alot of time when adding new currencies.
Hi @tzman89
Adding new currencies is based on three steps:
- Add currency config to config/seed/currencies.yml
- rake db:seed
- Code API client
That's all. We are going away from peatio/peatio way of duplicating tons of lines of code. We recently refactored the whole project to be able to fetch currencies from database, not ActiveYAMLBase.
The idea it to unify all of these into three:

- BaseController
- BanksController
- CoinsController
I see, thanks for explanation I wasn't sure how currencies in db thing works but now it's much clear.
So as I understand controllers for other currencies should be the same if the currency is based on any of the current ones,we can use key from currencies.yml to determine new currency controller.
I'm following your work here and you did a great job with this, you got it to almost perfect platform. It will be fantastic when you implement ActionCable and also only Monero is left to add and it will have all currency types.