Skip to content

27 standarize get transaction#65

Merged
bridgedragon merged 5 commits intoswapper-org:stagingfrom
0xp3gasus:27-standarize-getTransaction
Jan 18, 2022
Merged

27 standarize get transaction#65
bridgedragon merged 5 commits intoswapper-org:stagingfrom
0xp3gasus:27-standarize-getTransaction

Conversation

@0xp3gasus
Copy link
Collaborator

@0xp3gasus 0xp3gasus commented Jan 13, 2022

Description

Get Transaction method has been standardized with the following structure

{
    "tranction":{
         "blockHash": "XXX",
         "fee": yyy,
         "data": {
             ...
         },
         "transfers":[
              {
                   "from":"XXX",
                   "to":"XXX",
                   "amount": yyy,
                   "fee":yyy
              }
        ]
    }
}

Where:

  • blockHash: Block hash where the transaction is stored
  • fee: Transaction fee
  • data: Info about the transaction. This filed contains the blockchain transaction info
  • transfers: Collection of transfers done in the transaction where
    • from: Origin address
    • to: Receipt address
    • amount: Amount of corruncy transfer
    • fee: Transfer fee

Fixes #27

Dependencies (if any)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Get Transaction Method test updated for ETH in test_eth.py
  • Get Transaction Method test updated for BTC in test_btc.py

Test Configuration:
Operating system (output of sw_vers): macOS 12.0.1

Related PR or Docs PR

Docs PR related #
Other PR related #

Good practices to consider

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@0xp3gasus 0xp3gasus linked an issue Jan 13, 2022 that may be closed by this pull request
3 tasks
@0xp3gasus 0xp3gasus marked this pull request as ready for review January 13, 2022 23:48
@phoenix-web3
Copy link
Collaborator

This PR should be reviewed by @bridgedragon

@bridgedragon bridgedragon merged commit 6ffd74d into swapper-org:staging Jan 18, 2022
@0xp3gasus 0xp3gasus mentioned this pull request Feb 5, 2022
10 tasks
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.

Abstract and standarize getTransaction() method

3 participants