Skip to content
Open
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
22 changes: 11 additions & 11 deletions .github/scripts/generateMatrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const arbitrumCommands: Command[] = [
paths: ['ArbTokenLists/arbed_full.json'],
version: false,
command:
'yarn fullList --l2NetworkID 42161 --newArbifiedList ./src/ArbTokenLists/arbed_full.json --skipValidation',
'pnpm fullList --l2NetworkID 42161 --newArbifiedList ./src/ArbTokenLists/arbed_full.json --skipValidation',
},
{
name: 'Arb1 Arbify Uniswap',
Expand All @@ -24,28 +24,28 @@ const arbitrumCommands: Command[] = [
],
version: true,
command:
'yarn arbify --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --tokenList https://tokens.uniswap.org --newArbifiedList ./src/ArbTokenLists/arbed_uniswap_labs.json && cp ./src/ArbTokenLists/arbed_uniswap_labs.json ./src/ArbTokenLists/arbed_uniswap_labs_default.json',
'pnpm arbify --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --tokenList https://tokens.uniswap.org --newArbifiedList ./src/ArbTokenLists/arbed_uniswap_labs.json && cp ./src/ArbTokenLists/arbed_uniswap_labs.json ./src/ArbTokenLists/arbed_uniswap_labs_default.json',
},
{
name: 'Arb1 Arbify CMC',
paths: ['ArbTokenLists/arbed_coinmarketcap.json'],
version: true,
command:
'yarn arbify --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_coinmarketcap.json --tokenList https://api.coinmarketcap.com/data-api/v3/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/arbed_coinmarketcap.json',
'pnpm arbify --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_coinmarketcap.json --tokenList https://api.coinmarketcap.com/data-api/v3/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/arbed_coinmarketcap.json',
},
{
name: 'Arb1 Arbify CoinGecko',
paths: ['ArbTokenLists/arbed_coingecko.json'],
version: true,
command:
'yarn arbify --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_coingecko.json --tokenList https://tokens.coingecko.com/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/arbed_coingecko.json',
'pnpm arbify --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_coingecko.json --tokenList https://tokens.coingecko.com/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/arbed_coingecko.json',
},
{
name: 'Arb1 Update Whitelist',
paths: ['ArbTokenLists/arbed_arb_whitelist_era.json'],
version: true,
command:
'yarn update --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_arb_whitelist_era.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_arb_whitelist_era.json --includeOldDataFields true --newArbifiedList ./src/ArbTokenLists/arbed_arb_whitelist_era.json',
'pnpm update --l2NetworkID 42161 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_arb_whitelist_era.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_arb_whitelist_era.json --includeOldDataFields true --newArbifiedList ./src/ArbTokenLists/arbed_arb_whitelist_era.json',
},
// Arb Nova
{
Expand All @@ -56,36 +56,36 @@ const arbitrumCommands: Command[] = [
],
version: true,
command:
'yarn arbify --l2NetworkID 42170 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/42170_arbed_uniswap_labs_default.json --newArbifiedList ./src/ArbTokenLists/42170_arbed_uniswap_labs.json --tokenList https://tokens.uniswap.org && cp ./src/ArbTokenLists/42170_arbed_uniswap_labs.json ./src/ArbTokenLists/42170_arbed_uniswap_labs_default.json',
'pnpm arbify --l2NetworkID 42170 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/42170_arbed_uniswap_labs_default.json --newArbifiedList ./src/ArbTokenLists/42170_arbed_uniswap_labs.json --tokenList https://tokens.uniswap.org && cp ./src/ArbTokenLists/42170_arbed_uniswap_labs.json ./src/ArbTokenLists/42170_arbed_uniswap_labs_default.json',
},
{
name: 'ArbNova Arbify CMC',
paths: ['ArbTokenLists/42170_arbed_coinmarketcap.json'],
version: true,
command:
'yarn arbify --l2NetworkID 42170 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/42170_arbed_coinmarketcap.json --tokenList https://api.coinmarketcap.com/data-api/v3/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/42170_arbed_coinmarketcap.json',
'pnpm arbify --l2NetworkID 42170 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/42170_arbed_coinmarketcap.json --tokenList https://api.coinmarketcap.com/data-api/v3/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/42170_arbed_coinmarketcap.json',
},
{
name: 'ArbNova Arbify CoinGecko',
paths: ['ArbTokenLists/42170_arbed_coingecko.json'],
version: true,
command:
'yarn arbify --l2NetworkID 42170 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/42170_arbed_coingecko.json --tokenList https://tokens.coingecko.com/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/42170_arbed_coingecko.json',
'pnpm arbify --l2NetworkID 42170 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/42170_arbed_coingecko.json --tokenList https://tokens.coingecko.com/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/42170_arbed_coingecko.json',
},
// ArbSepolia
{
name: 'ArbSepolia Arbify Uniswap',
paths: ['ArbTokenLists/421614_arbed_uniswap_labs.json'],
version: true,
command:
'yarn arbify --l2NetworkID 421614 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/421614_arbed_uniswap_labs.json --tokenList https://tokens.uniswap.org --newArbifiedList ./src/ArbTokenLists/421614_arbed_uniswap_labs.json',
'pnpm arbify --l2NetworkID 421614 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/421614_arbed_uniswap_labs.json --tokenList https://tokens.uniswap.org --newArbifiedList ./src/ArbTokenLists/421614_arbed_uniswap_labs.json',
},
{
name: 'ArbSepolia Arbify CoinGecko',
paths: ['ArbTokenLists/421614_arbed_coingecko.json'],
version: true,
command:
'yarn arbify --l2NetworkID 421614 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/421614_arbed_coingecko.json --tokenList https://tokens.coingecko.com/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/421614_arbed_coingecko.json',
'pnpm arbify --l2NetworkID 421614 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/421614_arbed_coingecko.json --tokenList https://tokens.coingecko.com/uniswap/all.json --newArbifiedList ./src/ArbTokenLists/421614_arbed_coingecko.json',
},
];

