Skip to content

Instantly share code, notes, and snippets.

@blueplanet
Forked from brossi/add-new-crypto-to-peatio.md
Last active September 12, 2017 20:19
Show Gist options
  • Save blueplanet/2913df4d60813af23a5137372815f223 to your computer and use it in GitHub Desktop.
Save blueplanet/2913df4d60813af23a5137372815f223 to your computer and use it in GitHub Desktop.
Adding A New Cryptocurrency to Peatio

State: Draft
Based on the Peatio Stable branch


Coin Daemon

To the coin daemon's {coin}.conf file, include the -walletnotify command:

# Notify when receiving coins
walletnotify=/usr/local/sbin/rabbitmqadmin publish routing_key=peatio.deposit.coin payload='{"txid":"%s", "channel_key":"COIN_NAME_SINGULAR"}'

Peatio

Peatio files that need to be updated when a new coin is added:

peatio/current/config/

  • currencies.yml
  • deposit_channels.yml
  • markets.yml
  • withdraw_channels.yml

peatio/current/app/controllers/

  • admin/deposits/{coin}s_controller.rb
  • admin/withdraws/{coin}s_controller.rb
  • private/assets_controller.rb // add into def index
  • private/deposits/{coin}s_controller.rb
  • private/withdraws/{coin}s_controller.rb

peatio/current/app/models/

  • admin/ability.rb // add to def initialize(user)
  • deposits/{coin}.rb
  • withdraws/{coin}.rb

peatio/current/app/views/

  • admin/deposits/{coin}s/index.html.slim
  • admin/withdraws/{coin}s/_table.html.slim
  • admin/withdraws/{coin}s/index.html.slim
  • admin/withdraws/{coin}s/show.html.slim
  • private/assets/_{cur_code}_assets.html.slim
  • private/assets/_liability_tabs.html.slim // add to .ul.nav.nav-tabs and .tab-content
  • private/assets/index.html.slim // add to ul.nav.nav-justified.asssets-nav and content_for
  • private/deposits/{coin}s/new.html.slim
  • private/withdraws/{coin}s/new.html.slim // replace 'satoushi' to 'eth'
  • private/withdraws/{coin}s/edit.html.slim // replace 'satoushi' to 'eth'

peatio/current/config/locales/*.yml

Other

/app/models/worker/deposit_coin.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment