-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 281e6ae
Showing
27 changed files
with
6,315 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'], | ||
extends: [ | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript' | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
rules: { | ||
'@typescript-eslint/array-type': 'warn', | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'@typescript-eslint/camelcase': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
"@typescript-eslint/no-floating-promises": "error", | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'always', | ||
alphabetize: { | ||
order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */, | ||
caseInsensitive: true /* ignore case. Options: [true, false] */, | ||
}, | ||
pathGroupsExcludedImportTypes: ['builtin'], | ||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'], | ||
}, | ||
], | ||
'eqeqeq': 'error', | ||
'import/no-named-as-default': 'off', | ||
'import/no-unresolved': 'off', | ||
'lines-between-class-members': [ | ||
'error', | ||
'always', | ||
{ | ||
'exceptAfterSingleLine': true | ||
} | ||
], | ||
'max-len': ['error', { code: 100, ignoreComments: true, ignoreStrings: true, ignoreTemplateLiterals: true }], | ||
'no-implicit-coercion': ['error', { allow: ['!!'] }], | ||
'no-negated-condition': 'off', | ||
'prettier/prettier': ['error', { printWidth: 100, endOfLine: "auto" }], | ||
// 'quotes': ['warn', 'single', { 'avoidEscape': true }], | ||
}, | ||
}; | ||
|
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,59 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: choice | ||
description: Tag | ||
required: true | ||
options: | ||
- beta | ||
- latest | ||
|
||
jobs: | ||
build-publish: | ||
name: Build & publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Write npm credentials | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> .npmrc | ||
npm whoami | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache | ||
env: | ||
cache-name: subsquid-manifest | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}-yarn- | ||
- name: Install | ||
run: yarn install | ||
|
||
- name: Test | ||
run: yarn test | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Release | ||
run: npm publish --tag ${{ github.event.inputs.tag }} --access public | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |
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,48 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
paths: | ||
- .github/workflows/test.yaml | ||
- src/** | ||
- bin/** | ||
- yarn.lock | ||
|
||
jobs: | ||
setup-build-publish-deploy: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache | ||
env: | ||
cache-name: rest-api | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}-yarn- | ||
- name: Install | ||
run: yarn install | ||
|
||
- name: Typescript check | ||
run: yarn tsc | ||
|
||
- name: Unit tests | ||
run: yarn test:unit |
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,4 @@ | ||
.idea | ||
dist | ||
node_modules | ||
yarn-error.log |
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,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 80, | ||
"arrowParens": "avoid" | ||
} |
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,124 @@ | ||
[ | ||
{ "name": "acala", "type": "substrate" }, | ||
|
||
{ "name": "aleph-zero", "type": "substrate" }, | ||
{ "name": "aleph-zero-testnet", "type": "substrate" }, | ||
|
||
{ "name": "amplitude", "type": "substrate" }, | ||
|
||
{ "name": "arbitrum-one", "type": "evm" }, | ||
{ "name": "arbitrum-goerli", "type": "evm" }, | ||
{ "name": "arbitrum-sepolia", "type": "evm" }, | ||
|
||
{ "name": "arbitrum-nova", "type": "evm" }, | ||
|
||
{ "name": "asset-hub-kusama", "type": "substrate" }, | ||
{ "name": "asset-hub-polkadot", "type": "substrate" }, | ||
{ "name": "asset-hub-rococo", "type": "substrate" }, | ||
{ "name": "asset-hub-westend", "type": "substrate" }, | ||
|
||
{ "name": "astar", "type": "evm" }, | ||
{ "name": "astar", "type": "substrate" }, | ||
|
||
{ "name": "ava", "type": "evm" }, | ||
{ "name": "ava-testnet", "type": "evm" }, | ||
|
||
{ "name": "base", "type": "evm" }, | ||
{ "name": "base-goerli", "type": "evm" }, | ||
{ "name": "base-sepolia", "type": "evm" }, | ||
|
||
{ "name": "basilisk", "type": "substrate" }, | ||
|
||
{ "name": "bridge-hub-kusama", "type": "substrate" }, | ||
{ "name": "bridge-hub-polkadot", "type": "substrate" }, | ||
{ "name": "bridge-hub-rococo", "type": "substrate" }, | ||
{ "name": "bridge-hub-westend", "type": "substrate" }, | ||
|
||
{ "name": "bsc", "type": "evm" }, | ||
{ "name": "bsc-testnet", "type": "evm" }, | ||
|
||
{ "name": "centrifuge", "type": "substrate" }, | ||
|
||
{ "name": "collectives-polkadot", "type": "substrate" }, | ||
{ "name": "collectives-westend", "type": "substrate" }, | ||
|
||
{ "name": "crust", "type": "substrate" }, | ||
|
||
{ "name": "darwinia", "type": "substrate" }, | ||
{ "name": "darwiniacrab", "type": "substrate" }, | ||
|
||
{ "name": "eden", "type": "substrate" }, | ||
|
||
{ "name": "eth", "type": "evm" }, | ||
{ "name": "eth-goerli", "type": "evm" }, | ||
{ "name": "eth-holesky", "type": "evm" }, | ||
{ "name": "eth-sepolia", "type": "evm" }, | ||
|
||
{ "name": "evmos", "type": "evm" }, | ||
|
||
{ "name": "fantom", "type": "evm" }, | ||
{ "name": "fantom-testnet", "type": "evm" }, | ||
|
||
{ "name": "frequency", "type": "substrate" }, | ||
|
||
{ "name": "gnosis", "type": "evm" }, | ||
|
||
{ "name": "hydradx", "type": "substrate" }, | ||
|
||
{ "name": "interlay", "type": "substrate" }, | ||
|
||
{ "name": "karura", "type": "substrate" }, | ||
|
||
{ "name": "khala", "type": "substrate" }, | ||
|
||
{ "name": "kilt", "type": "substrate" }, | ||
|
||
{ "name": "kintsugi", "type": "substrate" }, | ||
|
||
{ "name": "kusama", "type": "substrate" }, | ||
|
||
{ "name": "litentry", "type": "substrate" }, | ||
|
||
{ "name": "mantle", "type": "evm" }, | ||
|
||
{ "name": "metis", "type": "evm" }, | ||
|
||
{ "name": "moonbase-alpha", "type": "evm" }, | ||
{ "name": "moonbase", "type": "substrate" }, | ||
|
||
{ "name": "moonbeam", "type": "evm" }, | ||
{ "name": "moonbeam", "type": "substrate" }, | ||
|
||
{ "name": "moonriver", "type": "evm" }, | ||
{ "name": "moonriver", "type": "substrate" }, | ||
|
||
{ "name": "oktc", "type": "evm" }, | ||
|
||
{ "name": "optimism", "type": "evm" }, | ||
{ "name": "optimism-goerli", "type": "evm" }, | ||
|
||
{ "name": "pendulum", "type": "substrate" }, | ||
|
||
{ "name": "phala", "type": "substrate" }, | ||
|
||
{ "name": "polkadex", "type": "substrate" }, | ||
|
||
{ "name": "polkadot", "type": "substrate" }, | ||
|
||
{ "name": "polygon", "type": "evm" }, | ||
{ "name": "polygon-testnet", "type": "evm" }, | ||
{ "name": "polygon-zkevm", "type": "evm" }, | ||
{ "name": "polygon-zkevm-testnet", "type": "evm" }, | ||
|
||
{ "name": "rococo", "type": "substrate" }, | ||
|
||
{ "name": "shibuya", "type": "evm" }, | ||
{ "name": "shibuya", "type": "substrate" }, | ||
|
||
{ "name": "shiden", "type": "evm" }, | ||
{ "name": "shiden", "type": "substrate" }, | ||
|
||
{ "name": "turing", "type": "substrate" }, | ||
|
||
{ "name": "zeitgeist", "type": "substrate" } | ||
] |
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,67 @@ | ||
{ | ||
"name": "@subsquid/manifest", | ||
"type": "commonjs", | ||
"version": "0.0.1-beta.11", | ||
"homepage": "https://www.subsquid.io", | ||
"repository": "https://github.com/subsquid/manifest.git", | ||
"license": "GPL-3.0-or-later", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"lint": "eslint --fix src/**/*.ts", | ||
"typecheck": "tsc --noEmit", | ||
"build": "rm -rf dist && tsc -p tsconfig.build.json", | ||
"test": "jest --runInBand --testRegex=.test.ts$", | ||
"generate": "ts-node scripts/generate-rpc-endpoints.ts && eslint --fix src/rpc_networks.ts && ts-node scripts/generate-json-schema.ts" | ||
}, | ||
"main": "./dist/index.js", | ||
"files": [ | ||
"dist", | ||
"networks.json" | ||
], | ||
"dependencies": { | ||
"joi": "^17.12.0", | ||
"js-yaml": "^4.1.0", | ||
"lodash": "^4.17.21" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.11", | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/lodash-es": "^4.17.12", | ||
"@typescript-eslint/eslint-plugin": "^6.19.1", | ||
"@typescript-eslint/parser": "^6.19.1", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"jest": "^29.7.0", | ||
"joi-to-json": "^4.2.1", | ||
"prettier": "^3.2.4", | ||
"ts-jest": "^29.1.2", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.3.3" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": ".", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"collectCoverageFrom": [ | ||
"src/**/{!(.spec),}.(t|j)s" | ||
], | ||
"coverageDirectory": "./coverage", | ||
"testEnvironment": "node", | ||
"moduleNameMapper": { | ||
"@libs/(.*)": "<rootDir>/libs/$1", | ||
"@apps/(.+)": "<rootDir>/apps/$1", | ||
"@apps": "<rootDir>/apps/index", | ||
"@api/(.+)": "<rootDir>/api/$1" | ||
} | ||
} | ||
} |
Oops, something went wrong.