Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic models, controllers, routes, and code itself for currencies #646

Closed
yivo opened this issue Mar 8, 2018 · 4 comments
Closed

Dynamic models, controllers, routes, and code itself for currencies #646

yivo opened this issue Mar 8, 2018 · 4 comments

Comments

@yivo
Copy link

yivo commented Mar 8, 2018

No description provided.

@tzman89
Copy link

tzman89 commented Mar 8, 2018

What do you think about shell script for automated adding new currencies.
Maybe with those steps:

  1. Put configuration (coin name,rpc, on which coin it's based...)
  2. Clone currency on which new currency is based
  3. 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.

@yivo
Copy link
Author

yivo commented Mar 8, 2018

Hi @tzman89

Adding new currencies is based on three steps:

  1. Add currency config to config/seed/currencies.yml
  2. rake db:seed
  3. 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.

@yivo
Copy link
Author

yivo commented Mar 8, 2018

The idea it to unify all of these into three:
image

  • BaseController
  • BanksController
  • CoinsController

@tzman89
Copy link

tzman89 commented Mar 8, 2018

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.

yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
@yivo yivo added this to the 1.5 - OTP secured withdrawal milestone Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 15, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 16, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 16, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 16, 2018
yivo added a commit to yivo/peatio that referenced this issue Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants