Skip to content

Conversation

@tenequm
Copy link
Member

@tenequm tenequm commented Nov 26, 2025

No description provided.

…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.
@tenequm tenequm self-assigned this Nov 26, 2025
… optimization and improved execution behavior
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 28, 2025

Deploying splits with  Cloudflare Pages  Cloudflare Pages

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

View logs

- 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.
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.
@tenequm tenequm marked this pull request as ready for review December 1, 2025 15:17
@tenequm tenequm changed the title [DRAFT] docs: add evm chains contracts specification feat: add evm chains contracts specification and implementation Dec 1, 2025
…ressed issues and tighten the security of contracts
…tting issues caused by version inconsistencies
…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
@tenequm tenequm merged commit d8ebffb into main Dec 2, 2025
1 check passed
@tenequm tenequm deleted the feat/add-evm-chains-support branch December 2, 2025 21:36
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.

2 participants