Skip to content

Commit

Permalink
set up project
Browse files Browse the repository at this point in the history
Signed-off-by: James Ng <[email protected]>
  • Loading branch information
0xj4m35 committed Nov 10, 2024
0 parents commit 1a56b6e
Show file tree
Hide file tree
Showing 13 changed files with 324 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI
on:
pull_request:
branches:
- "*"
jobs:
validate-data:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run validate data
run: pnpm run test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
node_modules
.idea
.vscode
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
package-manager-strict=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Minswap tokens

## Requirements

```yaml
# 1 token = 1 yaml file
# filename: policyId + tokenName (like cardano-token-registry)
# merge verified-tokens and market-cap into 1 new repo, then archive those 2 old repos (to avoid breaking changes with integrators)

projectName: Minswap
categories:
- DeFi
- DAO

socialLinks:
website: https://
discord: ...

unverified: true # default false, if a token violate verification policy then turn on

maxSupply: 500000000
# or
maxSupply: https://...

treasuryWallets:
- addr...
- addr...
- https://...

burnWallets:
- addr...
- https://...

# total = max - burn
# circulating = max - burn - treasury
```
77 changes: 77 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"defaultBranch": "main",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": ["node_modules/**", ".vscode/**"]
},
"formatter": {
"bracketSpacing": true,
"enabled": true,
"lineWidth": 120,
"useEditorconfig": true
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"complexity": {
"noUselessFragments": "error",
"noUselessStringConcat": "error",
"useArrowFunction": "off",
"useLiteralKeys": "off",
"useOptionalChain": "warn"
},
"correctness": {
"all": true,
"noUndeclaredDependencies": "off",
"useImportExtensions": "off",
"noNodejsModules": "off"
},
"nursery": {
"noDescendingSpecificity": "error",
"noNestedTernary": "off",
"noOctalEscape": "error",
"noTemplateCurlyInString": "error",
"noUselessEscapeInRegex": "error",
"noEnum": "error"
},
"performance": {
"all": true
},
"recommended": true,
"style": {
"noArguments": "error",
"noParameterAssign": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"useLiteralEnumMembers": "error",
"useTemplate": "error"
},
"suspicious": {
"noArrayIndexKey": "error",
"noAssignInExpressions": "error",
"noPrototypeBuiltins": "error"
}
}
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"quoteStyle": "double",
"semicolons": "always",
"trailingCommas": "all"
}
},
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": true
}
}
}
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "minswap-tokens",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Test run\" && exit 0",
"lint": "biome check --no-errors-on-unmatched --fix ."
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903",
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@total-typescript/ts-reset": "^0.6.1",
"typescript": "^5.6.3"
}
}
123 changes: 123 additions & 0 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions reset.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "@total-typescript/ts-reset";
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const add = (a: number, b: number) => {
return a + b;
};

console.log(add(1, 2));
Empty file added src/tokens/.keep
Empty file.
22 changes: 22 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"incremental": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["DOM", "DOM.Iterable", "ES2015"],
"module": "commonjs",
"moduleResolution": "node",
"noEmit": true,
"paths": {
"@/*": ["./src/*"]
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "es6"
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.d.ts"]
}

0 comments on commit 1a56b6e

Please sign in to comment.