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

Draft
wants to merge 67 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
7f173dd
feat: tsc package
PaulRBerg Mar 11, 2025
ebc0ea5
test: de-duplicate test logic
PaulRBerg Apr 22, 2025
92ecd54
chore: add prepack
PaulRBerg Apr 22, 2025
2971f2d
fix: export types
PaulRBerg Apr 22, 2025
4b53f6d
build: fix types export
PaulRBerg Apr 22, 2025
581c33f
build: fix types again
PaulRBerg Apr 22, 2025
f893319
refactor: simplify deployment structure
PaulRBerg Apr 22, 2025
9824a41
feat: export helpers
PaulRBerg Apr 22, 2025
9ad4e95
fix: fix deployment types
PaulRBerg Apr 22, 2025
3dc2f7a
feat: export mainnets and testnets
PaulRBerg Apr 22, 2025
91da017
feat: sort alphabetically
PaulRBerg Apr 24, 2025
ae44987
build: update bun lockfile
PaulRBerg Apr 24, 2025
18b4ab5
refactor: export arrays for chains
PaulRBerg Apr 24, 2025
e94d280
refactor: structure by releases
PaulRBerg Apr 24, 2025
5ff5784
feat: allow nested manifest
PaulRBerg Apr 24, 2025
ef10c3c
feat: lockup v1.2.0
PaulRBerg Apr 24, 2025
02cc8fb
feat: winston logger
PaulRBerg Apr 24, 2025
6f40d05
refactor: more specific version types
PaulRBerg Apr 25, 2025
9151f1a
test: fix bugs in broadcast loaders
PaulRBerg Apr 25, 2025
87d9cc6
refactor: use v1.x versioning
PaulRBerg Apr 25, 2025
bec6227
refactor: merge lockup v1.0.0 and v1.0.1
PaulRBerg Apr 25, 2025
1808631
feat: add aliases
PaulRBerg Apr 26, 2025
38b3d48
refactor: export string array as manifest
PaulRBerg Apr 26, 2025
208210c
refactor: rename "map" to "names"
PaulRBerg Apr 26, 2025
b4bc025
test: check for validated and missing contracts
PaulRBerg Apr 27, 2025
712c0d2
refactor: export releasesByVersion
PaulRBerg Apr 27, 2025
c2ec602
build: fix tsc paths
PaulRBerg Apr 27, 2025
0b14e6d
refactor: move logger to non-production scripts
PaulRBerg Apr 27, 2025
3d98d1f
refactor: export releases as array
PaulRBerg Apr 28, 2025
96bc61a
feat: add getRelease helper
PaulRBerg Apr 28, 2025
7ce0f93
feat: add "isLatest" flag
PaulRBerg Apr 28, 2025
4cf9067
fix: export all releases objects
PaulRBerg Apr 28, 2025
1db36c6
test: rename to "missing-broadcasts"
PaulRBerg Apr 28, 2025
cbd7f54
feat: legacy deployments
PaulRBerg Apr 29, 2025
4d369a6
feat: define custom subgraphs
PaulRBerg Apr 29, 2025
233b97d
refactor: export from each release file
PaulRBerg Apr 29, 2025
83b98b3
fix: fix chains export
PaulRBerg Apr 29, 2025
b6b778f
feat: field "kind" for TheGraph
PaulRBerg Apr 29, 2025
c7ebd8f
refactor: refactor indexers
PaulRBerg Apr 30, 2025
f45b401
fix: export indexers
PaulRBerg Apr 30, 2025
63aaabe
refactor: export non-undefined indexers
PaulRBerg Apr 30, 2025
8de1f09
refactor: export object in indexers
PaulRBerg Apr 30, 2025
53f21e1
refactor: nested namespaces for types
PaulRBerg May 1, 2025
2a8c5ee
refactor: rename indexer exports
PaulRBerg May 1, 2025
ad499ea
fix: fix envio export
PaulRBerg May 1, 2025
337d17a
refactor: reorder imports
PaulRBerg May 1, 2025
9395edd
feat: new getters
PaulRBerg May 2, 2025
98c4983
feat: getFirstReleaseForChain
PaulRBerg May 2, 2025
903ebb4
feat: missing deployments for IoTeX
PaulRBerg May 2, 2025
211bdad
feat: missing deployment addresses
PaulRBerg May 2, 2025
d2ef6ec
feat: export protocol relesaes
PaulRBerg May 6, 2025
12e8fb1
feat: deployment block numbers
PaulRBerg May 6, 2025
f77fed5
feat: reexport lockup v1.x as airdrops v1.x
PaulRBerg May 11, 2025
e0e7d91
ci: load Etherscan API key
PaulRBerg May 12, 2025
72a016b
fix: export airdrop releases
PaulRBerg May 12, 2025
77ae4ab
refactor: PascalCase for version object
PaulRBerg May 12, 2025
6976fd2
refactor: reexport as Version
PaulRBerg May 12, 2025
84a7530
fix: version validation
PaulRBerg May 13, 2025
1bb2094
fix: fix contracts.getAllByProtocolAndChain
PaulRBerg May 13, 2025
15daae2
refactor: manifest object
PaulRBerg May 16, 2025
7fb6873
feat: contract catalog
PaulRBerg May 16, 2025
0a83553
fix: fix queries for deployments
PaulRBerg May 16, 2025
2935fe2
feat: queries releases single
PaulRBerg May 16, 2025
e3a63f5
refactor: rename info to entry
PaulRBerg May 16, 2025
9f5df98
feat: protocol and version field in Contract
PaulRBerg May 16, 2025
13b505e
build: add and use "fs-extra"
PaulRBerg May 18, 2025
58d6524
refactor: sort keys and imports
PaulRBerg May 19, 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/suggest-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 changes that need to use utility functions such as Object.values, Object.entries, etc., please default to using lodash (_) instead of the Object. syntax. Do this 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"
19 changes: 15 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 @@ -14,14 +18,21 @@ jobs:

- 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: "bun run 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: "bun run test"

- name: "Add summary"
run: |
run: | # shell
echo "## CI result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
36 changes: 36 additions & 0 deletions .github/workflows/cron-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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: "Check the code"
run: "bun run check"

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

- name: "Add summary"
run: | # shell
echo "## Cron Tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# directories
node_modules
/dist/
/logs/
/node_modules/

# files
*.env
Expand Down
3 changes: 2 additions & 1 deletion .lintstagedrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"*.{json,md,yml}": "bun run prettier:write"
"*.{json,jsonc,ts}": "bun run biome:write"
"*.{md,yml}": "bun run prettier:write"
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.ts
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const sharedConfig = require("@sablier/configs/prettier");

module.exports = sharedConfig;
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"]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"biome.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[javascript][json][jsonc][typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[md][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.tsdk": "node_modules/typescript/lib"
}
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,26 @@ to have different addresses on each chain. By using CREATE2, we can systematical
by passing a salt, whereas if we had used CREATE, the deployer's nonce would have impacted the resulting deployment
address.

## Logging

This project uses Winston for logging. By default, logs are output to the console, but they can also be written to a
file by setting the following environment variables:

- `LOG_FILE_PATH`: Path to the log file (e.g., `./logs/deployments.log`). When set, logs will be written to this file in
addition to the console.
- `LOG_LEVEL`: Set the logging level (default: `info`). Valid values are: `error`, `warn`, `info`, `verbose`, `debug`,
and `silly`.

Example usage:

```bash
# Log to both console and file
LOG_FILE_PATH=./logs/deployments.log bun run build

# Set a custom log level
LOG_LEVEL=debug LOG_FILE_PATH=./logs/debug.log bun run test
```

## License

This repo is licensed under GPL 3-0 or later.
11 changes: 0 additions & 11 deletions airdrops/v1.3.0/artifacts-zk/types/MerkleFactory.json

This file was deleted.

11 changes: 0 additions & 11 deletions airdrops/v1.3.0/artifacts-zk/types/MerkleLL.json

This file was deleted.

11 changes: 0 additions & 11 deletions airdrops/v1.3.0/artifacts-zk/types/MerkleLT.json

This file was deleted.

35 changes: 0 additions & 35 deletions airdrops/v1.3.0/broadcasts/blast_sepolia.json

This file was deleted.

19 changes: 19 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@sablier/configs/biome"],
"files": {
"includes": ["**/*.js", "**/*.json", "**/*.jsonc", "**/*.ts"]
},
"overrides": [
{
"includes": ["**/tests/*"],
"linter": {
"rules": {
"suspicious": {
"noFocusedTests": "off"
}
}
}
}
]
}
Loading
Loading