Open
Conversation
Contributor
grasphoper
commented
Feb 26, 2026
- Counterfactual deposit addresses
* WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * executor address * EIP-712 for signatures * tests passing * remove executor as state variable in factory * use OZ clones instead of custom proxy * cleanup * Deposit to CCTPSrcPeriphery instead of SpokePool * rename immutables struct * only store hash of immutables * clean up withdraw functions * add execution fee * refactor & add OFT/Spoke implementations * make refund recipient an immutable * add base abstract contract & correct spoke pool max fee calc * clean up SpokePool implementation * polish * add comments * exclude counterfactual contracts from hardhat compilation * more cleanup * undo hardhat exclusion change * clean up readme * user and admin withdraw addresses as address rather than bytes32 * remove unneeded balance check reverts * only pass in hash of params to deploy functions * remove try/catch in factory * rename PRECISION_SCALAR to PRICE_SCALAR * update readme * update readme * change OFT token from bytes32 to address * make exclusiveRelayer and exclusivityDeadline signed calldata * rename price to stableExchangeRate * split immutables structs into separate deposit & execution structs * make verifyParams a modifier * make quoteTimestamp signed * make depositExecution events more descriptive * add native asset support * update imports * add signature deadline * add counterfactual contracts to hardhat test compilation exclusion * add comments for caller passing msg.value for LZ fee * make SpokePool maxFee have fixed and bps components * make DepositExecuted events separate per implementation * add deployAndExecuteIfNeeded function to factory * add AdminWithdrawManager and cleanup withdraw functions & param hash verification --------- Signed-off-by: Matt Rice <matthewcrice32@gmail.com> Co-authored-by: Matt Rice <matthewcrice32@gmail.com>
…ctual deposits (#1331) * replace params-hash dispatcher with merkle-dispatched counterfactual deposits Single dispatcher contract stores a merkle root as its immutable arg. Each leaf is (implementation, keccak256(params)). Callers prove leaf inclusion via merkle proof, then the dispatcher delegatecalls the implementation. Withdrawals become a standard implementation (WithdrawImplementation) rather than baked-in base logic, enabling one deposit address to support multiple possible actions. - Add CounterfactualDeposit dispatcher and ICounterfactualImplementation - Add WithdrawImplementation with authorized caller + forced recipient - Adapt SpokePool, CCTP, OFT implementations to ICounterfactualImplementation - Adapt AdminWithdrawManager for merkle-based withdraw execution - Delete CounterfactualDepositBase (replaced by dispatcher + WithdrawImpl) - Rewrite all tests for merkle pattern (90 tests passing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * remove unused bytes return from execute interfaces The return value was never consumed by any caller (factory, AdminWithdrawManager, or tests). Removing it simplifies the interfaces and saves gas by avoiding ABI decode/re-encode of the delegatecall result in the dispatcher. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * simplify WithdrawParams to single {admin, user} merkle leaf Replace {authorizedCaller, forcedRecipient} with {admin, user} so each clone needs only one withdraw leaf instead of up to three. Both admin and user can withdraw to any recipient. Recipient enforcement for signed withdrawals moves to AdminWithdrawManager.signedWithdrawToUser, which reads the user address from the merkle-committed params. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * extract shared NATIVE_ASSET and BPS_SCALAR into CounterfactualConstants Addresses review feedback: both constants were duplicated across WithdrawImplementation, CounterfactualDepositSpokePool, and CounterfactualDepositCCTP. Now defined once as file-level constants and imported by name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ery (#1329) * [WIP] feat: add TransferProxy to allow same-chain swaps via SpokePoolPeriphery Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * WIP Signed-off-by: Matt Rice <matthewcrice32@gmail.com> * fix: remove payable from TransferProxy deposit functions ETH sent to these functions would be permanently trapped since TransferProxy only handles ERC-20 transfers. Removing payable causes the EVM to reject any calls that send ETH. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Signed-off-by: Matt Rice <matthewcrice32@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ihor Farion <ihor@umaproject.org>
* WIP tron factory compatibility changes * add foundry Tron profile * add natspec * make tron factory inherit from base counterfactual factory * move TronClones.sol into libraries folder * add references to OZ libraries forked from in comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.