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

Filter Incoming/Outgoing transactions to an address and modify transaction object #2

Open
johnsBeharry opened this issue Aug 10, 2018 · 0 comments

Comments

@johnsBeharry
Copy link
Member

johnsBeharry commented Aug 10, 2018

Estimate: 1h
Due: 2018-08-09
Scenario: Lookup a transaction by id
When a "GET" request is made to "/tx/0xc11f277bd2f3eb42c2023cc7fdbd054e7a3e729ab76f29abfad900f832e9ada8"
Then the response status is "200"
And the response content type is "application/json"
And the response data is similar to:
"""
{
    "data": {
      "to": "0x0d0707963952f2fba59dd06f2b425ace40b492fe",
      "from": "0x72bc262db5e0eb36849fab9bb944034c1d43edc6",
      "gas": 21000,
      "value": 350000000,
      "gas_price": 21000,
      "block_number": 6112731
    }
}
"""

Scenario: Get transactions and balance of an address
When a "GET" request is made to "/address/0x0d0707963952f2fba59dd06f2b425ace40b492fe"
Then the response status is "200"
And the response content type is "application/json"
And the response data is similar to:
"""
{
  "data": {
    "balance": 100000000000000000000,
    "transactions": [
      {
        "from": "0x72bc262db5e0eb36849fab9bb944034c1d43edc6",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xea1093d492a1dcb1bef708f771a99a96ff05dcab81ca76c31940300177fcf49f",
        "gas_price": 21000,
        "block_number": 6112731
      },
      {
        "from": "0x72bc262db5e0eb36849fab9bb944034c1d43edc6",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xc11f277bd2f3eb42c2023cc7fdbd054e7a3e729ab76f29abfad900f832e9ada8",
        "gas_price": 21000,
        "block_number": 6112731
      },
      {
        "from": "0x72bc262db5e0eb36849fab9bb944034c1d43edc6",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xea1093d492a1dcb1bef708f771a99a96ff05dcab81ca76c31940300177fcf49f",
        "gas_price": 21000,
        "block_number": 6112731
      },
      {
        "to": "0x9C4F603feA65D8B371b6a87e8491f1b9885e5CC4",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xa5b1ccb9016f4299f73f1588620b53f6bc4c5af104b330958c04d8cbb997f30e",
        "gas_price": 21000,
        "block_number": 6112732
      }
    ]
  }
}
"""

Scenario: Get outgoing transactions of an address
When a "GET" request is made to "/address/0x0d0707963952f2fba59dd06f2b425ace40b492fe/outgoing"
Then the response status is "200"
And the response content type is "application/json"
And the response data is similar to:
"""
{
  "data": {
    "transactions": [
      {
        "to": "0x9C4F603feA65D8B371b6a87e8491f1b9885e5CC4",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xa5b1ccb9016f4299f73f1588620b53f6bc4c5af104b330958c04d8cbb997f30e",
        "gas_price": 21000,
        "block_number": 6112732
      }
    ]
  }
}
"""

Scenario: Get incoming transactions of an address
When a "GET" request is made to "/address/0x0d0707963952f2fba59dd06f2b425ace40b492fe/incoming"
Then the response status is "200"
And the response content type is "application/json"
And the response data is similar to:
"""
{
  "data": {
    "transactions": [
      {
        "from": "0x72bc262db5e0eb36849fab9bb944034c1d43edc6",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xea1093d492a1dcb1bef708f771a99a96ff05dcab81ca76c31940300177fcf49f",
        "gas_price": 21000,
        "block_number": 6112731
      },
      {
        "from": "0x72bc262db5e0eb36849fab9bb944034c1d43edc6",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xc11f277bd2f3eb42c2023cc7fdbd054e7a3e729ab76f29abfad900f832e9ada8",
        "gas_price": 21000,
        "block_number": 6112731
      },
      {
        "from": "0x72bc262db5e0eb36849fab9bb944034c1d43edc6",
        "gas": 21000,
        "value": 210000,
        "transaction_hash": "0xea1093d492a1dcb1bef708f771a99a96ff05dcab81ca76c31940300177fcf49f",
        "gas_price": 21000,
        "block_number": 6112731
      }
    ]
  }
}
"""
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

No branches or pull requests

1 participant