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

"register" type different in /oracles and /oracles/{id} #1872

Open
davidyuk opened this issue Jul 26, 2024 · 1 comment
Open

"register" type different in /oracles and /oracles/{id} #1872

davidyuk opened this issue Jul 26, 2024 · 1 comment
Assignees

Comments

@davidyuk
Copy link
Member

In /oracles it is a transaction object as per specification.

// 20240726165838
// https://mainnet.aeternity.io/mdw/v3/oracles
{
  "data": [
    {
      "active": true,
      "register": {
        "block_hash": "mh_2f1gyBmtMMb8Sd3kbSu95cADRMwsYE8171KXP4W8wa2osRp4tZ",
        "block_height": 289005,
        "encoded_tx": "tx_+JELAfhCuEBX6CvfGClpszz2kg4qjUL8BtvNE0JpCtuwBHbZwGfTd6O6cQ9fr723QhuML50EIzZlFafB6UUi1y5S6RpZH2wJuEn4RxYBoQFtrWD1RJ5rxuHksnEXADAPHPT2jRT6uqVIr8X45BNYqgGFcXVlcnmIcmVzcG9uc2UAAIOYloCHBowmEhDKAIMEauEAmOjXSw==",
        "hash": "th_K5aPLdEN4H6QduiFtqdkv61gUCvaQpDjX3z9pHKNopD8F65LJ",
        "micro_index": 20,
        "micro_time": 1595571086808,
        "signatures": [
          "sg_CW3T2W6Ryi2kcDcSTeuwvL8xGhKYUDnGHygBCPLrF2aqfWA1RiybKqRRafrctK4c9vvL9DS9kCYzWkWSmD8mN9g6yhQPG"
        ],
        "tx": {
          "abi_version": 0,
          "account_id": "ak_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN",
          "fee": 1842945000000000,
          "nonce": 1,
          "oracle_id": "ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN",
          "oracle_ttl": {
            "type": "delta",
            "value": 10000000
          },
          "query_fee": 0,
          "query_format": "query",
          "response_format": "response",
          "ttl": 289505,
          "type": "OracleRegisterTx",
          "version": 1
        },
        "tx_hash": "th_K5aPLdEN4H6QduiFtqdkv61gUCvaQpDjX3z9pHKNopD8F65LJ"
      },
      "format": {
        "response": "response",
        "query": "query"
      },
      "oracle": "ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN",
      "query_fee": 0,
      "expire_height": 10289005,
      "active_from": 289005,
      "approximate_expire_time": 3397648769385,
      "register_time": 1595571086808,
      "register_tx_hash": "th_K5aPLdEN4H6QduiFtqdkv61gUCvaQpDjX3z9pHKNopD8F65LJ"
    },

properties:
data:
type: array
items:
$ref: '#/components/schemas/Oracle'

In /oracles/{id} it is some transaction id.

// 20240726165850
// https://mainnet.aeternity.io/mdw/v3/oracles/ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN
{
  "active": true,
  "register": 13749762,
  "format": {
    "response": "response",
    "query": "query"
  },
  "extends": [
    
  ],
  "oracle": "ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN",
  "query_fee": 0,
  "expire_height": 10289005,
  "active_from": 289005,
  "approximate_expire_time": 3397648769385,
  "register_time": 1595571086808,
  "register_tx_hash": "th_K5aPLdEN4H6QduiFtqdkv61gUCvaQpDjX3z9pHKNopD8F65LJ"
}

$ref: '#/components/schemas/Oracle'

The best would be to use the same value type in both cases.

@yaboiishere yaboiishere self-assigned this Jul 26, 2024
@davidyuk
Copy link
Member Author

Also, extends provided in /oracles/{id} and missed in /oracles

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

2 participants