Plan an exit, a rule, a hand-over or a delegation on a ladder
plan_ladder_actionPlans one action on a ladder the wallet owns (or is the delegate of) and returns the unsigned transaction. Use after my_ladders. action: collect pays the fees earned and leaves the ladder working; close_part takes sharePct of every rung out; close pays the fees and returns everything (and cancels a limit order); take_nfts hands the Uniswap position NFTs to the owner, paused or not, for 5% of the ladder's value; close_once_filled sets or clears a limit order's fill rule; give hands the ladder to another wallet as it is, final; delegate lets a wallet run it within perms, every payout still to the owner. Returns: transactions[] (to, data, value in wei, gas), check (simulated, ok, failedStep, reason, ethNeeded, ethHeld), sendWithin, ifItReverts, slippagePct, expected amounts for a close, gainCut where a share of a gain applies (ladders opened before 30 September 2026). Behavior: read-only on our side; nothing is signed or sent. The plan is laid out from the chain at this block and simulated from the owner; send it within check.sendWithin, and plan again rather than resend one that reverted. Costs quota units (agent_quota). Errors: refused when the ladder is not the owner's, is closed, the action does not fit (a filled order cannot take the rule), or the delegate lacks the permission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on | No | close_once_filled only: true sets the rule (default), false clears it. | |
| to | No | Where the proceeds go; the owner when left out. For give: the wallet that receives the ladder. | |
| who | No | delegate only: the wallet that may run the ladder. | |
| actor | No | The wallet that will send the transaction when it is the ladder's delegate, not its owner. It must hold the permission; the proceeds go to the owner. | |
| owner | Yes | The ladder's owner. | |
| perms | No | delegate only: permissions summed: 1 add, 2 remove (close, close part, take the NFTs, all paid to the owner), 4 collect (to the owner), 8 rules (autopilot, compounding). 0 ends the delegation. | |
| action | Yes | What to do: collect, close_part, close, take_nfts, close_once_filled, give, delegate. | |
| contract | No | The LoomLadder the ladder lives in, from my_ladders. Left out: the current one. | |
| ladderId | Yes | The ladder's id, from my_ladders. | |
| sharePct | No | close_part only: the share of every rung to take out, 1 to 99. | |
| slippagePct | No | close and close_part: room for the price to move, in percent; sets the minimums. Left out: from the pool's recent moves. |