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

feat: flow examples #37

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: flow examples #37

wants to merge 8 commits into from

Conversation

andreivladbrg
Copy link
Member

@andreivladbrg andreivladbrg commented Oct 2, 2024

Closes #36

Note: this PR merge must be synchronized with docs reference changes due to v2 rename to lockup (e.g. this one). Will work on that once you finish with your refactor @smol-ninja.


The flow example contracts are represented by these 4:

  1. FlowBatchable
    • different functions (adjustRatePerSecondAndDeposit, createMultiple, createAndDepositViaBroker etc.) to declare the calldata as bytes for multiple function calls into a single tx
  2. FlowManager
    • Manager contract that calls function to manage streams (basically mirror functions)
  3. FlowStreamCreator
    • Contract for creating 2 streams with different rates
  4. FlowUtilities
    • A library (used in the stream creator contract) with a series of utility functions for calculating the rps using a desired amount and duration.

@sablier-labs/solidity lmk if you have anything else in mind, or if the current ones should suffice

build: update PRBMath
build: add flow/lockup foundry profiles
feat: implement a FlowUtilities library
feat: implement flow creator contract
refactor: rename v2 to lockup
chore: add scripts in package json for the new profiles
@andreivladbrg andreivladbrg marked this pull request as draft October 2, 2024 21:41
@andreivladbrg andreivladbrg changed the title Feat/flow feat: flow examples Oct 2, 2024
@smol-ninja
Copy link
Member

@andreivladbrg this might need some refactor with the deposit function

@andreivladbrg
Copy link
Member Author

andreivladbrg commented Oct 22, 2024

@andreivladbrg this might need some refactor with the deposit function

indeed it needs, will updated it

also, since the repo is public now, it can be removed via package.json file so the gitmodules can be removed

build: install flow repo via package.json
test: add tests for FlowStreamCreator
test: add tests for FlowBatchable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include flow examples
2 participants