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

[Software Project 2019/2020] Extending the support for cryptocurrencies in our blockchain-based decentralized exchange #44

Closed
wants to merge 17 commits into from

Conversation

rahimklaber
Copy link

  • Updated bitcoinlib to latest version
  • Implemented Ethereum and Erc-20 tokens
  • Implemented Stellar lumens
  • Implemented Iota
  • Implemented Monero
  • Implemented Litecoin and Dash

related issue : Tribler/tribler#5293

yzwetsloot and others added 17 commits May 19, 2020 12:04
Implemented Nod and Abstract Provider classes.

Co-authored-by: Rahim Klabér <[email protected]>
Co-authored-by: Rahim Klabér <[email protected]>
Co-authored-by: Youri Zwetsloot <[email protected]>
Co-authored-by: calintheguy <[email protected]>
Co-authored-by: osheasha <[email protected]>
Co-authored-by: Omar Sheasha <[email protected]>
* created abstract provider

* Added class Node, fix spelling mistake in provider.py

* Added support for determining latency of node, included enum Cryptocurrency and Source

* Added RateExceeded exception

* Added exceptions relating to requests

* Added EthereumProvider class

* Added Web3Provider class

* Added EthereumBlockchair provider class

* Added check for connectivity in Web3Provider

* Renamed eth_providers to eth_provider

* Cleaned up EthereumBLockchairProvider

* Added simple ethereum database

* Made EthereumBlockchairProvider use Transaction class instead of dict

* Fixed EthereumBlockchairProvider function returning wrong object

* Added EthereumBlockcypherProvider

* Made gas estimation easier

* Added check for blockcypher response

* Changed ethereum db schema

* Fixed get_transactions function

* Fixed get_transactions function

* Fixed get_transactions function

* Add is_pending field to Transactions table

* Added concrete Ethereum wallet implementation, adjusted abstract Provider class

* Implement equality operator for the Transaction class

* Fixed error in get_transactions

* Raise exception when provider api call is not supported

* Created Ethereum package, implemented Ethereum wallet methods using Asyncio

* Added tests for EthereumBlockchairProvider

* Added more tests for EthereumBlockchairProvider

* Added tests for EthereumBlockcypherProvider

* Changed EthereumBlockchairProvider tests to use mocked requests

* Added tests for EthereumBlockchairProvider

* Added EthereumWallet tests and fixed some bugs

* Added EthereumWallet tests and fixed some bugs

* Fixed syntax error

* Added EthereumWallet tests and fixed some bugs

* Added AutoEthereumProvider and fixed some bugs

* Fixed EthereumBLockcypherProvider test

* Added tests for AutoTestnetEthereumProvider

* Added AutoTestnetEthereumProvider

* Cleaned up ethereum wallet and fixed some tests

* Fixed bugs in ethereum wallet

* Removed blockcypher ethereum testnet

It was a private testnet and not a public one.

* Added Etherscanprovider skeleton

* Added etherscanprovider implementation

* Added etherscan to AutoEthereumProvider

* Fixed etherscanprovider bug.

* Added retry in AutoEthereumProvider and added hardcoded testnet node

* Remove print statement

* Fixed imports

* Added comment

* Added test for etherscan provider

* Fixed bugs in ethereum wallet

* Fixed merge conflicts

* Implemented requested changes

* Added missing monitor_transaction function

* Fixed pep8 warnings

* Converted double-quotes to single-quotes

* Fixed bug in etherscan submit transaction

* Implemented get transaction count without relying on remote api's

* Fix pep 8

Co-authored-by: Youri Zwetsloot <[email protected]>
* Added CI/CD yml file for running tests

* Updated CI/CD file

* Updated CI/CD file

* Updated CI/CD file

* Updated CI/CD file

* Updated CI/CD file

* Update runtests.yml

* Updated CI/CD script

* Changed import name to be more specific for CI/CD porpuses

* Fix failing test

* Fixed some pylint errors

* Added pylint runner script for SP-related files.

* Changed linting strategy from flake8 to pylint

* Setup stellar wallet and database

* Implemented getbalance in Horizon provider

* Completed balance method and basic get transactions method

* Added db table for payments

* Added get_transactions in provider

* Added get transactions and completed get balance

* Added database definition for transactions

* Fixed transaction table definition, made get transactions return txs

* Added method to insert payment into the database

* Fixed get transactions

* Added transfer method

still need to add tx to database after sending tx

