diff --git a/.github/workflows/check-json-schemas.yml b/.github/workflows/check-json-schemas.yml index 577004a2..b2467d23 100644 --- a/.github/workflows/check-json-schemas.yml +++ b/.github/workflows/check-json-schemas.yml @@ -39,6 +39,12 @@ jobs: schema: ./schemas/pool-tags.json file: ./pools/tags/index.json + - name: Validate pool migrations + uses: cardinalby/schema-validator-action@v3 + with: + schema: ./schemas/migration.json + file: ./pools/migration.json + - name: Validate hooks uses: cardinalby/schema-validator-action@v3 with: diff --git a/pools/migration.json b/pools/migration.json new file mode 100644 index 00000000..114296f0 --- /dev/null +++ b/pools/migration.json @@ -0,0 +1,14 @@ +[ + { + "old": { + "protocol": 2, + "chainId": 1, + "id": "0x1d13531bf6344c102280ce4c458781fbf14dad140000000000000000000006df" + }, + "new": { + "protocol": 3, + "chainId": 1, + "id": "0x9ed5175aecb6653c1bdaa19793c16fd74fbeeb37" + } + } +] diff --git a/schemas/migration.json b/schemas/migration.json new file mode 100644 index 00000000..9512c172 --- /dev/null +++ b/schemas/migration.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://balancer.fi/migration.json", + "definitions": { + "poolInfo": { + "type": "object", + "properties": { + "protocol": { + "type": "integer", + "enum": [2, 3] + }, + "chainId": { + "type": "integer", + "minimum": 1 + }, + "id": { + "type": "string", + "pattern": "^0x[0-9a-z]+$" + } + }, + "required": ["protocol", "chainId", "id"] + } + }, + "title": "Pool migrations", + "description": "A list of liquidity pools that need to migrate liquidity", + "type": "array", + "items": { + "type": "object", + "properties": { + "old": { + "$ref": "#/definitions/poolInfo" + }, + "new": { + "$ref": "#/definitions/poolInfo" + } + }, + "required": ["old", "new"] + } +}