-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add evm chains contracts specification and implementation #1
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
Conversation
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
…gurations on EVM chains - Implemented SplitFactory contract using EIP-1167 minimal proxy pattern for efficient deployment. - Added functionality for creating split configurations with deterministic addresses. - Included methods for updating protocol configurations and transferring authority. - Introduced events for tracking split creation and authority transfers. chore: configure Foundry for EVM implementation - Created foundry.toml for project configuration including source and output directories. - Set Solidity compiler version to 0.8.24 with optimization enabled. feat: develop Cascade Splits SDK for EVM - Implemented CascadeSplits SDK for interacting with the SplitFactory and SplitConfig contracts. - Added methods for creating split configurations, executing splits, and validating recipient data. - Included utilities for detecting split configurations and handling x402 integration. docs: draft Cascade Splits EVM specification - Created specification document outlining the design, functionality, and usage of the Cascade Splits protocol on EVM. - Detailed contract structure, core concepts, and integration with x402 protocol. - Provided instructions for deployment and SDK usage examples.
… optimization and improved execution behavior
Deploying splits with
|
| Latest commit: |
bab96d5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3cda9f6c.splits-2l5.pages.dev |
| Branch Preview URL: | https://feat-add-evm-chains-support.splits-2l5.pages.dev |
…xecuteSplit algorithm
- Add createSplitConfig function signature with params and validation - Add factory constructor (deployer becomes initial authority) - Add SplitConfigCreated event signature for indexers - Add PROTOCOL_INDEX constant for bitmap index 20 - Document CREATE2 collision check mechanism - Clarify address derivation includes recipients in immutable data - Add NoPendingTransfer error for acceptProtocolAuthority - Remove outdated scaffold (incompatible with immutable args pattern)
- Fix incorrect Clone.sol reference (Solady has CWIA in legacy/, not Clone in utils/) - Add both import options: wighawag's Clone.sol and Solady's legacy/CWIA.sol - Add _getRecipient() helper showing packed struct unpacking pattern - Add feeWallet factory call pattern documentation - Update Resources section with correct dependency links
BREAKING: The spec previously referenced wighawag's Clone.sol and Solady's legacy CWIA.sol for reading immutable args. These patterns read from calldata, but Solady's LibClone does NOT append args to calldata during delegatecall - they remain in bytecode only. Fixed: - Updated reading pattern to use inline assembly with EXTCODECOPY - Added 0x2d offset documentation (45-byte proxy prefix) - Removed references to incompatible Clone.sol/CWIA.sol patterns - Updated SplitConfig comments and byte layout table - Added explanatory note about CWIA pattern differences Verified against Solady's official LibClone.t.sol test patterns.
…erface definitions
…idity version requirements
…o feat/add-evm-chains-support
Add complete EVM implementation of Cascade Splits for Base L2: - SplitFactory: EIP-1167 clone deployment with CREATE2 determinism, versioned implementations, two-step authority transfer - SplitConfigImpl: executeSplit with self-healing unclaimed recovery, EIP-1153 transient storage reentrancy guard, EXTCODECOPY immutable args - Full validation: 1-20 recipients, 9900 bps total, duplicate detection - 63 tests covering factory, execution, self-healing, and edge cases Uses Solady's LibClone for gas-optimized clones with immutable args.
…o feat/add-evm-chains-support
…ressed issues and tighten the security of contracts
…tting issues caused by version inconsistencies
…for recipient handling
…ressed issues and tighten the security of contracts - Fix SplitFactory to accept authority in constructor for CREATE2 determinism - LocalValidation now uses vm.startPrank for pure simulation (no RPC/env vars) - Add GasBenchmark.t.sol for accurate gas cost tracking - Update spec with measured gas costs (91k-567k for executeSplit) - Add deterministic contract addresses to spec
- Add 8 invariant tests with handler contract for stateful fuzzing - Add 3 fork tests: two-step authority, CREATE2 detection, pre-fund - Update README with known limitations for edge cases - Update spec with fee wallet change behavior and decimal agnosticism - Update foundry.toml with invariant testing configuration Total: 123 tests (was 112)
- Fork tests now use DEPLOYED contracts instead of fresh deployments - Added vm.skip(true) for honest SKIP status when contracts not deployed - Use balance delta assertions to work with existing deployed state - Tests PASS on Base Sepolia (26 tests), SKIP on Base Mainnet This ensures fork tests validate the actual deployment, not just fresh code.
- Update contracts/README.md with mainnet explorer links - Update docs/specification-evm.md deployment status to "Deployed" - Both mainnet and testnet links now shown in tables
…o feat/add-evm-chains-support
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.
No description provided.