Skip to content

TypeScript Package #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5a1ee63
feat: typescript package with deployment data
PaulRBerg May 25, 2025
dccd1b7
refactor: queries contracts get
PaulRBerg May 25, 2025
651a171
feat: add "default" field in Chain type
PaulRBerg May 26, 2025
738a0d4
build: bump biome dep
PaulRBerg May 26, 2025
a4ac520
refactor: shorter name for resolvers
PaulRBerg May 31, 2025
7b427ad
ai: configure repomix
PaulRBerg May 31, 2025
f7121c0
chore: repomix
PaulRBerg Jun 3, 2025
f848c3d
test: deployment blocks for indexed contracts
PaulRBerg Jun 3, 2025
9285078
test: reorganize the tests
PaulRBerg Jun 3, 2025
b3d222e
test: fix broken tests for zk broadcasts
PaulRBerg Jun 3, 2025
5b89059
refactor: change export structure of releases
PaulRBerg Jun 3, 2025
3908aeb
fix: getter in release queries
PaulRBerg Jun 4, 2025
baa17dc
refactor: rename data broadcast dirs
PaulRBerg Jun 4, 2025
0d16052
refactor: delete indexers
PaulRBerg Jun 7, 2025
aed29ae
build: bump version
PaulRBerg Jun 7, 2025
bfba93d
build: bump version
PaulRBerg Jun 7, 2025
176846a
build: bump viem
PaulRBerg Jun 9, 2025
e9712f7
feat: more rpc infura and alchemy
PaulRBerg Jun 9, 2025
7da7dcd
build: beta release
PaulRBerg Jun 9, 2025
6b935e0
feat: allow chain id in contracts queries
PaulRBerg Jun 10, 2025
5838dff
Review of PR #31 (#41)
smol-ninja Jun 10, 2025
c367978
refactor: simplify airdrops v1.1 and v1.2 exports
PaulRBerg Jun 10, 2025
d57a3bd
docs: update natspecs of contracts getAll query
smol-ninja Jun 10, 2025
c461449
docs: roll beta.2
PaulRBerg Jun 10, 2025
c0c993f
refactor: proper cli with commander
PaulRBerg Jun 10, 2025
a95eae9
ci: fix devkit
PaulRBerg Jun 10, 2025
31ac609
refactor: rename package to sablier
PaulRBerg Jun 10, 2025
64cc38d
chore: update description
PaulRBerg Jun 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .cursor/rules/use-lodash.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description:
globs: *.ts
alwaysApply: false
---
When you suggest code snippets that contain utility functions such as `Object.values`, `Object.entries`, etc., use lodash (_) instead of the `Object.` syntax. Do so unless I tell you otherwise.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EditorConfig http://EditorConfig.org

# top-most EditorConfig file
root = true

# All files
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_ETHERSCAN_API_KEY="YOUR_ETHERSCAN_API_KEY"
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "CI"

concurrency:
cancel-in-progress: true
group: ${{github.workflow}}-${{github.ref}}

on:
pull_request:
push:
Expand All @@ -12,16 +16,26 @@ jobs:
- name: "Check out the repo"
uses: "actions/checkout@v4"

- name: "Set up devkit"
uses: "sablier-labs/devkit/actions/setup@main"

- name: "Install Bun"
uses: "oven-sh/setup-bun@v2"
with:
bun-version: "latest"

- name: "Install the Node.js dependencies"
run: "bun install"
run: "bun install --frozen-lockfile"

- name: "Check the code"
run: "just full-check"

- name: "Lint the code"
run: "bun run prettier:check"
- name: "Run the tests"
env:
VITE_ETHERSCAN_API_KEY: ${{ secrets.VITE_ETHERSCAN_API_KEY }}
run: "just test"

- name: "Add summary"
run: |
run: | # shell
echo "## CI result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
41 changes: 41 additions & 0 deletions .github/workflows/cron-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Cron: Tests"

on:
schedule:
# Runs at 02:00 UTC every day
- cron: "0 2 * * *"
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"

- name: "Install Bun"
uses: "oven-sh/setup-bun@v2"
with:
bun-version: "latest"

- name: "Install the Node.js dependencies"
run: "bun install --frozen-lockfile"

- name: "Install Just"
uses: "extractions/setup-just@v3"
with:
just-version: "1"

- name: "Check the code"
run: "just full-check"

- name: "Run the tests"
env:
TEST_ONLY_CHAINS: true
TEST_ONLY_CONTRACTS: true
run: "just test"

- name: "Add summary"
run: | # shell
echo "## Cron Tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# directories
dist
logs
node_modules
repomix

# files
*.env
*.log
.DS_Store
.pnp.*
*.tsbuildinfo
bun.lockb
lcov.info
package-lock.json
Expand Down
8 changes: 8 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @type {import("lint-staged").Configuration}
*/
module.exports = {
"*.{json,jsonc,ts}": "bun biome check --write",
"*.{md,yml}": "bun prettier --cache --write",
"*.ts": "bun biome lint --write --only correctness/noUnusedImports",
};
1 change: 0 additions & 1 deletion .lintstagedrc.yml

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.ts
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const baseConfig = require("@sablier/devkit/prettier");

/**
* @see https://prettier.io/docs/configuration
* @type {import("prettier").Config}
*/
const config = baseConfig;

module.exports = config;
6 changes: 0 additions & 6 deletions .prettierrc.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["biomejs.biome", "esbenp.prettier-vscode"]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"[md][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript][json][jsonc][typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"biome.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"search.exclude": {
"**/data": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Contributing

### Prerequisites

- [Node.js](https://nodejs.org) (v20+)
- [Just](https://github.com/casey/just) (command runner)
- [Bun](https://bun.sh) (package manager)

### Setup

```bash
git clone https://github.com/sablier-labs/deployments.git
cd deployments
just install
```

### Available Commands

```bash
just --list # Show all available commands
just build # Build the TypeScript package
just full-check # Run all code quality checks
just full-write # Auto-fix formatting and linting
just test # Run test suite
```

### Development Workflow

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run `just full-check` to verify code quality
5. Submit a pull request

### Adding New Chains

TODO

### Adding New Deployments

TODO
Loading