Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit 2eb895d

Browse files
committed
feat(package): initial commit
0 parents  commit 2eb895d

26 files changed

+5301
-0
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Local env vars for debugging
2+
TS_NODE_IGNORE="false"
3+
TS_NODE_FILES="true"

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ETHERSCAN_API_KEY=
2+
RPC_URL=

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/types/global.d.ts

.eslintrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"project": ["./tsconfig.json"]
5+
},
6+
"plugins": ["@typescript-eslint", "node"],
7+
"extends": ["plugin:node/recommended", "plugin:@typescript-eslint/eslint-recommended"],
8+
"rules": {
9+
"node/no-missing-import": "off",
10+
"node/no-unsupported-features/es-syntax": "off",
11+
"node/shebang": "off"
12+
}
13+
}

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the repository to show as TypeScript rather than JS in GitHub
2+
*.js linguist-detectable=false

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: "🐛 Bug Report"
3+
about: Report a reproducible bug or regression.
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Current Behavior
11+
12+
<!-- Describe how the issue manifests. -->
13+
14+
## Expected Behavior
15+
16+
<!-- Describe what the desired behavior would be. -->
17+
18+
## Steps to Reproduce the Problem
19+
20+
1.
21+
1.
22+
1.
23+
24+
## Environment
25+
26+
- Version: <!-- Version set in package.json -->
27+
- Platform: <!-- Win/Mac/Linux -->
28+
- Node.js Version: <!-- Output of running `node -v` -->
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: 🌈 Feature request
3+
about: Suggest an amazing new idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Feature Request
11+
12+
**Is your feature request related to a problem? Please describe.**
13+
<!-- A clear and concise description of what the problem is. Ex. I have an issue when [...] -->
14+
15+
**Describe the solution you'd like**
16+
<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. -->
17+
18+
**Describe alternatives you've considered**
19+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
20+
21+
## Are you willing to resolve this issue by submitting a Pull Request?
22+
23+
<!--
24+
Remember that first-time contributors are welcome! 🙌
25+
-->
26+
27+
- [ ] Yes, I have the time, and I know how to start.
28+
- [ ] Yes, I have the time, but I don't know how to start. I would need guidance.
29+
- [ ] No, I don't have the time, although I believe I could do it if I had the time...
30+
- [ ] No, I don't have the time and I wouldn't even know how to start.
31+
32+
<!--
33+
👋 Have a great day and thank you for the feature request!
34+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
😀 Wonderful! Thank you for opening a pull request.
3+
4+
Please fill in the information below to expedite the review
5+
and (hopefully) merge of your change.
6+
-->
7+
8+
### Description of change
9+
10+
<!--
11+
Please be clear and concise what the change is intended to do,
12+
why this change is needed, and how you've verified that it
13+
corrects what you intended.
14+
15+
In some cases it may be helpful to include the current behavior
16+
and the new behavior.
17+
18+
If the change is related to an open issue, you can link it here.
19+
If you include `Fixes #0000` (replacing `0000` with the issue number)
20+
when this is merged it will automatically mark the issue as fixed and
21+
close it.
22+
-->
23+
24+
### Pull-Request Checklist
25+
26+
<!--
27+
Please make sure to review and check all of the following.
28+
29+
If an item is not applicable, you can add "N/A" to the end.
30+
-->
31+
32+
- [ ] Code is up-to-date with the `main` branch
33+
- [ ] `npm run lint` passes with this change
34+
- [ ] `npm run test` passes with this change
35+
- [ ] This pull request links relevant issues as `Fixes #0000`
36+
- [ ] There are new or updated unit tests validating the change
37+
- [ ] Documentation has been updated to reflect this change
38+
- [ ] The new commits follow conventions outlined in the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/)
39+
40+
<!--
41+
🎉 Thank you for contributing!
42+
-->

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish package release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_call:
8+
secrets:
9+
NPM_TOKEN:
10+
required: true
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: lts/*
30+
31+
- name: Install dependencies
32+
run: yarn
33+
34+
- name: Build package
35+
run: yarn build
36+
37+
- name: Publish package
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: npx semantic-release

.gitignore

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env.test
73+
.env.local
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
.parcel-cache
78+
79+
# Next.js build output
80+
.next
81+
out
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and not Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
# Stores VSCode versions used for testing VSCode extensions
109+
.vscode
110+
.vscode-test
111+
112+
# yarn v2
113+
.yarn/cache
114+
.yarn/unplugged
115+
.yarn/build-state.yml
116+
.yarn/install-state.gz
117+
.pnp.*
118+
119+
# Compiled code
120+
lib/
121+
122+
sources

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.husky/prepare-commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
exec </dev/tty && node_modules/.bin/cz --hook || true

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"tabWidth": 2,
3+
"singleQuote": false,
4+
"trailingComma": "es5",
5+
"printWidth": 100,
6+
"importOrder": ["^@", "^\\.\\.", "^\\."],
7+
"importOrderSeparation": true
8+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Ryan Sonshine
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)