-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
632fa82
commit dfeab94
Showing
8 changed files
with
2,569 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,37 +9,36 @@ jobs: | |
validate-tokens: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
node-version: "20" | ||
bun-version: latest | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm install [email protected] | ||
npm install axios | ||
run: bun install | ||
|
||
- name: Extract and validate new tokens | ||
run: | | ||
git fetch origin ${{ github.base_ref }} | ||
git show origin/${{ github.base_ref }}:registry/mainnet/interchain/squid.tokenlist.json > base_file.json | ||
cp registry/mainnet/interchain/squid.tokenlist.json current_file.json | ||
node -e " | ||
const fs = require('fs'); | ||
const base = JSON.parse(fs.readFileSync('base_file.json', 'utf8')); | ||
const current = JSON.parse(fs.readFileSync('current_file.json', 'utf8')); | ||
const newTokens = Object.entries(current.tokens) | ||
.filter(([id, token]) => !base.tokens[id]) | ||
.reduce((obj, [id, token]) => ({ ...obj, [id]: token }), {}); | ||
fs.writeFileSync('new_tokens.json', JSON.stringify(newTokens, null, 2)); | ||
" | ||
node scripts/validate-token-configs.js | ||
bun run - <<EOF | ||
import * as fs from 'fs/promises'; | ||
const base = JSON.parse(await fs.readFile('base_file.json', 'utf8')); | ||
const current = JSON.parse(await fs.readFile('current_file.json', 'utf8')); | ||
const newTokens = Object.entries(current.tokens) | ||
.filter(([id, token]) => !base.tokens[id]) | ||
.reduce((obj, [id, token]) => ({ ...obj, [id]: token }), {}); | ||
await fs.writeFile('new_tokens.json', JSON.stringify(newTokens, null, 2)); | ||
EOF | ||
bun run scripts/validate-token-configs.ts | ||
- name: Check validation results | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"0x1ac831937426660d5952bc9ae0dc7c895a3c3f5f159d3518813df30181404be6": { | ||
"tokenId": "0x1ac831937426660d5952bc9ae0dc7c895a3c3f5f159d3518813df30181404be6", | ||
"deployer": "0x7AAd74b7f0d60D5867B59dbD377a71783425af47", | ||
"originalMinter": null, | ||
"prettySymbol": "agETH", | ||
"decimals": 18, | ||
"originAxelarChainId": "ethereum", | ||
"tokenType": "canonical", | ||
"deploySalt": "0x", | ||
"iconUrls": { | ||
"svg": "https://raw.githubusercontent.com/axelarnetwork/axelar-configs/main/images/tokens/ageth.svg" | ||
}, | ||
"deploymentMessageId": "0x9c77e79177ec83dff97c1d0749cd9d4cd2a7f2c6b36256d017df53819e10ab0e-476", | ||
"chains": [ | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "ethereum", | ||
"tokenAddress": "0xe1b4d34e8754600962cd944b535180bd758e6c2e", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "lockUnlock" | ||
}, | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "polygon", | ||
"tokenAddress": "0x1bD0Fe8E92a157D3ef66C9FB9e38621252b407c2", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "nativeInterchainToken" | ||
}, | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "optimism", | ||
"tokenAddress": "0x1bD0Fe8E92a157D3ef66C9FB9e38621252b407c2", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "nativeInterchainToken" | ||
}, | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "linea", | ||
"tokenAddress": "0x1bD0Fe8E92a157D3ef66C9FB9e38621252b407c2", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "mintBurn" | ||
}, | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "base", | ||
"tokenAddress": "0x1bD0Fe8E92a157D3ef66C9FB9e38621252b407c2", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "mintBurn" | ||
}, | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "scroll", | ||
"tokenAddress": "0x1bD0Fe8E92a157D3ef66C9FB9e38621252b407c2", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "mintBurn" | ||
}, | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "blast", | ||
"tokenAddress": "0x1bD0Fe8E92a157D3ef66C9FB9e38621252b407c2", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "mintBurn" | ||
}, | ||
{ | ||
"symbol": "agETH", | ||
"name": "Kelp Gain", | ||
"axelarChainId": "arbitrum", | ||
"tokenAddress": "0x1bD0Fe8E92a157D3ef66C9FB9e38621252b407c2", | ||
"tokenManager": "0xa526eDa85A1CF901E77a33493852B0aFD910Ed0d", | ||
"tokenManagerType": "mintBurn" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.