Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

Add a valid proposal for use in the Console. Maybe? #330

@edd

Description

@edd

With the arrival of txv2, and the removal of the prepare endpoints on the Core APIs / datanode APIs, https://github.com/vegaprotocol/api/blob/develop/graphql/examples/json/proposal-newmarket.json is no longer a useful resource to point people to if they are looking for a template proposal to use in the Propose window on Console. It's possible it's still useful for other purposes, but for at least that specific case, it's not. There is an alternative example committed in the (currently private) Console repo (https://github.com/vegaprotocol/console/blob/develop/src/routes/trading/windows/propose/test-json.json), which I'll paste here for the sake of people without access.

What's changed

  • Some fields have been removed (partyID for instance)
  • Some fields have changed name and format (enactmentDatetime is now enactmentTimestamp)
  • Some fields have moved (liquidityCommitment)

Currently the errors returned are not useful to anyone without time on their hands and a willingness to dig in the codebase. Issues are filed for the unclear errors that I hit, in their appropriate repositories.

Tasks

@ashleyvega to populate - I'm putting this here for reference

New valid-for-the-console-Proposal

Note that the dates used here are likely to be invalid when you come to use this.

{
  "terms": {
    "closingTimestamp": 1625586371,
    "enactmentTimestamp": 1625586430,
    "newMarket": {
      "changes": {
        "instrument": {
          "name": "fUSDC Test Market",
          "code": "test market code",
          "future": {
            "maturity": "2022-10-01T00:00:00.000Z",
            "quoteName": "test market quotename",
            "settlementAsset": "fUSDC",
            "oracleSpec": {
              "pubKeys": ["0x0"],
              "filters": [
                {
                  "key": {
                    "name": "price.ETH.value",
                    "type": "TYPE_INTEGER"
                  },
                  "conditions": [
                    {
                      "operator": "OPERATOR_EQUALS",
                      "value": "100"
                    }
                  ]
                }
              ]
            },
            "oracleSpecBinding": {
              "settlementPriceProperty": "price.ETH.value"
            }
          }
        },
        "decimalPlaces": 1,
        "logNormal": {
          "riskAversionParameter": 0.0001,
          "tau": 1.90129e-5,
          "params": {
            "mu": 0,
            "r": 0.016,
            "sigma": 1.5
          }
        },
        "metadata": ["tag-1"],
        "priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": 43200,
              "probability": 0.9999999,
              "auctionExtension": 600
            }
          ]
        },
        "continuous": {
          "tickSize": "0.00001"
        }
      },
      "liquidityCommitment": {
        "commitmentAmount": 1,
        "fee": "0.01",
        "sells": [
          {
            "reference": "PEGGED_REFERENCE_MID",
            "proportion": 10,
            "offset": 2000
          },
          {
            "reference": "PEGGED_REFERENCE_MID",
            "proportion": 10,
            "offset": 1000
          }
        ],
        "buys": [
          {
            "reference": "PEGGED_REFERENCE_MID",
            "proportion": 10,
            "offset": -1000
          },
          {
            "reference": "PEGGED_REFERENCE_MID",
            "proportion": 10,
            "offset": -2000
          }
        ]
      }
    }
  }
}

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions