superfluid-finance / protocol-monorepo

Superfluid Protocol Monorepo: the specification, implementations, peripherals and development kits.
https://www.superfluid.finance
Other
875 stars 239 forks source link

[AUTOMATIONS] Vesting Scheduler - add claimable schedule feature #1944

Closed 0xPilou closed 5 months ago

0xPilou commented 6 months ago

The contract modification works includes :

New contract version is available and deployed at : https://sepolia-optimism.etherscan.io/address/0xB47FbC1B7f8372825D742709087b909D36137FD2

kasparkallas commented 6 months ago

First glance additional thinking points:

0xPilou commented 6 months ago

First glance additional thinking points:

  • Prefer to converge on a single internal _createVestingSchedule logic and avoid duplication
  • _executeEndVesting should have some check for the vesting schedule to have been claimed
  • Are there any updateVestingSchedule considerations with the claimable?

Updated the contract to only use a single internal function.

For executeEndVesting and updateVestingSchedule, I do not see further considerations required specifically for claimable schedules.

What extra check did you foresee in executeEndVesting ? My rational was that if the schedule has been claimed, then _isFlowOngoing evaluates to true, and the vesting can then be ended. Else, (receiver didn't claim), only emit a "fail to execute vesting end" event. It shouldn't be a problem since this function can only be called after the early end (which is the latest date possible of claim validity)

github-actions[bot] commented 5 months ago

📦 PR Packages

Install this PR (you need to setup Github packages):

yarn add @superfluid-finance/ethereum-contracts@PR1944
yarn add @superfluid-finance/sdk-core@PR1944
yarn add @superfluid-finance/sdk-redux@PR1944
:octocat: Click to learn how to use Github packages To use the Github package registry, create a token with "read:packages" permission. See [Creating a personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) for help. Next add these lines to your `.npmrc` file, replacing TOKEN with your personal access token. See [Installing a package from Github](https://docs.github.com/en/packages/guides/configuring-npm-for-use-with-github-packages#installing-a-package) if you get stuck. ``` @superfluid-finance:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken=TOKEN ```
kasparkallas commented 5 months ago

GH closed this PR automatically a bit unexpectedly. Fixing.