-
Notifications
You must be signed in to change notification settings - Fork 3
Add Vesting Wallet #91
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
Conversation
✅ Deploy Preview for confidential-tokens ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
FHE.allowTransient(amount, token); | ||
euint64 amountSent = IConfidentialFungibleToken(token).confidentialTransfer(owner(), amount); | ||
|
||
// TODO: Could theoretically overflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How could it overflow considering released + amount
couldn't be greater than token uint64 supply
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it actually could be. Imagine you transfer 100% of the token supply (uint64.max) to the vesting contract, then release it. Then send it back to the vesting contract. Voila
d0880ad
to
301b73d
Compare
Co-authored-by: James Toussaint <[email protected]>
* add initializable version of vesting * update tests
484de90
to
4a2e984
Compare
Co-authored-by: Hadrien Croubois <[email protected]>
1f49aef
to
bd478a9
Compare
* Add vesting wallet namespace storage * update pragmas * reorder functions * fix lint and inline getting storage --------- Co-authored-by: Arr00 <[email protected]>
@james-toussaint don't think we need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you (I did not look to tests fyi)
Co-authored-by: James Toussaint <[email protected]>
* Add Vesting Wallet * fix and add tests * remove unused imports * fix test * add operator * fix test * add changeset * make vesting wallets cloneable * Apply suggestions from code review Co-authored-by: James Toussaint <[email protected]> * add call event * add initializable version of vesting (#95) * add initializable version of vesting * update tests * remove factory mock * rename mock files * fix imports * remove upgradeable dependency * add docs * revert `package-lock.json` changes * fix import paths * fix lint * Update contracts/finance/VestingWalletConfidential.sol Co-authored-by: Hadrien Croubois <[email protected]> * fix tests * add reentrancy protection * extract executor into extension * forge install: openzeppelin-contracts-upgradeable v5.3.0 * update package * fix overflow risk * Add vesting wallet namespace storage (#96) * Add vesting wallet namespace storage * update pragmas * reorder functions * fix lint and inline getting storage --------- Co-authored-by: Arr00 <[email protected]> * update docs * update cliff seconds param size * remove upgradeable file * add docs * Update .changeset/cold-nails-go.md Co-authored-by: James Toussaint <[email protected]> * update comments --------- Co-authored-by: James Toussaint <[email protected]> Co-authored-by: Hadrien Croubois <[email protected]>
No description provided.