Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6bdced

Browse filesBrowse files
committed
[#1818] add pool migration metadata
1 parent 82d1017 commit e6bdced
Copy full SHA for e6bdced

File tree

Expand file treeCollapse file tree

3 files changed

+59
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+59
-0
lines changed
Open diff view settings
Collapse file

‎.github/workflows/check-json-schemas.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/check-json-schemas.yml
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ jobs:
3939
schema: ./schemas/pool-tags.json
4040
file: ./pools/tags/index.json
4141

42+
- name: Validate pool migrations
43+
uses: cardinalby/schema-validator-action@v3
44+
with:
45+
schema: ./schemas/migration.json
46+
file: ./pools/migration.json
47+
4248
- name: Validate hooks
4349
uses: cardinalby/schema-validator-action@v3
4450
with:
Collapse file

‎pools/migration.json‎

Copy file name to clipboard
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"old": {
4+
"protocol": 2,
5+
"chainId": 1,
6+
"id": "0x1d13531bf6344c102280ce4c458781fbf14dad140000000000000000000006df"
7+
},
8+
"new": {
9+
"protocol": 3,
10+
"chainId": 1,
11+
"id": "0x9ed5175aecb6653c1bdaa19793c16fd74fbeeb37"
12+
}
13+
}
14+
]
Collapse file

‎schemas/migration.json‎

Copy file name to clipboard
+39Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://balancer.fi/migration.json",
4+
"definitions": {
5+
"poolInfo": {
6+
"type": "object",
7+
"properties": {
8+
"protocol": {
9+
"type": "integer",
10+
"enum": [2, 3]
11+
},
12+
"chainId": {
13+
"type": "integer",
14+
"minimum": 1
15+
},
16+
"id": {
17+
"type": "string",
18+
"pattern": "^0x[0-9a-z]+$"
19+
}
20+
},
21+
"required": ["protocol", "chainId", "id"]
22+
}
23+
},
24+
"title": "Pool migrations",
25+
"description": "A list of liquidity pools that need to migrate liquidity",
26+
"type": "array",
27+
"items": {
28+
"type": "object",
29+
"properties": {
30+
"old": {
31+
"$ref": "#/definitions/poolInfo"
32+
},
33+
"new": {
34+
"$ref": "#/definitions/poolInfo"
35+
}
36+
},
37+
"required": ["old", "new"]
38+
}
39+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.