@sablier/bob 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE-BUSL.md +82 -0
  3. package/LICENSE-GPL.md +470 -0
  4. package/LICENSE.md +9 -0
  5. package/README.md +81 -0
  6. package/artifacts/BobVaultShare.json +936 -0
  7. package/artifacts/SablierBob.json +1683 -0
  8. package/artifacts/SablierEscrow.json +1316 -0
  9. package/artifacts/SablierLidoAdapter.json +1649 -0
  10. package/artifacts/erc20/IERC20.json +226 -0
  11. package/artifacts/interfaces/IBobVaultShare.json +393 -0
  12. package/artifacts/interfaces/ISablierBob.json +1171 -0
  13. package/artifacts/interfaces/ISablierEscrow.json +999 -0
  14. package/artifacts/interfaces/ISablierLidoAdapter.json +1141 -0
  15. package/artifacts/interfaces/external/ICurveStETHPool.json +128 -0
  16. package/artifacts/interfaces/external/ILidoWithdrawalQueue.json +209 -0
  17. package/artifacts/interfaces/external/IStETH.json +262 -0
  18. package/artifacts/interfaces/external/IWETH9.json +259 -0
  19. package/artifacts/interfaces/external/IWstETH.json +311 -0
  20. package/artifacts/libraries/Errors.json +868 -0
  21. package/package.json +68 -0
  22. package/src/BobVaultShare.sol +119 -0
  23. package/src/SablierBob.sol +543 -0
  24. package/src/SablierEscrow.sol +288 -0
  25. package/src/SablierLidoAdapter.sol +549 -0
  26. package/src/abstracts/SablierBobState.sol +156 -0
  27. package/src/abstracts/SablierEscrowState.sol +159 -0
  28. package/src/interfaces/IBobVaultShare.sol +51 -0
  29. package/src/interfaces/ISablierBob.sol +261 -0
  30. package/src/interfaces/ISablierBobAdapter.sol +157 -0
  31. package/src/interfaces/ISablierBobState.sol +74 -0
  32. package/src/interfaces/ISablierEscrow.sol +148 -0
  33. package/src/interfaces/ISablierEscrowState.sol +77 -0
  34. package/src/interfaces/ISablierLidoAdapter.sol +110 -0
  35. package/src/interfaces/external/ICurveStETHPool.sol +31 -0
  36. package/src/interfaces/external/ILidoWithdrawalQueue.sol +67 -0
  37. package/src/interfaces/external/IStETH.sol +18 -0
  38. package/src/interfaces/external/IWETH9.sol +19 -0
  39. package/src/interfaces/external/IWstETH.sol +32 -0
  40. package/src/libraries/Errors.sol +189 -0
  41. package/src/types/Bob.sol +49 -0
  42. package/src/types/Escrow.sol +49 -0
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # Sablier Bob [![GitHub Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord] [![Twitter][twitter-badge]][twitter]
2
+
3
+ ## Background
4
+
5
+ This package contains the following protocols:
6
+
7
+ - [Sablier Bob](./src/SablierBob.sol): Price-gated vaults that unlock deposited tokens based on a target price set. If a vault is configured with an adapter, the protocol will automatically stake the tokens and earn yield on behalf of the users.
8
+
9
+ - [Sablier Escrow](./src/SablierEscrow.sol): A peer-to-peer token swap protocol that allows users to swap ERC-20 tokens with each other.
10
+
11
+ ## Install
12
+
13
+ ### Node.js
14
+
15
+ This is the recommended approach.
16
+
17
+ Install Bob using your favorite package manager, e.g. with Bun:
18
+
19
+ ```shell
20
+ bun add @sablier/bob
21
+ ```
22
+
23
+ ### Git Submodules
24
+
25
+ This installation method is not recommended, but it is available for those who prefer it.
26
+
27
+ Install the monorepo and its dependencies using Forge:
28
+
29
+ ```shell
30
+ forge install sablier-labs/evm-monorepo@bob@v1.0.1 OpenZeppelin/openzeppelin-contracts@v5.3.0 PaulRBerg/prb-math@v4.1.0 smartcontractkit/chainlink-evm@contracts-v1.4.0
31
+ ```
32
+
33
+ Then, add the following remappings in `remappings.txt`:
34
+
35
+ ```text
36
+ @chainlink/contracts/=lib/chainlink/contracts-evm/
37
+ @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
38
+ @prb/math/=lib/prb-math/
39
+ @sablier/evm-utils/=lib/evm-monorepo/utils/
40
+ @sablier/bob/=lib/evm-monorepo/bob/
41
+ ```
42
+
43
+ ### Branching Tree Technique
44
+
45
+ You may notice that some test files are accompanied by `.tree` files. This is because we are using Branching Tree
46
+ Technique and [Bulloak](https://bulloak.dev/).
47
+
48
+ ## Deployments
49
+
50
+ The list of all deployment addresses can be found [here](https://docs.sablier.com/guides/bob/deployments).
51
+
52
+ ## Security
53
+
54
+ The codebase has undergone rigorous audits by leading security experts from Cantina, as well as independent auditors.
55
+ For a comprehensive list of all audits conducted, please click [here](https://github.com/sablier-labs/audits).
56
+
57
+ For any security-related concerns, please refer to the [SECURITY](../SECURITY.md) policy. This repository is subject to a
58
+ bug bounty program per the terms outlined in the aforementioned policy.
59
+
60
+ ## Contributing
61
+
62
+ Feel free to dive in! [Open](https://github.com/sablier-labs/evm-monorepo/issues/new) an issue,
63
+ [start](https://github.com/sablier-labs/evm-monorepo/discussions/new/choose) a discussion or submit a PR. For any informal concerns
64
+ or feedback, please join our [Discord server](https://discord.gg/bSwRCwWRsT).
65
+
66
+ For guidance on how to create PRs, see the [CONTRIBUTING](../CONTRIBUTING.md) guide.
67
+
68
+ ## License
69
+
70
+ See [LICENSE.md](../LICENSE.md).
71
+
72
+ [codecov]: https://codecov.io/gh/sablier-labs/evm-monorepo
73
+ [codecov-badge]: https://codecov.io/gh/sablier-labs/evm-monorepo/branch/main/graph/badge.svg
74
+ [discord]: https://discord.gg/bSwRCwWRsT
75
+ [discord-badge]: https://img.shields.io/discord/659709894315868191
76
+ [foundry]: https://getfoundry.sh
77
+ [foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg
78
+ [gha]: https://github.com/sablier-labs/evm-monorepo/actions
79
+ [gha-badge]: https://github.com/sablier-labs/evm-monorepo/actions/workflows/ci-bob.yml/badge.svg
80
+ [twitter]: https://x.com/Sablier
81
+ [twitter-badge]: https://img.shields.io/twitter/follow/Sablier