Skip to content

Commit 0d0395e

Browse files
committed
feat: TokenPool calldata generation CLI for CCIP
Generate transaction calldata and Safe Transaction Builder JSON for Chainlink CCIP TokenPool contract operations. Features: - Token and pool deployment via TokenPoolFactory - Cross-chain configuration (applyChainUpdates) - Rate limiter and allow list management - Mint and role management transactions - Safe multisig JSON output format
0 parents  commit 0d0395e

File tree

123 files changed

+36443
-0
lines changed

Some content is hidden

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

123 files changed

+36443
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @smartcontractkit/devrel

.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: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
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: Lint
46+
run: |
47+
# Enforce zero warnings policy
48+
pnpm lint:check 2>&1 | tee lint-output.txt
49+
if grep -qE "✖.*problem" lint-output.txt; then
50+
echo "Error: Linting issues detected. Run 'pnpm lint:fix' to resolve."
51+
exit 1
52+
fi
53+
54+
- name: Run Prettier
55+
run: pnpm format:check
56+
57+
- name: TypeScript type check
58+
run: pnpm build
59+
60+
security-audit:
61+
name: Security Audit
62+
runs-on: ubuntu-latest
63+
64+
steps:
65+
- name: Checkout code
66+
uses: actions/checkout@v6
67+
68+
- name: Setup pnpm
69+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.0.0
70+
with:
71+
version: 10
72+
73+
- name: Setup Node.js
74+
uses: actions/setup-node@v6
75+
with:
76+
node-version: 22.x
77+
cache: 'pnpm'
78+
79+
- name: Install dependencies
80+
run: pnpm install --frozen-lockfile
81+
82+
- name: Run security audit
83+
run: pnpm audit --audit-level=high
84+
continue-on-error: false
85+
86+
test:
87+
name: Test
88+
runs-on: ubuntu-latest
89+
strategy:
90+
matrix:
91+
node-version: [22.x, latest]
92+
93+
steps:
94+
- name: Checkout code
95+
uses: actions/checkout@v6
96+
97+
- name: Setup pnpm
98+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.0.0
99+
with:
100+
version: 10
101+
102+
- name: Setup Node.js ${{ matrix.node-version }}
103+
uses: actions/setup-node@v6
104+
with:
105+
node-version: ${{ matrix.node-version }}
106+
cache: 'pnpm'
107+
108+
- name: Install dependencies
109+
run: pnpm install --frozen-lockfile
110+
111+
- name: Run tests
112+
run: pnpm test
113+
114+
- name: Test with coverage
115+
run: pnpm test:coverage
116+
# Coverage thresholds enforced by jest.config.ts
117+
118+
- name: Upload coverage artifacts
119+
if: matrix.node-version == '22.x'
120+
uses: actions/upload-artifact@v5
121+
with:
122+
name: coverage-report
123+
path: coverage/
124+
retention-days: 7
125+
continue-on-error: true
126+
127+
build:
128+
name: Build & Validate
129+
runs-on: ubuntu-latest
130+
strategy:
131+
matrix:
132+
node-version: [22.x, latest]
133+
134+
steps:
135+
- name: Checkout code
136+
uses: actions/checkout@v6
137+
138+
- name: Setup pnpm
139+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.0.0
140+
with:
141+
version: 10
142+
143+
- name: Setup Node.js ${{ matrix.node-version }}
144+
uses: actions/setup-node@v6
145+
with:
146+
node-version: ${{ matrix.node-version }}
147+
cache: 'pnpm'
148+
149+
- name: Install dependencies
150+
run: pnpm install --frozen-lockfile
151+
152+
- name: Build project
153+
run: pnpm build
154+
155+
- name: Verify dist directory exists
156+
run: |
157+
if [ ! -d "dist" ]; then
158+
echo "Error: dist directory not created"
159+
exit 1
160+
fi
161+
162+
- name: Verify CLI binary exists
163+
run: |
164+
if [ ! -f "dist/cli.js" ]; then
165+
echo "Error: CLI binary not found"
166+
exit 1
167+
fi
168+
169+
- name: Verify typechain artifacts
170+
run: |
171+
if [ ! -d "src/typechain" ]; then
172+
echo "Error: typechain directory not found"
173+
exit 1
174+
fi
175+
176+
- name: Upload build artifacts
177+
if: matrix.node-version == '22.x'
178+
uses: actions/upload-artifact@v5
179+
with:
180+
name: dist
181+
path: dist/
182+
retention-days: 7
183+
184+
# Summary job that depends on all other jobs
185+
ci-success:
186+
name: CI Success
187+
runs-on: ubuntu-latest
188+
needs: [lint-and-format, security-audit, test, build]
189+
if: always()
190+
191+
steps:
192+
- name: Check job results
193+
run: |
194+
if [[ "${{ needs.lint-and-format.result }}" != "success" ]]; then
195+
echo "Lint and format check failed"
196+
exit 1
197+
fi
198+
if [[ "${{ needs.security-audit.result }}" != "success" ]]; then
199+
echo "Security audit failed"
200+
exit 1
201+
fi
202+
if [[ "${{ needs.test.result }}" != "success" ]]; then
203+
echo "Tests failed"
204+
exit 1
205+
fi
206+
if [[ "${{ needs.build.result }}" != "success" ]]; then
207+
echo "Build failed"
208+
exit 1
209+
fi
210+
echo "All CI checks passed successfully!"
211+

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Dependencies
2+
node_modules
3+
.pnpm-store
4+
5+
# Build output
6+
dist
7+
8+
# TypeChain generated files
9+
src/typechain
10+
11+
# Environment variables
12+
.env
13+
.env.*
14+
15+
# IDE
16+
.vscode/*
17+
!.vscode/extensions.json
18+
!.vscode/settings.json
19+
.idea
20+
*.swp
21+
*.swo
22+
23+
# Logs
24+
logs
25+
*.log
26+
npm-debug.log*
27+
yarn-debug.log*
28+
yarn-error.log*
29+
pnpm-debug.log*
30+
31+
# System files
32+
.DS_Store
33+
Thumbs.db
34+
35+
/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

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"endOfLine": "lf"
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) 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)