Skip to content

Conversation

@arr00
Copy link
Contributor

@arr00 arr00 commented Aug 1, 2025

No description provided.

@netlify
Copy link

netlify bot commented Aug 1, 2025

Deploy Preview for confidential-tokens ready!

Name Link
🔨 Latest commit c8f819c
🔍 Latest deploy log https://app.netlify.com/projects/confidential-tokens/deploys/6891d986a6a145000804e401
😎 Deploy Preview https://deploy-preview-135--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 marked this pull request as ready for review August 4, 2025 11:00
@arr00 arr00 requested a review from a team as a code owner August 4, 2025 11:00
@arr00 arr00 requested a review from james-toussaint August 4, 2025 11:00

address private immutable _vestingImplementation;

event VestingWalletConfidentialFunded(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filtering events by beneficiary would be useful for developers.

Copy link
Contributor Author

@arr00 arr00 Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree but that is part of the initialization. Do you propose passing it separately as well just for the sake of indexing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think integrators can look at the initialization code

Comment on lines 17 to 26
(
address beneficiary,
uint48 startTimestamp,
uint48 durationSeconds,
uint48 cliffSeconds,
address executor
) = abi.decode(initialization, (address, uint48, uint48, uint48, address));

require(cliffSeconds <= durationSeconds);
require(beneficiary != address(0));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we:

  1. provide this as ther default behavior in the factory
  2. and same with return address(new VestingWalletCliffExecutorConfidential());
  3. And add that piece of code to documentation:
    function _deployVestingWalletImplementation() internal virtual override returns (address) {
        return address(new MyCustomVestingWalletConfidential());
    }

    function _validateVestingWalletInitialization(bytes memory initialization) internal virtual override {
        (
            address arg1,
            uint48 arg2,
        ) = abi.decode(initialization, (address, uint48));
        require(arg1 != address(0));
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't provide default behavior for _deployVestingWalletImplementation due to the config (chain and protocol specific). If we won't have a default for one, I don't think there should be a default for the other.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right about config yes, hence keeping both is best yes 👍

Comment on lines 33 to 39
(
address beneficiary,
uint48 startTimestamp,
uint48 durationSeconds,
uint48 cliffSeconds,
address executor
) = abi.decode(initialization, (address, uint48, uint48, uint48, address));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a mock but maybe we could remove duplication here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplication?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was think about that repeated twice:

abi.decode(initArgs, (address, uint48, uint48, uint48, address));

james-toussaint
james-toussaint previously approved these changes Aug 4, 2025
@arr00 arr00 merged commit 1bbb21d into master Aug 5, 2025
14 checks passed
@arr00 arr00 deleted the feat/bytes-vesting-factory branch August 5, 2025 14:30
arr00 added a commit that referenced this pull request Aug 5, 2025
* Bytes params for vesting factory

* remove `.only`

* add test and fix lint

* rename `initialization` -> `initArgs`
arr00 added a commit that referenced this pull request Aug 19, 2025
* Start release candidate

* Release v0.2.0 (rc) (#88)

* Release v0.2.0 (rc)

* update changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

* Check values are encrypted with FHE.isInitialized(..) (#81)

* Check values are encrypted with FHE.isInitialized(..)

* Remove changeset

* Calll FHE library with full name

* Set empty changeset

* Remove empty changeset

* Fix solhint and order imports (#73)

* fix solhint and order imports

* fix import ordering

* fix import ordering

* Add confidential to `balanceOf` and `totalSupply` functions (#93)

* Rename token functions

* add changeset

* Add internal function to wrapper that allows setting the max decimals (#89)

* Create an internal function to allow overriding the max decimals ConfidentialFungibleTokenERC20Wrapper

* fix tets

* Add changeset

* Update NPM package name (#98)

* Add Vesting Wallet (#91)

* 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 <33313130+james-toussaint@users.noreply.github.com>

* 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 <hadrien.croubois@gmail.com>

* 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 <13561405+arr00@users.noreply.github.com>

* update docs

* update cliff seconds param size

* remove upgradeable file

* add docs

* Update .changeset/cold-nails-go.md

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* update comments

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>

* Increase internal accounting to euint128 to avoid overflow in vesting (#101)

* Increase internal accounting to euint128 to avoid overflow in vesting

* remove overflow comment

* remove unused import

* Update pragmas on token files (#106)

* Fund multiple `VestingWalletConfidential` in batch (#102)

* Fund multiple `VestingWalletConfidential` in batch

* Deploy full vesting wallets from factory

* Increase pragma in factory

* fix types in `_vestingSchedule`

* Update changeset

Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

* Add more context to events

* Update doc & comments

* Format doc

* Check cliff in batcher

* Remove total transfered amount computation in batcher

* Set factory as non abstract

* Lighten vesting struct & check beneficiary from batcher

* up

* `ERC7821WithExecutor` instead of `VestingWalletExecutorConfidential` (#104)

* Init executor with ERC7821

* Update `ERC7821WithExecutor`

* rename executor file

* update tests

* move `ERC7821WithExecutor` test

* fix tests

* update test

* use vanilla helpers

* disable slither for locking ether

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>

* clean

* fix imports order

* Apply suggestions from code review

* up

* update comments

* remove constructor

* fix function ordering

* add changeset

* Update .changeset/tricky-boxes-train.md

Co-authored-by: Ernesto García <ernestognw@gmail.com>

* `VestingWalletConfidentialFactory` -> `VestingWalletCliffExecutorConfidentialFactory`

* Duration and Cliff per vesting plan (#105)

* Update .changeset/poor-colts-glow.md

* upgrade pragmas

* fix docs

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>

* Set npm access to public when publishing (#107)

* Release v0.2.0 (rc) (#108)

* Release v0.2.0 (rc)

* update changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

* Remove default clone impl for vesting wallet factory (#109)

* Remove default clone impl for factory

* up

* rename vesting wallet file

* Update .changeset/old-chefs-lie.md

* Release v0.2.0 (rc) (#110)

* Release v0.2.0 (rc)

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

* Fix `VestingWalletConfidentialCreated` event emission (#121)

* Fix `VestingWalletConfidentialCreated` event emission

* Swap VestingWalletConfidentialCreated first args in test

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* Increase integer size for `_tokenReleased` (#120)

* Fix return value when refund fails confidential token (#118)

* Fix  return value when refund fails

* Apply suggestions from code review

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* Move excess transfer to the end when wrapper receives callback (#125)

* Standardize initializers with chained and unchained versions (#119)

* Standardize initializers with chained and unchained versions

* fix lint

* Apply suggestions from code review

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* code review

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* Add memory safe annotation to relevant assembly blocks (#132)

* Remove unused error `CheckpointUnorderedInsertion` (#131)

* Set minimum required pragma (#127)

Set minimum required pragma in`ERC20Mock`

* Add default underlying token decimals customization in wrapper (#133)

* Add default underlying token decimals customization in wrapper

* Use fallback wording

* Return 0 if overflow in `releasable` (#122)

* Return 0 if overflow in `releasable`

* Update contracts/finance/VestingWalletConfidential.sol

* typo

* Add compatibility warning to confidential token wrapper (#134)

* Add minting wrap note

* Update contracts/token/extensions/ConfidentialFungibleTokenERC20Wrapper.sol

* remove gen-nav

* add gen-nav as local file

* move warning to the top

---------

Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

* Bytes params for vesting factory (#135)

* Bytes params for vesting factory

* remove `.only`

* add test and fix lint

* rename `initialization` -> `initArgs`

* Add inline documentation (#137)

* Add docc

* Update contracts/governance/utils/VotesConfidential.sol

* Update comment

Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

---------

Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>

* Add `HandleAccessManager` (#143)

* Add ACLAllowance

* add tests

* fix lint

* spelling

* remove `.only`.

* fix test

* remove excess default allowances

* rename files

* finish rename

* up

* Update contracts/utils/README.adoc

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* Update contracts/utils/HandleAccessManager.sol

* move test file

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* Standardize data types `VestingWalletConfidential` (#146)

* Remove unused imports and fix docs (#150)

* Remove unnecessary type casting (#149)

* Exit prerelease (#169)

exit prerelease

* Release v0.2.0 (#145)

* Release v0.2.0

* Update changelog release v0.2.0 (#170)

* Update changelog release v0.2.0

* Update CHANGELOG.md

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

---------

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Ernesto García <ernestognw@gmail.com>

* add missing changelog entry

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>

* Update contracts/token/utils/ConfidentialFungibleTokenUtils.sol

* fix gitmodules

* Update contracts/utils/structs/temporary-Checkpoints.sol

Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Co-authored-by: James Toussaint <33313130+james-toussaint@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants