Vaulta

oracle.ttr

Contract

The data structures defined by this contract.

  • Table row type of history

    {
      "name": "st_history",
      "base": "",
      "fields": [
        {
          "name": "timestamp",
          "type": "uint64"
        },
        {
          "name": "price0",
          "type": "uint64"
        },
        {
          "name": "price1",
          "type": "uint64"
        },
        {
          "name": "acc_price0",
          "type": "uint128"
        },
        {
          "name": "acc_price1",
          "type": "uint128"
        }
      ]
    }
  • Table row type of prices

    {
      "name": "st_price",
      "base": "",
      "fields": [
        {
          "name": "pair_id",
          "type": "uint64"
        },
        {
          "name": "current_price0",
          "type": "uint64"
        },
        {
          "name": "current_price1",
          "type": "uint64"
        },
        {
          "name": "twa_price0",
          "type": "uint64"
        },
        {
          "name": "twa_price1",
          "type": "uint64"
        },
        {
          "name": "last_updated",
          "type": "time_point_sec"
        }
      ]
    }
  • Table row type of tokens

    {
      "name": "st_token",
      "base": "",
      "fields": [
        {
          "name": "id",
          "type": "uint64"
        },
        {
          "name": "contract",
          "type": "name"
        },
        {
          "name": "sym",
          "type": "symbol"
        }
      ]
    }
  • Action parameter in update

    {
      "name": "update",
      "base": "",
      "fields": [
        {
          "name": "pair_id",
          "type": "uint64"
        },
        {
          "name": "reserve0_before",
          "type": "uint64"
        },
        {
          "name": "reserve1_before",
          "type": "uint64"
        },
        {
          "name": "reserve0_after",
          "type": "uint64"
        },
        {
          "name": "reserve1_after",
          "type": "uint64"
        }
      ]
    }