Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/check-json-schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions pools/migration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"old": {
"protocol": 2,
"chainId": 1,
"id": "0x1d13531bf6344c102280ce4c458781fbf14dad140000000000000000000006df"
},
"new": {
"protocol": 3,
"chainId": 1,
"id": "0x9ed5175aecb6653c1bdaa19793c16fd74fbeeb37"
}
}
]
39 changes: 39 additions & 0 deletions schemas/migration.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}