* Fully implemented transfer method

* Cleanup

* Added monitor transactions

* Implemented testnet with inheritance

* Refactored the wallet class

* Added check for failed provider request

* Added test for horizonprovider

* Fixed provider get_balance

* Added tests for HorizonProvider

* Added test for stellar wallet

* Added stellar wallet tests

* Removed logger string interpolation

* Added method for amount of stroop in 1 lumen

* Added tests for stellardb

* Added method for merge account operation

* Added test for merge account

* Update runtests.yml

* Add stellar-sdk dependency

* Fixed import errors

* Fixed test

* Fixed some tests

* Updated linting script to only fail on pylint errors

* Fixed tests

* Added checks for account created

* Resolved review topics

* Fixed pylint

* Update ci

* Fixed comment

Co-authored-by: calintheguy <[email protected]>
* created abstract provider

* Added class Node, fix spelling mistake in provider.py

* Added support for determining latency of node, included enum Cryptocurrency and Source

* Added RateExceeded exception

* Added exceptions relating to requests

* Added EthereumProvider class

* Added Web3Provider class

* Added EthereumBlockchair provider class

* Added check for connectivity in Web3Provider

* Renamed eth_providers to eth_provider

* Cleaned up EthereumBLockchairProvider

* Added simple ethereum database

* Made EthereumBlockchairProvider use Transaction class instead of dict

* Fixed EthereumBlockchairProvider function returning wrong object

* Added EthereumBlockcypherProvider

* Made gas estimation easier

* Added check for blockcypher response

* Changed ethereum db schema

* Fixed get_transactions function

* Fixed get_transactions function

* Fixed get_transactions function

* Add is_pending field to Transactions table

* Added concrete Ethereum wallet implementation, adjusted abstract Provider class

* Implement equality operator for the Transaction class

* Fixed error in get_transactions

* Raise exception when provider api call is not supported

* Created Ethereum package, implemented Ethereum wallet methods using Asyncio

* Added CI/CD yml file for running tests

* Updated CI/CD file

* Updated CI/CD file

* Updated CI/CD file

* Updated CI/CD file

* Updated CI/CD file

* Update runtests.yml

* Updated CI/CD script

* Changed import name to be more specific for CI/CD porpuses

* Fix failing test

* Fixed some pylint errors

* Added pylint runner script for SP-related files.

* Changed linting strategy from flake8 to pylint

* Add protocol, username and password fields to Node, implement fundamental methods Monero wallet

* Corrected mistaken merge conflict resolve, removed bare exceptions from Monero wallet and provider

* Added required method from abstract wallet

* Finish up existing Monero wallet wrapper implementation

* Remove redundant xmr_provider.py class

* Add tests for half of XMR_wallet methods

* Fix async issues in XMR_wallet, finish tests for XMR_wallet

* Fixed TODOs for Monero wallet

* Fix Monero spelling mistake

Co-authored-by: ldubravica <[email protected]>

* Removed AnyDex spelling mistake, __eq__ method for xmr_wallet

* Updated linting script to only fail on pylint errors

* Turned monitor-transaction method into pass-method

* Resolved f-string logging pylint issue, unnecessary pass

* Removed pass method test, fixed ConnectionException from requests.exceptions

* Converted from CRLF to LF, fixed Wallet test by awaiting

* Fixed string balance conversion to int to make test pass

* Fixed Pending tasks warning XMR_Wallet test cases

* Fixed issue with monero-python dependency, latest version is now stored under monero

Co-authored-by: Rahim Klabér <[email protected]>
Co-authored-by: calintheguy <[email protected]>
Co-authored-by: ldubravica <[email protected]>
#10)

* Added preliminary README.md for Monero wallet folder

* Cleaned up commands in README.md

* Introduced multi-threaded approach to determining latency to host, fixed some issues related to url parsing for nodes

* Added README to Node directory, tests for Node class

* Fixed pipeline failing due to CI-based test

* Changed test_node so that it remains independent from file storage

* Fixed complete independence on file

* Removed hosts.json file from test folder

* Included support for testnet nodes, integrated addresses and subaddresses

* Fixed hosts.json file read from current working directory

* Changed Node tests to rely on file reading
Fixed bitcoinlib logger conflict
@tribler-ci
Copy link

Can one of the admins verify this patch?

@devos50
Copy link
Contributor

devos50 commented Jun 29, 2020

ok to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants