Skip to content

Commit

Permalink
Fix list, test, add tokens (#16)
Browse files Browse the repository at this point in the history
* Fix the list to match the on-chain data

* Add tests

* 1.2.1

* Add script to add tokens

* Fix workflow
  • Loading branch information
gabmontes authored Dec 2, 2024
1 parent d1c40c8 commit 4c94c79
Show file tree
Hide file tree
Showing 10 changed files with 421 additions and 40 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/js-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,30 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

# The reusable workflow at bloq/actions/.github/workflows/js-checks.yml@v1
# cannot be used as environment variables must be sent to the test command to
# overwrite the EVM RPC URL of Hemi mainnet. When this is not needed anymore,
# the custom workflow should be replaced by the reusable one.

jobs:
js-checks:
uses: hemilabs/actions/.github/workflows/js-checks.yml@main
with:
node-versions: '["16", "18", "20", "22"]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bloq/actions/setup-node-env@v1
with:
cache: npm
- run: npm run --if-present format:check
- run: npm run --if-present lint
- run: npm run --if-present deps:check
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bloq/actions/setup-node-env@v1
with:
cache: npm
- run: npm run test
env:
EVM_RPC_URL_43111: ${{ secrets.EVM_RPC_URL_43111 }}
EVM_RPC_URL_743111: ${{ secrets.WEB3_RPC_743111 }}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
npm run version
lint-staged
6 changes: 2 additions & 4 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const formatFiles = "prettier --ignore-unknown --write";
const sortPackageJson = "better-sort-package-json";

module.exports = {
"!(*.{js,json,md,svg,ts,tsx,yml}|package.json)": [formatFiles],
"*.{js,md,svg,ts,tsx,yml}": [formatFiles],
"src/*.json": [formatFiles],
export default {
"!package.json": [formatFiles],
"package.json": [sortPackageJson, formatFiles],
};
219 changes: 216 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hemilabs/token-list",
"version": "1.2.0",
"version": "1.2.1",
"description": "List of ERC-20 tokens in the Hemi Network chains",
"bugs": {
"url": "https://github.com/hemilabs/token-list/issues"
Expand All @@ -21,14 +21,18 @@
"scripts": {
"format:check": "prettier --check .",
"prepare": "husky",
"test": "node --test",
"version": "node scripts/sync-version.js && git add ."
},
"devDependencies": {
"@commitlint/cli": "19.5.0",
"better-sort-package-json": "1.1.0",
"commitlint-config-bloq": "1.1.0",
"hemi-viem": "^1.6.1",
"husky": "9.1.6",
"lint-staged": "15.2.10",
"prettier": "3.3.3"
}
"prettier": "3.3.3",
"viem": "^2.21.51"
},
"type": "module"
}
Loading

0 comments on commit 4c94c79

Please sign in to comment.