openware / peatio-contrib Goto Github PK
View Code? Open in Web Editor NEWPeatio blockchains and currencies plugins
Home Page: https://www.openware.com
Peatio blockchains and currencies plugins
Home Page: https://www.openware.com
As we know, EOS has become a trend, Shall we have EOS coin plugin?
How to working my Opendax 2.6 or 3.0 BSC chain (bnb and bep20 token)?
In peatio blockchain_service
we are initializing the service on line 10
https://github.com/openware/peatio/blob/af5ee076b8855bbe505d676ce14efb4603c17b97/app/services/blockchain_service.rb#L10
But in the hooks we are initializing them as well Blockchain & Wallet.
This is causing issue (obviously) as we are initializing the service twice!
I've tried adding a DOGE blockchain and using an existing electrum server but it gives errors about json.
blockchain_1 | {"level":"ERROR","time":"2021-02-03 20:33:07","message":"#<Faraday::ConnectionFailed: wrong status line: \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"error\\\": {\\\"code\\\": -32700, \\\"message\\\": \\\"invalid JSON\\\"}, \\\"id\\\": null}\">"}
blockchain_1 | {"level":"ERROR","time":"2021-02-03 20:33:07","message":"/usr/local/lib/ruby/2.6.0/net/http/response.rb:42:in `read_status_line'\n/usr/local/lib/ruby/2.6.0/net/http/response.rb:29:in `read_new'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1509:in `block in transport_request'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1506:in `catch'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1479:in `request'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:30:in `block in request_with_scout_instruments'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:34:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:44:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:29:in `request_with_scout_instruments'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1472:in `block in request'\n/usr/local/lib/ruby/2.6.0/net/http.rb:920:in `start'\n/usr/local/lib/ruby/2.6.0/net/http.rb:1470:in `request'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:30:in `block in request_with_scout_instruments'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:34:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/tracer.rb:44:in `instrument'\n/opt/vendor/bundle/ruby/2.6.0/gems/scout_apm-2.6.10/lib/scout_apm/instruments/net_http.rb:29:in `request_with_scout_instruments'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:87:in `perform_request'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:43:in `block in call'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:92:in `with_net_http_connection'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/adapter/net_http.rb:38:in `call'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/request/url_encoded.rb:15:in `call'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/rack_builder.rb:143:in `build_response'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/connection.rb:387:in `run_request'\n/opt/vendor/bundle/ruby/2.6.0/gems/better-faraday-1.0.8/lib/better-faraday.rb:15:in `run_request'\n/opt/vendor/bundle/ruby/2.6.0/gems/faraday-0.17.3/lib/faraday/connection.rb:175:in `post'\n/opt/vendor/bundle/ruby/2.6.0/gems/peatio-electrum-2.6.2/lib/peatio/electrum/client.rb:41:in `call'\n/opt/vendor/bundle/ruby/2.6.0/gems/peatio-electrum-2.6.2/lib/peatio/electrum/client.rb:53:in `get_local_height'\n/opt/vendor/bundle/ruby/2.6.0/gems/peatio-electrum-2.6.2/lib/peatio/electrum/blockchain.rb:100:in `latest_block_number'\n/home/app/app/services/blockchain_service.rb:16:in `latest_block_number'\n/home/app/app/workers/daemons/blockchain.rb:27:in `block (2 levels) in start'\n/home/app/app/workers/daemons/blockchain.rb:22:in `loop'\n/home/app/app/workers/daemons/blockchain.rb:22:in `block in start'"}
blockchain_1 | {"level":"WARN","time":"2021-02-03 20:33:07","message":"Error: wrong status line: \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"error\\\": {\\\"code\\\": -32700, \\\"message\\\": \\\"invalid JSON\\\"}, \\\"id\\\": null}\". Sleeping for 10 seconds"}```
Any ideas if this is the proper way to add electrum wallets?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.