Skip to content

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

Merged
merged 33 commits into from
Jul 10, 2025
Merged

Add Vesting Wallet #91

merged 33 commits into from
Jul 10, 2025

Conversation

arr00
Copy link
Contributor

@arr00 arr00 commented Jul 7, 2025

No description provided.

@arr00 arr00 requested a review from a team as a code owner July 7, 2025 21:12
Copy link

netlify bot commented Jul 7, 2025

Deploy Preview for confidential-tokens ready!

Name Link
🔨 Latest commit b761627
🔍 Latest deploy log https://app.netlify.com/projects/confidential-tokens/deploys/6870105095d2f3000822be73
😎 Deploy Preview https://deploy-preview-91--confidential-tokens.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@arr00 arr00 requested review from james-toussaint and removed request for a team July 7, 2025 21:12
@arr00 arr00 changed the title WIP: Add Vesting Wallet Add Vesting Wallet Jul 8, 2025
FHE.allowTransient(amount, token);
euint64 amountSent = IConfidentialFungibleToken(token).confidentialTransfer(owner(), amount);

// TODO: Could theoretically overflow
Copy link
Contributor

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?

Copy link
Contributor Author

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

@arr00 arr00 force-pushed the feat/vesting-wallet branch from d0880ad to 301b73d Compare July 9, 2025 01:07
@arr00 arr00 force-pushed the feat/vesting-wallet branch from 484de90 to 4a2e984 Compare July 9, 2025 16:46
@arr00 arr00 force-pushed the feat/vesting-wallet branch from 1f49aef to bd478a9 Compare July 9, 2025 18:17
* Add vesting wallet namespace storage

* update pragmas

* reorder functions

* fix lint and inline getting storage

---------

Co-authored-by: Arr00 <[email protected]>
@arr00
Copy link
Contributor Author

arr00 commented Jul 9, 2025

@james-toussaint don't think we need VestingWalletConfidentialUpgradeable anymore?

Copy link
Contributor

@james-toussaint james-toussaint left a 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)

@arr00 arr00 merged commit faf86c9 into master Jul 10, 2025
14 checks passed
@arr00 arr00 deleted the feat/vesting-wallet branch July 10, 2025 19:54
arr00 added a commit that referenced this pull request Jul 10, 2025
* 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]>
@arr00 arr00 mentioned this pull request Jul 11, 2025
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.

3 participants