Skip to content
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

Add deploy multi chain rust script #1021

Open
wants to merge 34 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cc384d1
docs: status temperature (#984)
PaulRBerg Jul 26, 2024
c5b9e0d
refactor: reorder constant functions in interface (#992)
PaulRBerg Jul 29, 2024
14bf8c9
feat: add periphery contracts in src
andreivladbrg Jul 19, 2024
cd733fb
test: add periphery tests
andreivladbrg Jul 19, 2024
7b8dce2
test: add a common utils dir
smol-ninja Jul 29, 2024
baa6b53
feat: add periphery scripts
andreivladbrg Jul 25, 2024
5461495
ci: include both core and periphery tests in CI
andreivladbrg Jul 25, 2024
3c6ddaa
feat(benchmark): add batch lockup
andreivladbrg Jul 26, 2024
858912b
build(shell): include periphery in artifacts (#990)
andreivladbrg Jul 29, 2024
a97e5ae
test: move generic functions to Base test contract
smol-ninja Jul 29, 2024
d7162c4
refactor: remove V2 and obsolete references (#994)
smol-ninja Aug 1, 2024
96295a8
build: remove gas reports field in foundry.toml (#1005)
andreivladbrg Aug 1, 2024
ce5b2df
ci: fix path in smt profile
smol-ninja Aug 2, 2024
14b48a6
feat: add `SablierMerkleInstant` (#999)
smol-ninja Aug 12, 2024
9c8ff1f
test: dry-ify the merkle tests (#1009)
smol-ninja Aug 12, 2024
cb43e66
docs: polish wording in NatSpec (#1014)
PaulRBerg Aug 14, 2024
690add8
Refactor/dry fy claim (#1011)
andreivladbrg Aug 14, 2024
b1b3102
chore: order alphabetically scripts in package.json
andreivladbrg Aug 14, 2024
ca68897
feat: allow end time to be in the past (#1015)
smol-ninja Aug 14, 2024
6201781
refactor: amounts type reference in Lockup.Stream struct (#1019)
smol-ninja Aug 18, 2024
656821c
feat: add deploy multi chain rust script
andreivladbrg Aug 6, 2024
3417afc
feat(script): write the addresses in deployments
andreivladbrg Aug 6, 2024
921e539
feat(script): add explorer map
andreivladbrg Aug 6, 2024
2010f21
build: update rust script
andreivladbrg Aug 6, 2024
24ae07c
various fixes and polishes
andreivladbrg Aug 6, 2024
b7e83ab
feat(script): add information about the script used
andreivladbrg Aug 7, 2024
b5b7d2e
feat: add move_broadcast_file function
andreivladbrg Aug 7, 2024
e68671e
check wether the deployment is broadcasted in move_broadcast_file
andreivladbrg Aug 8, 2024
49b5be6
feat: run prettier on deployment files
andreivladbrg Aug 19, 2024
80121e0
feat: add chain name map
andreivladbrg Aug 21, 2024
d011e43
feat: write in the deployment file its type
andreivladbrg Aug 21, 2024
6697736
fix: the file creation if it already exists
andreivladbrg Aug 22, 2024
5d314f8
docs: polish natspec in Protocol.s.sol
andreivladbrg Aug 22, 2024
181543d
fix: pass correctly the is_broadcast_deployment bool
andreivladbrg Aug 22, 2024
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
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/workflows/ci-deep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
needs: ["lint", "build"]
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: ${{ fromJSON(inputs.unitFuzzRuns) || 50000 }}
foundry-fuzz-runs: ${{ fromJSON(inputs.unitFuzzRuns || '50000') }}
foundry-profile: "test-optimized"
match-path: "test/unit/**/*.sol"
name: "Unit tests"
Expand All @@ -49,7 +49,7 @@ jobs:
needs: ["lint", "build"]
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: ${{ fromJSON(inputs.integrationFuzzRuns) || 50000 }}
foundry-fuzz-runs: ${{ fromJSON(inputs.integrationFuzzRuns || '50000') }}
foundry-profile: "test-optimized"
match-path: "test/integration/**/*.sol"
name: "Integration tests"
Expand All @@ -58,8 +58,8 @@ jobs:
needs: ["lint", "build"]
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-invariant-depth: ${{ fromJSON(inputs.invariantDepth) || 100 }}
foundry-invariant-runs: ${{ fromJSON(inputs.invariantRuns) || 100 }}
foundry-invariant-depth: ${{ fromJSON(inputs.invariantDepth || '100') }}
foundry-invariant-runs: ${{ fromJSON(inputs.invariantRuns || '100') }}
foundry-profile: "test-optimized"
match-path: "test/invariant/**/*.sol"
name: "Invariant tests"
Expand All @@ -70,7 +70,7 @@ jobs:
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: ${{ fromJSON(inputs.forkFuzzRuns) || 1000 }}
foundry-fuzz-runs: ${{ fromJSON(inputs.forkFuzzRuns || '1000') }}
foundry-profile: "test-optimized"
match-path: "test/fork/**/*.sol"
match-path: "test/{core,periphery}fork/**/*.sol"
name: "Fork tests"
2 changes: 1 addition & 1 deletion .github/workflows/ci-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
foundry-fuzz-runs: 100
foundry-profile: "test-optimized"
fuzz-seed: true
match-path: "test/fork/**/*.sol"
match-path: "test/{core,periphery}fork/**/*.sol"
name: "Fork tests"

test-utils:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ jobs:
needs: ["lint", "build"]
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 5000
foundry-fuzz-runs: 2000
foundry-profile: "test-optimized"
match-path: "test/unit/**/*.sol"
match-path: "test/core/unit/**/*.sol"
name: "Unit tests"

test-integration:
needs: ["lint", "build"]
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 5000
foundry-fuzz-runs: 2000
foundry-profile: "test-optimized"
match-path: "test/integration/**/*.sol"
match-path: "test/{core,periphery}/integration/**/*.sol"
name: "Integration tests"

test-invariant:
needs: ["lint", "build"]
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-profile: "test-optimized"
match-path: "test/invariant/**/*.sol"
match-path: "test/core/invariant/**/*.sol"
name: "Invariant tests"

test-fork:
Expand All @@ -54,7 +54,7 @@ jobs:
with:
foundry-fuzz-runs: 20
foundry-profile: "test-optimized"
match-path: "test/fork/**/*.sol"
match-path: "test/{core,periphery}/fork/**/*.sol"
name: "Fork tests"

coverage:
Expand All @@ -63,4 +63,4 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-coverage.yml@main"
with:
match-path: "test/{integration,unit}/**/*.sol"
match-path: "test/{core,periphery}/{integration,unit}/**/*.sol"
10 changes: 5 additions & 5 deletions .github/workflows/generate-svg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:

- name: "Generate an NFT SVG using the user-provided parameters"
run: >-
forge script script/GenerateSVG.s.sol
forge script script/core/GenerateSVG.s.sol
--sig "run(uint256,string,string,uint256)"
"${{ inputs.progress }}",
"${{ inputs.status }}"
"${{ inputs.streamed }}"
"${{ inputs.duration }}"
"${{ fromJSON(inputs.progress || true) }}",
"${{ fromJSON(inputs.status || true) }}"
"${{ fromJSON(inputs.streamed || true) }}"
"${{ fromJSON(inputs.duration || true) }}"

- name: "Add workflow summary"
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ node_modules
out
out-optimized
out-svg
target

# files
*.env
*.env.deployment
*.log
.DS_Store
.pnp.*
Cargo.lock
lcov.info
package-lock.json
pnpm-lock.yaml
Expand Down
84 changes: 42 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,101 +4,101 @@ All notable changes to this project will be documented in this file.

The format is based on [Common Changelog](https://common-changelog.org/).

[1.2.0]: https://github.com/sablier-labs/v2-core/compare/v1.1.2...v1.2.0
[1.1.2]: https://github.com/sablier-labs/v2-core/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/sablier-labs/v2-core/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/sablier-labs/v2-core/compare/v1.0.2...v1.1.0
[1.0.2]: https://github.com/sablier-labs/v2-core/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/sablier-labs/v2-core/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/sablier-labs/v2-core/releases/tag/v1.0.0
[1.2.0]: https://github.com/sablier-labs/lockup/compare/v1.1.2...v1.2.0
[1.1.2]: https://github.com/sablier-labs/lockup/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/sablier-labs/lockup/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/sablier-labs/lockup/compare/v1.0.2...v1.1.0
[1.0.2]: https://github.com/sablier-labs/lockup/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/sablier-labs/lockup/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/sablier-labs/lockup/releases/tag/v1.0.0

## [1.2.0] - 2024-07-04

### Changed

- **Breaking:** move common logic into `Lockup` contract ([#784](https://github.com/sablier-labs/v2-core/pull/784),
[#813](https://github.com/sablier-labs/v2-core/pull/813), [#850](https://github.com/sablier-labs/v2-core/pull/850),
[#941](https://github.com/sablier-labs/v2-core/pull/941))
- **Breaking:** use a new hook system ([#951](https://github.com/sablier-labs/v2-core/pull/951))
- **Breaking:** move common logic into `Lockup` contract ([#784](https://github.com/sablier-labs/lockup/pull/784),
[#813](https://github.com/sablier-labs/lockup/pull/813), [#850](https://github.com/sablier-labs/lockup/pull/850),
[#941](https://github.com/sablier-labs/lockup/pull/941))
- **Breaking:** use a new hook system ([#951](https://github.com/sablier-labs/lockup/pull/951))
- Replace `ISablierV2Recipient` with `ISablierLockupRecipient` hook interface
- Remove `try..catch` block from hook calls
- Allow only supported characters in NFT Descriptor asset symbols
([#945](https://github.com/sablier-labs/v2-core/pull/945), [#960](https://github.com/sablier-labs/v2-core/pull/960),
[#949](https://github.com/sablier-labs/v2-core/pull/949))
- Bump build dependencies ([#806](https://github.com/sablier-labs/v2-core/pull/806),
[#942](https://github.com/sablier-labs/v2-core/pull/942), [#944](https://github.com/sablier-labs/v2-core/pull/944))
- Change permissions of `withdraw` function to public ([#785](https://github.com/sablier-labs/v2-core/pull/785))
- Disallow zero `startTime` ([#813](https://github.com/sablier-labs/v2-core/pull/813),
[#852](https://github.com/sablier-labs/v2-core/pull/852))
([#945](https://github.com/sablier-labs/lockup/pull/945), [#960](https://github.com/sablier-labs/lockup/pull/960),
[#949](https://github.com/sablier-labs/lockup/pull/949))
- Bump build dependencies ([#806](https://github.com/sablier-labs/lockup/pull/806),
[#942](https://github.com/sablier-labs/lockup/pull/942), [#944](https://github.com/sablier-labs/lockup/pull/944))
- Change permissions of `withdraw` function to public ([#785](https://github.com/sablier-labs/lockup/pull/785))
- Disallow zero `startTime` ([#813](https://github.com/sablier-labs/lockup/pull/813),
[#852](https://github.com/sablier-labs/lockup/pull/852))
- Rename create functions `createWithTimestamps` and `createWithDurations` across all lockup contracts
([#798](https://github.com/sablier-labs/v2-core/pull/798))
- Switch to Bun ([#775](https://github.com/sablier-labs/v2-core/pull/775))
- Use Solidity v0.8.26 ([#944](https://github.com/sablier-labs/v2-core/pull/944))
([#798](https://github.com/sablier-labs/lockup/pull/798))
- Switch to Bun ([#775](https://github.com/sablier-labs/lockup/pull/775))
- Use Solidity v0.8.26 ([#944](https://github.com/sablier-labs/lockup/pull/944))

### Added

- Add Lockup Tranched contract ([#817](https://github.com/sablier-labs/v2-core/pull/817))
- Add `precompiles` in the NPM release ([#841](https://github.com/sablier-labs/v2-core/pull/841))
- Add Lockup Tranched contract ([#817](https://github.com/sablier-labs/lockup/pull/817))
- Add `precompiles` in the NPM release ([#841](https://github.com/sablier-labs/lockup/pull/841))
- Add return value in `withdrawMax` and `withdrawMaxAndTransfer`
([#961](https://github.com/sablier-labs/v2-core/pull/961))
([#961](https://github.com/sablier-labs/lockup/pull/961))

### Removed

- **Breaking:** remove protocol fee ([#839](https://github.com/sablier-labs/v2-core/pull/839))
- Remove flash loan abstract contract ([#779](https://github.com/sablier-labs/v2-core/pull/779))
- Remove `to` from `withdrawMultiple` function ([#785](https://github.com/sablier-labs/v2-core/pull/785))
- **Breaking:** remove protocol fee ([#839](https://github.com/sablier-labs/lockup/pull/839))
- Remove flash loan abstract contract ([#779](https://github.com/sablier-labs/lockup/pull/779))
- Remove `to` from `withdrawMultiple` function ([#785](https://github.com/sablier-labs/lockup/pull/785))

## [1.1.2] - 2023-12-19

### Changed

- Use Solidity v0.8.23 ([#758](https://github.com/sablier-labs/v2-core/pull/758))
- Use Solidity v0.8.23 ([#758](https://github.com/sablier-labs/lockup/pull/758))

## [1.1.1] - 2023-12-16

### Changed

- Bump package version for NPM release
([88db61](https://github.com/sablier-labs/v2-core/tree/88db61bcf193ef9494b31c883ed2c9ad997a1271))
([88db61](https://github.com/sablier-labs/lockup/tree/88db61bcf193ef9494b31c883ed2c9ad997a1271))

## [1.1.0] - 2023-12-15

### Changed

- **Breaking**: Remove ability to cancel for recipients ([#710](https://github.com/sablier-labs/v2-core/pull/710))
- Move `isWarm` and `isCold` to `SablierV2Lockup` ([#664](https://github.com/sablier-labs/v2-core/pull/664))
- **Breaking**: Remove ability to cancel for recipients ([#710](https://github.com/sablier-labs/lockup/pull/710))
- Move `isWarm` and `isCold` to `SablierV2Lockup` ([#664](https://github.com/sablier-labs/lockup/pull/664))
- Replace the streamed amount with the deposit amount in the NFT descriptor
([#692](https://github.com/sablier-labs/v2-core/pull/692))
- Simplify `renounce` and `withdraw` implementations ([#683](https://github.com/sablier-labs/v2-core/pull/683),
[#705](https://github.com/sablier-labs/v2-core/pull/705))
- Update import paths to use Node.js dependencies ([#734](https://github.com/sablier-labs/v2-core/pull/734))
- Use Solidity v0.8.21 ([#688](https://github.com/sablier-labs/v2-core/pull/688))
([#692](https://github.com/sablier-labs/lockup/pull/692))
- Simplify `renounce` and `withdraw` implementations ([#683](https://github.com/sablier-labs/lockup/pull/683),
[#705](https://github.com/sablier-labs/lockup/pull/705))
- Update import paths to use Node.js dependencies ([#734](https://github.com/sablier-labs/lockup/pull/734))
- Use Solidity v0.8.21 ([#688](https://github.com/sablier-labs/lockup/pull/688))

### Added

- Add `ERC-4906` metadata update in `transferFrom` ([#686](https://github.com/sablier-labs/v2-core/pull/686))
- Add `transferable` boolean flag ([#668](https://github.com/sablier-labs/v2-core/pull/668))
- Add `ERC-4906` metadata update in `transferFrom` ([#686](https://github.com/sablier-labs/lockup/pull/686))
- Add `transferable` boolean flag ([#668](https://github.com/sablier-labs/lockup/pull/668))

### Removed

- Remove `@openzeppelin/contracts` from Node.js peer dependencies
([#694](https://github.com/sablier-labs/v2-core/pull/694))
([#694](https://github.com/sablier-labs/lockup/pull/694))

## [1.0.2] - 2023-08-14

### Changed

- Update `@prb/math` import paths to contain `src/` ([#648](https://github.com/sablier-labs/v2-core/pull/648))
- Update `@prb/math` import paths to contain `src/` ([#648](https://github.com/sablier-labs/lockup/pull/648))

## [1.0.1] - 2023-07-13

### Changed

- Optimize use of variables in `tokenURI` ([#617](https://github.com/sablier-labs/v2-core/pull/617))
- Optimize use of variables in `tokenURI` ([#617](https://github.com/sablier-labs/lockup/pull/617))

### Fixed

- Fix data URI scheme in `tokenURI` ([#617](https://github.com/sablier-labs/v2-core/pull/617))
- Fix data URI scheme in `tokenURI` ([#617](https://github.com/sablier-labs/lockup/pull/617))

## [1.0.0] - 2023-07-07

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Contributing

Feel free to dive in! [Open](https://github.com/sablier-labs/v2-core/issues/new) an issue,
[start](https://github.com/sablier-labs/v2-core/discussions/new) a discussion or submit a PR. For any informal concerns
Feel free to dive in! [Open](https://github.com/sablier-labs/lockup/issues/new) an issue,
[start](https://github.com/sablier-labs/lockup/discussions/new) a discussion or submit a PR. For any informal concerns
or feedback, please join our [Discord server](https://discord.gg/bSwRCwWRsT).

Contributions to Sablier V2 Core are welcome by anyone interested in writing more tests, improving readability,
Contributions to Sablier Lockup are welcome by anyone interested in writing more tests, improving readability,
optimizing for gas efficiency, or extending the protocol via new features.

## Pre Requisites
Expand All @@ -23,7 +23,7 @@ In addition, familiarity with [Solidity](https://soliditylang.org/) is requisite
Clone this repository including submodules:

```shell
$ git clone --recurse-submodules -j8 [email protected]:sablier-labs/v2-core.git
$ git clone --recurse-submodules -j8 [email protected]:sablier-labs/lockup.git
```

Then, inside the project's directory, run this to install the Node.js dependencies and build the contracts:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Parameters

Licensor: Sablier Labs Ltd

Licensed Work: Sablier V2 Core The Licensed Work is (C) 2024 Sablier Labs Ltd
Licensed Work: Sablier Lockup The Licensed Work is (C) 2024 Sablier Labs Ltd

Additional Use Grant: Any uses listed and defined at v2-core-license-grants.sablier.eth

Expand Down
Loading
Loading