One file. No server, no bundler, no build step, no network calls other than your own RPC.
Empties a Waypoint executor (Kernel v3.3 smart account) back into the wallet that owns it,
by self-bundling an ERC-4337 UserOperation through EntryPoint.handleOps.
Read the HTML comment at the top of this file before trusting it.
Reads go through the RPC override if you set one, otherwise through MetaMask. Signing and sending always go through MetaMask. Any chain works if you override the RPC — the chain-switch buttons are a convenience, not a restriction.
Or derive it from the owner + the delegation's account index, exactly the way Waypoint
does: KernelFactory.getAddress(initData, bytes32(index)) on the canonical
Kernel v3.3 factory. This is a pure on-chain view call — it needs no server. You still
need the index, which the Waypoint console shows next to the pool.
The EntryPoint charges the ACCOUNT for gas, so it must hold a deposit before it will run your
recovery UserOperation. Estimated worst case per sweep:
—.
Leftovers stay credited to the executor and are retrievable later via
EntryPoint.withdrawTo.
| token | address | executor balance |
|---|
"Sweep home" builds execute(SINGLE, executor→token.transfer(you, fullBalance)),
asks MetaMask for one personal_sign over the userOpHash, then sends one plain
transaction calling EntryPoint.handleOps with you as the beneficiary.
PULL-mode grants leave ERC-20 approvals on your own EOA pointing at the executor. Those
are not funds the executor holds — they are funds it may still pull. Zeroing them is an
ordinary approve(executor, 0) transaction sent by you; no smart-account machinery
is involved at all.
| token | allowance you granted |
|---|