EIP-7702 delegated execution contracts for automatic fund forwarding on Story Network.
- An EOA delegates to a
FundForwardercontract via EIP-7702 - Native token transfers to that EOA execute the forwarder's
receive()function - Funds from authorized source vaults are forwarded based on threshold:
- Below threshold →
tradingDesk - Above threshold →
target - Crossing threshold → split between both
- Below threshold →
forge build
forge testforge script script/DeployFundForwarderFactory.s.sol:DeployFundForwarderFactory \
--sig "run(bytes32)" <SALT> \
--broadcast --rpc-url <RPC_URL> --account <ACCOUNT>forge script script/DeployFundForwarders.s.sol:DeployFundForwarders \
--sig "run(address,address,address,address,uint256)" \
<FACTORY> <SOURCE_VAULT> <TRADING_DESK> <TARGET> <THRESHOLD> \
--broadcast --rpc-url <RPC_URL> --account <ACCOUNT>FundForwarder.sol- Core forwarding logic with dual-destination threshold supportFundForwarderFactory.sol- CREATE3-based factory for deterministic deployment