Expand Down Expand Up @@ -116,7 +116,7 @@ async function addCommand({
name,
paths: [path],
version: true,
command: `yarn arbify --l2NetworkID ${chainId} ${previousListFlag} --tokenList ${inputList} --newArbifiedList ./src/${path}`,
command: `pnpm arbify --l2NetworkID ${chainId} ${previousListFlag} --tokenList ${inputList} --newArbifiedList ./src/${path}`,
};
}

Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Generate orbit chains data
run: yarn generate:orbitChainsData
run: pnpm generate:orbitChainsData

- name: Check formatting with Prettier
run: yarn prettier:check
run: pnpm prettier:check

integration-test:
name: 'Integration tests'
Expand All @@ -47,14 +55,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Generate orbit chains data
run: yarn generate:orbitChainsData
run: pnpm generate:orbitChainsData

- name: Test
run: yarn test:integration
run: pnpm test:integration

unit-test:
name: 'Unit tests'
Expand All @@ -71,14 +87,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Generate orbit chains data
run: yarn generate:orbitChainsData
run: pnpm generate:orbitChainsData

- name: Test
run: yarn test:unit
run: pnpm test:unit

generate-token-lists:
uses: ./.github/workflows/generate-token-lists.yml
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/generate-token-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Generate orbit chains data
run: yarn generate:orbitChainsData
run: pnpm generate:orbitChainsData

- id: set-matrix
run: echo "matrix=$(npm run generate:matrix --silent)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -70,11 +78,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Generate orbit chains data
run: yarn generate:orbitChainsData
run: pnpm generate:orbitChainsData

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
Expand Down
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
"license": "MIT",
"scripts": {
"generate:matrix": "ts-node .github/scripts/generateMatrix.ts",
"generate:orbitChainsData": "ts-node src/scripts/fetchOrbitChainsData.ts && yarn prettier 'src/Assets/orbitChainsData.json' --write",
"postinstall": "yarn generate:orbitChainsData",
"generate:orbitChainsData": "ts-node src/scripts/fetchOrbitChainsData.ts && pnpm prettier 'src/Assets/orbitChainsData.json' --write",
"postinstall": "pnpm generate:orbitChainsData",
"build": "tsc",
"main": "ts-node src/main.ts",
"lint": "tsc --noEmit && eslint 'src/**/*.{js,ts,tsx}'",
"prettier:format": "yarn prettier './**/*.{js,json,md,ts,yml}' --write && yarn run lint --fix",
"prettier:check": "yarn prettier './**/*.{js,json,md,ts,yml}' --check && yarn run lint --fix",
"update": "yarn ts-node src/main.ts update",
"arbify": "yarn ts-node src/main.ts arbify",
"permit": "yarn ts-node src/main.ts permit",
"fullList": "yarn ts-node src/main.ts full --tokenList full --ignorePreviousList",
"allTokensList": "yarn ts-node src/main.ts alltokenslist --tokenList full",
"updateNova": "yarn ts-node src/main.ts update --l2NetworkID 42170",
"novaify": "yarn ts-node src/main.ts arbify --l2NetworkID 42170",
"fullNova": "yarn ts-node src/main.ts full --tokenList full --l2NetworkID 42170",
"prettier:format": "pnpm prettier './**/*.{js,json,md,ts,yml}' --write && pnpm run lint --fix",
"prettier:check": "pnpm prettier './**/*.{js,json,md,ts,yml}' --check && pnpm run lint --fix",
"update": "pnpm ts-node src/main.ts update",
"arbify": "pnpm ts-node src/main.ts arbify",
"permit": "pnpm ts-node src/main.ts permit",
"fullList": "pnpm ts-node src/main.ts full --tokenList full --ignorePreviousList",
"allTokensList": "pnpm ts-node src/main.ts alltokenslist --tokenList full",
"updateNova": "pnpm ts-node src/main.ts update --l2NetworkID 42170",
"novaify": "pnpm ts-node src/main.ts arbify --l2NetworkID 42170",
"fullNova": "pnpm ts-node src/main.ts full --tokenList full --l2NetworkID 42170",
"test": "jest --runInBand --silent",
"test:integration": "yarn test --ci __test__/integration",
"test:unit": "yarn test --ci __test__/unit"
"test:integration": "pnpm test --ci __test__/integration",
"test:unit": "pnpm test --ci __test__/unit"
},
"dependencies": {
"@arbitrum/sdk": "^4.0.2",
Expand All @@ -35,6 +35,7 @@
"better-ajv-errors": "^1.1.2",
"dotenv": "^16.0.3",
"dotenv-expand": "^10.0.0",
"ethers": "^5.1.0",
"graphql": "^15.6.1",
"graphql-request": "^3.6.1",
"ts-node": "^10.8.1",
Expand Down
Loading
Loading