Skip to content

Commit 08c5af0

Browse files
authored
cleanup and update license (#11)
* cleanup and update license * cleanup and update license
1 parent f5cfbb2 commit 08c5af0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1784
-2396
lines changed

.eslintrc.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
version: 2
2+
3+
updates:
4+
# Enable version updates for npm (works with pnpm)
5+
- package-ecosystem: "npm"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
day: "monday"
10+
time: "06:00"
11+
timezone: "UTC"
12+
13+
# Group dependency updates by type
14+
groups:
15+
# Group all development dependencies together
16+
development-dependencies:
17+
dependency-type: "development"
18+
update-types:
19+
- "minor"
20+
- "patch"
21+
22+
# Group TypeScript and ESLint ecosystem together
23+
typescript-eslint:
24+
patterns:
25+
- "typescript"
26+
- "@typescript-eslint/*"
27+
- "eslint*"
28+
- "ts-*"
29+
30+
# Group testing dependencies
31+
testing:
32+
patterns:
33+
- "jest"
34+
- "@jest/*"
35+
- "@types/jest"
36+
- "ts-jest"
37+
38+
# Group blockchain/crypto dependencies
39+
blockchain:
40+
patterns:
41+
- "ethers"
42+
- "@solana/*"
43+
- "@safe-global/*"
44+
45+
# Open pull requests limit
46+
open-pull-requests-limit: 10
47+
48+
# Assignees and reviewers (based on CODEOWNERS)
49+
assignees:
50+
- "aelmanaa"
51+
52+
# Commit message prefix
53+
commit-message:
54+
prefix: "chore(deps)"
55+
prefix-development: "chore(deps-dev)"
56+
include: "scope"
57+
58+
# Labels for PRs
59+
labels:
60+
- "dependencies"
61+
- "automated"
62+
63+
# Allow both direct and indirect updates
64+
versioning-strategy: auto
65+
66+
# Rebase strategy for conflicts
67+
rebase-strategy: "auto"
68+
69+
# Ignore specific dependencies or versions if needed
70+
ignore:
71+
# Ignore major version updates for stable packages
72+
- dependency-name: "*"
73+
update-types: ["version-update:semver-major"]
74+
75+
# Pull request branch name prefix
76+
pull-request-branch-name:
77+
separator: "/"
78+
79+
# GitHub Actions workflow dependencies
80+
- package-ecosystem: "github-actions"
81+
directory: "/"
82+
schedule:
83+
interval: "weekly"
84+
day: "monday"
85+
time: "06:00"
86+
timezone: "UTC"
87+
88+
commit-message:
89+
prefix: "chore(ci)"
90+
include: "scope"
91+
92+
labels:
93+
- "ci"
94+
- "automated"
95+
96+
assignees:
97+
- "aelmanaa"
98+
99+
open-pull-requests-limit: 5
100+

.github/workflows/ci.yml

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
workflow_dispatch:
9+
10+
# Cancel in-progress runs when a new workflow with the same group name is triggered
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
jobs:
20+
lint-and-format:
21+
name: Lint & Format Check
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
node-version: [22.x, latest]
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v6
30+
31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.0.0
33+
with:
34+
version: 10
35+
36+
- name: Setup Node.js ${{ matrix.node-version }}
37+
uses: actions/setup-node@v6
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
cache: 'pnpm'
41+
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile
44+
45+
- name: Run ESLint
46+
run: pnpm lint:check
47+
48+
- name: Run Prettier
49+
run: pnpm format:check
50+
51+
- name: TypeScript type check
52+
run: pnpm build
53+
54+
security-audit:
55+
name: Security Audit
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v6
61+
62+
- name: Setup pnpm
63+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.0.0
64+
with:
65+
version: 10
66+
67+
- name: Setup Node.js
68+
uses: actions/setup-node@v6
69+
with:
70+
node-version: 22.x
71+
cache: 'pnpm'
72+
73+
- name: Install dependencies
74+
run: pnpm install --frozen-lockfile
75+
76+
- name: Run security audit
77+
run: pnpm audit --audit-level=high
78+
continue-on-error: false
79+
80+
test:
81+
name: Test
82+
runs-on: ubuntu-latest
83+
strategy:
84+
matrix:
85+
node-version: [22.x, latest]
86+
87+
steps:
88+
- name: Checkout code
89+
uses: actions/checkout@v6
90+
91+
- name: Setup pnpm
92+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.0.0
93+
with:
94+
version: 10
95+
96+
- name: Setup Node.js ${{ matrix.node-version }}
97+
uses: actions/setup-node@v6
98+
with:
99+
node-version: ${{ matrix.node-version }}
100+
cache: 'pnpm'
101+
102+
- name: Install dependencies
103+
run: pnpm install --frozen-lockfile
104+
105+
- name: Run tests
106+
run: pnpm test
107+
108+
- name: Run tests with coverage
109+
run: pnpm test:coverage
110+
111+
- name: Upload coverage artifacts
112+
if: matrix.node-version == '22.x'
113+
uses: actions/upload-artifact@v5
114+
with:
115+
name: coverage-report
116+
path: coverage/
117+
retention-days: 7
118+
continue-on-error: true
119+
120+
build:
121+
name: Build & Validate
122+
runs-on: ubuntu-latest
123+
strategy:
124+
matrix:
125+
node-version: [22.x, latest]
126+
127+
steps:
128+
- name: Checkout code
129+
uses: actions/checkout@v6
130+
131+
- name: Setup pnpm
132+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.0.0
133+
with:
134+
version: 10
135+
136+
- name: Setup Node.js ${{ matrix.node-version }}
137+
uses: actions/setup-node@v6
138+
with:
139+
node-version: ${{ matrix.node-version }}
140+
cache: 'pnpm'
141+
142+
- name: Install dependencies
143+
run: pnpm install --frozen-lockfile
144+
145+
- name: Build project
146+
run: pnpm build
147+
148+
- name: Verify dist directory exists
149+
run: |
150+
if [ ! -d "dist" ]; then
151+
echo "Error: dist directory not created"
152+
exit 1
153+
fi
154+
155+
- name: Verify CLI binary exists
156+
run: |
157+
if [ ! -f "dist/cli.js" ]; then
158+
echo "Error: CLI binary not found"
159+
exit 1
160+
fi
161+
162+
- name: Verify typechain artifacts
163+
run: |
164+
if [ ! -d "src/typechain" ]; then
165+
echo "Error: typechain directory not found"
166+
exit 1
167+
fi
168+
169+
- name: Upload build artifacts
170+
if: matrix.node-version == '22.x'
171+
uses: actions/upload-artifact@v5
172+
with:
173+
name: dist
174+
path: dist/
175+
retention-days: 7
176+
177+
# Summary job that depends on all other jobs
178+
ci-success:
179+
name: CI Success
180+
runs-on: ubuntu-latest
181+
needs: [lint-and-format, security-audit, test, build]
182+
if: always()
183+
184+
steps:
185+
- name: Check job results
186+
run: |
187+
if [[ "${{ needs.lint-and-format.result }}" != "success" ]]; then
188+
echo "Lint and format check failed"
189+
exit 1
190+
fi
191+
if [[ "${{ needs.security-audit.result }}" != "success" ]]; then
192+
echo "Security audit failed"
193+
exit 1
194+
fi
195+
if [[ "${{ needs.test.result }}" != "success" ]]; then
196+
echo "Tests failed"
197+
exit 1
198+
fi
199+
if [[ "${{ needs.build.result }}" != "success" ]]; then
200+
echo "Build failed"
201+
exit 1
202+
fi
203+
echo "All CI checks passed successfully!"
204+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ pnpm-debug.log*
3333
Thumbs.db
3434

3535
output/
36+
coverage

.husky/pre-commit

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

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) 2025 Smartcontract Chainlink Limited SEZC
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)