@eco-incorp/sauce 0.99.6 → 0.99.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1158) hide show
  1. package/README.md +58 -16
  2. package/actions/action-program.schema.json +480 -379
  3. package/actions/dist/abis.d.ts +19 -18
  4. package/actions/dist/abis.d.ts.map +1 -1
  5. package/actions/dist/abis.js +29 -29
  6. package/actions/dist/compile.d.ts +4 -4
  7. package/actions/dist/compile.d.ts.map +1 -1
  8. package/actions/dist/compile.js +3 -1
  9. package/actions/dist/compose.d.ts +63 -6
  10. package/actions/dist/compose.d.ts.map +1 -1
  11. package/actions/dist/compose.js +100 -16
  12. package/actions/dist/index.d.ts +1 -1
  13. package/actions/dist/index.d.ts.map +1 -1
  14. package/actions/dist/names.d.ts +88 -0
  15. package/actions/dist/names.d.ts.map +1 -0
  16. package/actions/dist/names.js +324 -0
  17. package/actions/dist/program.d.ts.map +1 -1
  18. package/actions/dist/program.js +115 -5
  19. package/actions/dist/registry.d.ts +10 -8
  20. package/actions/dist/registry.d.ts.map +1 -1
  21. package/actions/dist/registry.js +10 -8
  22. package/actions/dist/schema.d.ts.map +1 -1
  23. package/actions/dist/schema.js +99 -12
  24. package/actions/dist/semantics.d.ts +12 -2
  25. package/actions/dist/semantics.d.ts.map +1 -1
  26. package/actions/dist/semantics.js +78 -8
  27. package/actions/dist/spec.d.ts +30 -0
  28. package/actions/dist/spec.d.ts.map +1 -1
  29. package/actions/dist/spec.js +151 -138
  30. package/actions/dist/split-swap.d.ts +10 -5
  31. package/actions/dist/split-swap.d.ts.map +1 -1
  32. package/actions/dist/split-swap.js +48 -7
  33. package/actions/dist/to-quote.d.ts +14 -5
  34. package/actions/dist/to-quote.d.ts.map +1 -1
  35. package/actions/dist/to-quote.js +210 -244
  36. package/actions/dist/to-sauce.d.ts +18 -4
  37. package/actions/dist/to-sauce.d.ts.map +1 -1
  38. package/actions/dist/to-sauce.js +232 -205
  39. package/actions/dist/types.d.ts +245 -147
  40. package/actions/dist/types.d.ts.map +1 -1
  41. package/actions/dist/types.js +4 -0
  42. package/docs/README.md +38 -0
  43. package/docs/api/README.md +37 -23
  44. package/docs/api/compiler.md +53 -12
  45. package/docs/api/contracts.md +105 -0
  46. package/docs/api/coverage.md +80 -57
  47. package/docs/api/router.md +238 -0
  48. package/docs/api/routes.md +31 -22
  49. package/docs/concepts/architecture.md +26 -3
  50. package/docs/concepts/saucescript.md +35 -55
  51. package/docs/examples/README.md +21 -14
  52. package/docs/examples/action-program.ts +51 -35
  53. package/docs/examples/cross-chain-cascade.sauce.ts +4 -0
  54. package/docs/examples/cross-chain-intent.sauce.ts +2 -1
  55. package/docs/examples/evm-execution.ts +2 -4
  56. package/docs/examples/first-intent.ts +7 -2
  57. package/docs/examples/pot-router.ts +19 -0
  58. package/docs/examples/registry-names.ts +52 -0
  59. package/docs/examples/router-route.sauce.ts +31 -0
  60. package/docs/examples/router-route.ts +72 -0
  61. package/docs/examples/router-swap.sauce.ts +16 -0
  62. package/docs/examples/router-swap.ts +47 -0
  63. package/docs/examples/venue-where-deployed.sauce.ts +14 -0
  64. package/docs/guides/actions.md +230 -120
  65. package/docs/guides/builders-and-actions.md +20 -14
  66. package/docs/guides/cli.md +1442 -0
  67. package/docs/guides/compiling.md +19 -7
  68. package/docs/guides/intents.md +228 -15
  69. package/docs/guides/mcp.md +539 -0
  70. package/docs/guides/nested-intents.md +21 -6
  71. package/docs/guides/protocols-and-tokens.md +218 -39
  72. package/docs/guides/quick-start.md +5 -0
  73. package/docs/guides/solana.md +199 -52
  74. package/docs/guides/verification.md +2 -2
  75. package/mcp/dist/config.js +78 -0
  76. package/mcp/dist/config.js.map +1 -0
  77. package/mcp/dist/entry.js +112 -0
  78. package/mcp/dist/entry.js.map +1 -0
  79. package/mcp/dist/files.js +64 -0
  80. package/mcp/dist/files.js.map +1 -0
  81. package/mcp/dist/guard.js +262 -0
  82. package/mcp/dist/guard.js.map +1 -0
  83. package/mcp/dist/http.js +111 -0
  84. package/mcp/dist/http.js.map +1 -0
  85. package/mcp/dist/intents.js +579 -0
  86. package/mcp/dist/intents.js.map +1 -0
  87. package/mcp/dist/prompts.js +153 -0
  88. package/mcp/dist/prompts.js.map +1 -0
  89. package/mcp/dist/reach.js +98 -0
  90. package/mcp/dist/reach.js.map +1 -0
  91. package/mcp/dist/resources.js +154 -0
  92. package/mcp/dist/resources.js.map +1 -0
  93. package/mcp/dist/sdk.js +34 -0
  94. package/mcp/dist/sdk.js.map +1 -0
  95. package/mcp/dist/server.js +119 -0
  96. package/mcp/dist/server.js.map +1 -0
  97. package/mcp/dist/setup.js +189 -0
  98. package/mcp/dist/setup.js.map +1 -0
  99. package/mcp/dist/skilltools.js +520 -0
  100. package/mcp/dist/skilltools.js.map +1 -0
  101. package/mcp/dist/terms.js +93 -0
  102. package/mcp/dist/terms.js.map +1 -0
  103. package/mcp/dist/tools.js +1497 -0
  104. package/mcp/dist/tools.js.map +1 -0
  105. package/mcp/dist/wallets.js +168 -0
  106. package/mcp/dist/wallets.js.map +1 -0
  107. package/package.json +18 -13
  108. package/sdk/dist/artifacts/V12Deployments.json +3 -1
  109. package/sdk/dist/artifacts/V12EngineGate.json +1 -2
  110. package/sdk/dist/artifacts/V12KitchenProxy.json +1 -0
  111. package/sdk/dist/chains/canonical.d.ts +15 -24
  112. package/sdk/dist/chains/canonical.d.ts.map +1 -1
  113. package/sdk/dist/chains/canonical.js +18 -29
  114. package/sdk/dist/chains/canonical.js.map +1 -1
  115. package/sdk/dist/cli/actions.d.ts +29 -0
  116. package/sdk/dist/cli/actions.d.ts.map +1 -0
  117. package/sdk/dist/cli/actions.js +122 -0
  118. package/sdk/dist/cli/actions.js.map +1 -0
  119. package/sdk/dist/cli/args.d.ts +118 -0
  120. package/sdk/dist/cli/args.d.ts.map +1 -0
  121. package/sdk/dist/cli/args.js +354 -0
  122. package/sdk/dist/cli/args.js.map +1 -0
  123. package/sdk/dist/cli/assume.d.ts +51 -0
  124. package/sdk/dist/cli/assume.d.ts.map +1 -0
  125. package/sdk/dist/cli/assume.js +207 -0
  126. package/sdk/dist/cli/assume.js.map +1 -0
  127. package/sdk/dist/cli/chain.d.ts +170 -0
  128. package/sdk/dist/cli/chain.d.ts.map +1 -0
  129. package/sdk/dist/cli/chain.js +457 -0
  130. package/sdk/dist/cli/chain.js.map +1 -0
  131. package/sdk/dist/cli/commands.d.ts +226 -0
  132. package/sdk/dist/cli/commands.d.ts.map +1 -0
  133. package/sdk/dist/cli/commands.js +637 -0
  134. package/sdk/dist/cli/commands.js.map +1 -0
  135. package/sdk/dist/cli/create.d.ts +70 -0
  136. package/sdk/dist/cli/create.d.ts.map +1 -0
  137. package/sdk/dist/cli/create.js +483 -0
  138. package/sdk/dist/cli/create.js.map +1 -0
  139. package/sdk/dist/cli/diagnostics.d.ts +12 -0
  140. package/sdk/dist/cli/diagnostics.d.ts.map +1 -0
  141. package/sdk/dist/cli/diagnostics.js +200 -0
  142. package/sdk/dist/cli/diagnostics.js.map +1 -0
  143. package/sdk/dist/cli/effects.d.ts +71 -0
  144. package/sdk/dist/cli/effects.d.ts.map +1 -0
  145. package/sdk/dist/cli/effects.js +279 -0
  146. package/sdk/dist/cli/effects.js.map +1 -0
  147. package/sdk/dist/cli/fill.d.ts +83 -0
  148. package/sdk/dist/cli/fill.d.ts.map +1 -0
  149. package/sdk/dist/cli/fill.js +734 -0
  150. package/sdk/dist/cli/fill.js.map +1 -0
  151. package/sdk/dist/cli/funding.d.ts +126 -0
  152. package/sdk/dist/cli/funding.d.ts.map +1 -0
  153. package/sdk/dist/cli/funding.js +514 -0
  154. package/sdk/dist/cli/funding.js.map +1 -0
  155. package/sdk/dist/cli/globals.d.ts +16 -0
  156. package/sdk/dist/cli/globals.d.ts.map +1 -0
  157. package/sdk/dist/cli/globals.js +197 -0
  158. package/sdk/dist/cli/globals.js.map +1 -0
  159. package/sdk/dist/cli/init.d.ts +34 -0
  160. package/sdk/dist/cli/init.d.ts.map +1 -0
  161. package/sdk/dist/cli/init.js +181 -0
  162. package/sdk/dist/cli/init.js.map +1 -0
  163. package/sdk/dist/cli/inputs.d.ts +72 -0
  164. package/sdk/dist/cli/inputs.d.ts.map +1 -0
  165. package/sdk/dist/cli/inputs.js +152 -0
  166. package/sdk/dist/cli/inputs.js.map +1 -0
  167. package/sdk/dist/cli/inspect.d.ts +48 -0
  168. package/sdk/dist/cli/inspect.d.ts.map +1 -0
  169. package/sdk/dist/cli/inspect.js +536 -0
  170. package/sdk/dist/cli/inspect.js.map +1 -0
  171. package/sdk/dist/cli/intent-commands.d.ts +71 -0
  172. package/sdk/dist/cli/intent-commands.d.ts.map +1 -0
  173. package/sdk/dist/cli/intent-commands.js +698 -0
  174. package/sdk/dist/cli/intent-commands.js.map +1 -0
  175. package/sdk/dist/cli/intent-svm.d.ts +15 -0
  176. package/sdk/dist/cli/intent-svm.d.ts.map +1 -0
  177. package/sdk/dist/cli/intent-svm.js +222 -0
  178. package/sdk/dist/cli/intent-svm.js.map +1 -0
  179. package/sdk/dist/cli/intents.d.ts +43 -0
  180. package/sdk/dist/cli/intents.d.ts.map +1 -0
  181. package/sdk/dist/cli/intents.js +89 -0
  182. package/sdk/dist/cli/intents.js.map +1 -0
  183. package/sdk/dist/cli/interactive.d.ts +11 -0
  184. package/sdk/dist/cli/interactive.d.ts.map +1 -0
  185. package/sdk/dist/cli/interactive.js +161 -0
  186. package/sdk/dist/cli/interactive.js.map +1 -0
  187. package/sdk/dist/cli/lifecycle-svm.d.ts +109 -0
  188. package/sdk/dist/cli/lifecycle-svm.d.ts.map +1 -0
  189. package/sdk/dist/cli/lifecycle-svm.js +299 -0
  190. package/sdk/dist/cli/lifecycle-svm.js.map +1 -0
  191. package/sdk/dist/cli/lifecycle.d.ts +439 -0
  192. package/sdk/dist/cli/lifecycle.d.ts.map +1 -0
  193. package/sdk/dist/cli/lifecycle.js +1721 -0
  194. package/sdk/dist/cli/lifecycle.js.map +1 -0
  195. package/sdk/dist/cli/main.d.ts +3 -0
  196. package/sdk/dist/cli/main.d.ts.map +1 -0
  197. package/sdk/dist/cli/main.js +8 -0
  198. package/sdk/dist/cli/main.js.map +1 -0
  199. package/sdk/dist/cli/mcp.d.ts +66 -0
  200. package/sdk/dist/cli/mcp.d.ts.map +1 -0
  201. package/sdk/dist/cli/mcp.js +169 -0
  202. package/sdk/dist/cli/mcp.js.map +1 -0
  203. package/sdk/dist/cli/password.d.ts +54 -0
  204. package/sdk/dist/cli/password.d.ts.map +1 -0
  205. package/sdk/dist/cli/password.js +148 -0
  206. package/sdk/dist/cli/password.js.map +1 -0
  207. package/sdk/dist/cli/policy.d.ts +130 -0
  208. package/sdk/dist/cli/policy.d.ts.map +1 -0
  209. package/sdk/dist/cli/policy.js +702 -0
  210. package/sdk/dist/cli/policy.js.map +1 -0
  211. package/sdk/dist/cli/pools.d.ts +140 -0
  212. package/sdk/dist/cli/pools.d.ts.map +1 -0
  213. package/sdk/dist/cli/pools.js +658 -0
  214. package/sdk/dist/cli/pools.js.map +1 -0
  215. package/sdk/dist/cli/price.d.ts +74 -0
  216. package/sdk/dist/cli/price.d.ts.map +1 -0
  217. package/sdk/dist/cli/price.js +321 -0
  218. package/sdk/dist/cli/price.js.map +1 -0
  219. package/sdk/dist/cli/prompt.d.ts +30 -0
  220. package/sdk/dist/cli/prompt.d.ts.map +1 -0
  221. package/sdk/dist/cli/prompt.js +53 -0
  222. package/sdk/dist/cli/prompt.js.map +1 -0
  223. package/sdk/dist/cli/publish.d.ts +48 -0
  224. package/sdk/dist/cli/publish.d.ts.map +1 -0
  225. package/sdk/dist/cli/publish.js +480 -0
  226. package/sdk/dist/cli/publish.js.map +1 -0
  227. package/sdk/dist/cli/receipt.d.ts +35 -0
  228. package/sdk/dist/cli/receipt.d.ts.map +1 -0
  229. package/sdk/dist/cli/receipt.js +63 -0
  230. package/sdk/dist/cli/receipt.js.map +1 -0
  231. package/sdk/dist/cli/rehearse.d.ts +80 -0
  232. package/sdk/dist/cli/rehearse.d.ts.map +1 -0
  233. package/sdk/dist/cli/rehearse.js +265 -0
  234. package/sdk/dist/cli/rehearse.js.map +1 -0
  235. package/sdk/dist/cli/report.d.ts +69 -0
  236. package/sdk/dist/cli/report.d.ts.map +1 -0
  237. package/sdk/dist/cli/report.js +206 -0
  238. package/sdk/dist/cli/report.js.map +1 -0
  239. package/sdk/dist/cli/returned.d.ts +16 -0
  240. package/sdk/dist/cli/returned.d.ts.map +1 -0
  241. package/sdk/dist/cli/returned.js +111 -0
  242. package/sdk/dist/cli/returned.js.map +1 -0
  243. package/sdk/dist/cli/run.d.ts +40 -0
  244. package/sdk/dist/cli/run.d.ts.map +1 -0
  245. package/sdk/dist/cli/run.js +3162 -0
  246. package/sdk/dist/cli/run.js.map +1 -0
  247. package/sdk/dist/cli/signer.d.ts +72 -0
  248. package/sdk/dist/cli/signer.d.ts.map +1 -0
  249. package/sdk/dist/cli/signer.js +243 -0
  250. package/sdk/dist/cli/signer.js.map +1 -0
  251. package/sdk/dist/cli/simulate.d.ts +11 -0
  252. package/sdk/dist/cli/simulate.d.ts.map +1 -0
  253. package/sdk/dist/cli/simulate.js +246 -0
  254. package/sdk/dist/cli/simulate.js.map +1 -0
  255. package/sdk/dist/cli/skills.d.ts +77 -0
  256. package/sdk/dist/cli/skills.d.ts.map +1 -0
  257. package/sdk/dist/cli/skills.js +527 -0
  258. package/sdk/dist/cli/skills.js.map +1 -0
  259. package/sdk/dist/cli/solana.d.ts +183 -0
  260. package/sdk/dist/cli/solana.d.ts.map +1 -0
  261. package/sdk/dist/cli/solana.js +1360 -0
  262. package/sdk/dist/cli/solana.js.map +1 -0
  263. package/sdk/dist/cli/store.d.ts +60 -0
  264. package/sdk/dist/cli/store.d.ts.map +1 -0
  265. package/sdk/dist/cli/store.js +196 -0
  266. package/sdk/dist/cli/store.js.map +1 -0
  267. package/sdk/dist/cli/support.d.ts +144 -0
  268. package/sdk/dist/cli/support.d.ts.map +1 -0
  269. package/sdk/dist/cli/support.js +217 -0
  270. package/sdk/dist/cli/support.js.map +1 -0
  271. package/sdk/dist/cli/svm-effects.d.ts +50 -0
  272. package/sdk/dist/cli/svm-effects.d.ts.map +1 -0
  273. package/sdk/dist/cli/svm-effects.js +196 -0
  274. package/sdk/dist/cli/svm-effects.js.map +1 -0
  275. package/sdk/dist/cli/terminal.d.ts +42 -0
  276. package/sdk/dist/cli/terminal.d.ts.map +1 -0
  277. package/sdk/dist/cli/terminal.js +136 -0
  278. package/sdk/dist/cli/terminal.js.map +1 -0
  279. package/sdk/dist/cli/verify.d.ts +32 -0
  280. package/sdk/dist/cli/verify.d.ts.map +1 -0
  281. package/sdk/dist/cli/verify.js +185 -0
  282. package/sdk/dist/cli/verify.js.map +1 -0
  283. package/sdk/dist/cli/wallet-commands.d.ts +59 -0
  284. package/sdk/dist/cli/wallet-commands.d.ts.map +1 -0
  285. package/sdk/dist/cli/wallet-commands.js +222 -0
  286. package/sdk/dist/cli/wallet-commands.js.map +1 -0
  287. package/sdk/dist/cli/wallet-send.d.ts +38 -0
  288. package/sdk/dist/cli/wallet-send.d.ts.map +1 -0
  289. package/sdk/dist/cli/wallet-send.js +303 -0
  290. package/sdk/dist/cli/wallet-send.js.map +1 -0
  291. package/sdk/dist/cli/wallets.d.ts +79 -0
  292. package/sdk/dist/cli/wallets.d.ts.map +1 -0
  293. package/sdk/dist/cli/wallets.js +297 -0
  294. package/sdk/dist/cli/wallets.js.map +1 -0
  295. package/sdk/dist/deployments/index.d.ts +4 -62
  296. package/sdk/dist/deployments/index.d.ts.map +1 -1
  297. package/sdk/dist/deployments/index.js +4 -84
  298. package/sdk/dist/deployments/index.js.map +1 -1
  299. package/sdk/dist/deployments/pot.d.ts +17 -7
  300. package/sdk/dist/deployments/pot.d.ts.map +1 -1
  301. package/sdk/dist/deployments/pot.js +25 -10
  302. package/sdk/dist/deployments/pot.js.map +1 -1
  303. package/sdk/dist/deployments/releases.d.ts +36 -0
  304. package/sdk/dist/deployments/releases.d.ts.map +1 -0
  305. package/sdk/dist/deployments/releases.js +61 -0
  306. package/sdk/dist/deployments/releases.js.map +1 -0
  307. package/sdk/dist/deployments/releases.json +76 -0
  308. package/sdk/dist/deployments/v12-addresses.d.ts +13 -0
  309. package/sdk/dist/deployments/v12-addresses.d.ts.map +1 -1
  310. package/sdk/dist/deployments/v12-addresses.js +16 -3
  311. package/sdk/dist/deployments/v12-addresses.js.map +1 -1
  312. package/sdk/dist/deposit/index.d.ts +6 -6
  313. package/sdk/dist/deposit/index.d.ts.map +1 -1
  314. package/sdk/dist/deposit/index.js +1 -1
  315. package/sdk/dist/deposit/index.js.map +1 -1
  316. package/sdk/dist/deposit/params.d.ts +4 -4
  317. package/sdk/dist/deposit/params.d.ts.map +1 -1
  318. package/sdk/dist/deposit/params.js +7 -4
  319. package/sdk/dist/deposit/params.js.map +1 -1
  320. package/sdk/dist/deposit/source.d.ts +3 -30
  321. package/sdk/dist/deposit/source.d.ts.map +1 -1
  322. package/sdk/dist/deposit/source.js +7 -83
  323. package/sdk/dist/deposit/source.js.map +1 -1
  324. package/sdk/dist/deposit/templates.d.ts +1 -2
  325. package/sdk/dist/deposit/templates.d.ts.map +1 -1
  326. package/sdk/dist/deposit/templates.js +10 -2
  327. package/sdk/dist/deposit/templates.js.map +1 -1
  328. package/sdk/dist/deposit/types.d.ts +14 -12
  329. package/sdk/dist/deposit/types.d.ts.map +1 -1
  330. package/sdk/dist/deposit/types.js +6 -0
  331. package/sdk/dist/deposit/types.js.map +1 -1
  332. package/sdk/dist/descriptors/accessors.d.ts +38 -35
  333. package/sdk/dist/descriptors/accessors.d.ts.map +1 -1
  334. package/sdk/dist/descriptors/accessors.js +16 -0
  335. package/sdk/dist/descriptors/accessors.js.map +1 -1
  336. package/sdk/dist/descriptors/call.d.ts +66 -14
  337. package/sdk/dist/descriptors/call.d.ts.map +1 -1
  338. package/sdk/dist/descriptors/call.js +94 -13
  339. package/sdk/dist/descriptors/call.js.map +1 -1
  340. package/sdk/dist/descriptors/contracts.generated.d.ts +3393 -0
  341. package/sdk/dist/descriptors/contracts.generated.d.ts.map +1 -0
  342. package/sdk/dist/descriptors/contracts.generated.js +728 -0
  343. package/sdk/dist/descriptors/contracts.generated.js.map +1 -0
  344. package/sdk/dist/descriptors/derive.d.ts +20 -11
  345. package/sdk/dist/descriptors/derive.d.ts.map +1 -1
  346. package/sdk/dist/descriptors/derive.js +68 -30
  347. package/sdk/dist/descriptors/derive.js.map +1 -1
  348. package/sdk/dist/descriptors/index.d.ts +6 -7
  349. package/sdk/dist/descriptors/index.d.ts.map +1 -1
  350. package/sdk/dist/descriptors/index.js +2 -2
  351. package/sdk/dist/descriptors/index.js.map +1 -1
  352. package/sdk/dist/descriptors/links.d.ts +23 -214
  353. package/sdk/dist/descriptors/links.d.ts.map +1 -1
  354. package/sdk/dist/descriptors/links.js +1 -232
  355. package/sdk/dist/descriptors/links.js.map +1 -1
  356. package/sdk/dist/descriptors/query.d.ts +1 -1
  357. package/sdk/dist/descriptors/query.d.ts.map +1 -1
  358. package/sdk/dist/descriptors/query.js +1 -1
  359. package/sdk/dist/descriptors/query.js.map +1 -1
  360. package/sdk/dist/descriptors/registry.d.ts +2 -5
  361. package/sdk/dist/descriptors/registry.d.ts.map +1 -1
  362. package/sdk/dist/descriptors/registry.js +11 -66
  363. package/sdk/dist/descriptors/registry.js.map +1 -1
  364. package/sdk/dist/embedded/resolve.d.ts +4 -4
  365. package/sdk/dist/embedded/resolve.d.ts.map +1 -1
  366. package/sdk/dist/embedded/resolve.js +12 -8
  367. package/sdk/dist/embedded/resolve.js.map +1 -1
  368. package/sdk/dist/embedded/skills.generated.d.ts +1 -1
  369. package/sdk/dist/embedded/skills.generated.d.ts.map +1 -1
  370. package/sdk/dist/embedded/skills.generated.js +137 -136
  371. package/sdk/dist/embedded/skills.generated.js.map +1 -1
  372. package/sdk/dist/embedded/sources.generated.d.ts.map +1 -1
  373. package/sdk/dist/embedded/sources.generated.js +40 -6
  374. package/sdk/dist/embedded/sources.generated.js.map +1 -1
  375. package/sdk/dist/evm/engine.d.ts +813 -10
  376. package/sdk/dist/evm/engine.d.ts.map +1 -1
  377. package/sdk/dist/evm/engine.js +127 -8
  378. package/sdk/dist/evm/engine.js.map +1 -1
  379. package/sdk/dist/index.d.ts +3 -2
  380. package/sdk/dist/index.d.ts.map +1 -1
  381. package/sdk/dist/index.js +6 -2
  382. package/sdk/dist/index.js.map +1 -1
  383. package/sdk/dist/price.d.ts +40 -0
  384. package/sdk/dist/price.d.ts.map +1 -0
  385. package/sdk/dist/price.js +101 -0
  386. package/sdk/dist/price.js.map +1 -0
  387. package/sdk/dist/protocols/aerodrome/abis.d.ts +76 -0
  388. package/sdk/dist/protocols/aerodrome/abis.d.ts.map +1 -1
  389. package/sdk/dist/protocols/aerodrome/abis.js +61 -0
  390. package/sdk/dist/protocols/aerodrome/abis.js.map +1 -1
  391. package/sdk/dist/protocols/aerodrome-slipstream/abis.d.ts +70 -0
  392. package/sdk/dist/protocols/aerodrome-slipstream/abis.d.ts.map +1 -1
  393. package/sdk/dist/protocols/aerodrome-slipstream/abis.js +54 -0
  394. package/sdk/dist/protocols/aerodrome-slipstream/abis.js.map +1 -1
  395. package/sdk/dist/protocols/camelot/abis.d.ts +178 -0
  396. package/sdk/dist/protocols/camelot/abis.d.ts.map +1 -1
  397. package/sdk/dist/protocols/camelot/abis.js +139 -0
  398. package/sdk/dist/protocols/camelot/abis.js.map +1 -1
  399. package/sdk/dist/protocols/eco-routes/abis.d.ts +792 -50
  400. package/sdk/dist/protocols/eco-routes/abis.d.ts.map +1 -1
  401. package/sdk/dist/protocols/eco-routes/abis.js +1058 -49
  402. package/sdk/dist/protocols/eco-routes/abis.js.map +1 -1
  403. package/sdk/dist/protocols/eco-routes/addresses.generated.d.ts +44 -61
  404. package/sdk/dist/protocols/eco-routes/addresses.generated.d.ts.map +1 -1
  405. package/sdk/dist/protocols/eco-routes/addresses.generated.js +45 -62
  406. package/sdk/dist/protocols/eco-routes/addresses.generated.js.map +1 -1
  407. package/sdk/dist/protocols/eco-routes/lookup.d.ts +10 -0
  408. package/sdk/dist/protocols/eco-routes/lookup.d.ts.map +1 -1
  409. package/sdk/dist/protocols/eco-routes/lookup.js +16 -0
  410. package/sdk/dist/protocols/eco-routes/lookup.js.map +1 -1
  411. package/sdk/dist/protocols/maverick/abis.d.ts +77 -0
  412. package/sdk/dist/protocols/maverick/abis.d.ts.map +1 -1
  413. package/sdk/dist/protocols/maverick/abis.js +58 -0
  414. package/sdk/dist/protocols/maverick/abis.js.map +1 -1
  415. package/sdk/dist/protocols/maverick/addresses.d.ts.map +1 -1
  416. package/sdk/dist/protocols/maverick/addresses.js +4 -0
  417. package/sdk/dist/protocols/maverick/addresses.js.map +1 -1
  418. package/sdk/dist/protocols/pancakeswap-v2/abis.d.ts +52 -0
  419. package/sdk/dist/protocols/pancakeswap-v2/abis.d.ts.map +1 -1
  420. package/sdk/dist/protocols/pancakeswap-v2/abis.js +43 -0
  421. package/sdk/dist/protocols/pancakeswap-v2/abis.js.map +1 -1
  422. package/sdk/dist/protocols/pancakeswap-v3/abis.d.ts +73 -0
  423. package/sdk/dist/protocols/pancakeswap-v3/abis.d.ts.map +1 -1
  424. package/sdk/dist/protocols/pancakeswap-v3/abis.js +56 -0
  425. package/sdk/dist/protocols/pancakeswap-v3/abis.js.map +1 -1
  426. package/sdk/dist/protocols/permit2/abis.d.ts +113 -0
  427. package/sdk/dist/protocols/permit2/abis.d.ts.map +1 -1
  428. package/sdk/dist/protocols/permit2/abis.js +63 -0
  429. package/sdk/dist/protocols/permit2/abis.js.map +1 -1
  430. package/sdk/dist/protocols/quickswap/abis.d.ts +148 -0
  431. package/sdk/dist/protocols/quickswap/abis.d.ts.map +1 -1
  432. package/sdk/dist/protocols/quickswap/abis.js +119 -0
  433. package/sdk/dist/protocols/quickswap/abis.js.map +1 -1
  434. package/sdk/dist/protocols/sushiswap-v2/abis.d.ts +52 -0
  435. package/sdk/dist/protocols/sushiswap-v2/abis.d.ts.map +1 -1
  436. package/sdk/dist/protocols/sushiswap-v2/abis.js +42 -0
  437. package/sdk/dist/protocols/sushiswap-v2/abis.js.map +1 -1
  438. package/sdk/dist/protocols/synthra-v3/abis.d.ts +73 -0
  439. package/sdk/dist/protocols/synthra-v3/abis.d.ts.map +1 -1
  440. package/sdk/dist/protocols/synthra-v3/abis.js +55 -0
  441. package/sdk/dist/protocols/synthra-v3/abis.js.map +1 -1
  442. package/sdk/dist/protocols/trader-joe/abis.d.ts +133 -0
  443. package/sdk/dist/protocols/trader-joe/abis.d.ts.map +1 -1
  444. package/sdk/dist/protocols/trader-joe/abis.js +101 -0
  445. package/sdk/dist/protocols/trader-joe/abis.js.map +1 -1
  446. package/sdk/dist/protocols/trader-joe/addresses.d.ts.map +1 -1
  447. package/sdk/dist/protocols/trader-joe/addresses.js +5 -0
  448. package/sdk/dist/protocols/trader-joe/addresses.js.map +1 -1
  449. package/sdk/dist/protocols/uniswap-v2/abis.d.ts +52 -0
  450. package/sdk/dist/protocols/uniswap-v2/abis.d.ts.map +1 -1
  451. package/sdk/dist/protocols/uniswap-v2/abis.js +44 -0
  452. package/sdk/dist/protocols/uniswap-v2/abis.js.map +1 -1
  453. package/sdk/dist/protocols/uniswap-v3/abis.d.ts +73 -0
  454. package/sdk/dist/protocols/uniswap-v3/abis.d.ts.map +1 -1
  455. package/sdk/dist/protocols/uniswap-v3/abis.js +55 -0
  456. package/sdk/dist/protocols/uniswap-v3/abis.js.map +1 -1
  457. package/sdk/dist/protocols/uniswap-v4/abis.d.ts +247 -0
  458. package/sdk/dist/protocols/uniswap-v4/abis.d.ts.map +1 -1
  459. package/sdk/dist/protocols/uniswap-v4/abis.js +167 -0
  460. package/sdk/dist/protocols/uniswap-v4/abis.js.map +1 -1
  461. package/sdk/dist/protocols/uniswap-v4/addresses.d.ts.map +1 -1
  462. package/sdk/dist/protocols/uniswap-v4/addresses.js +50 -0
  463. package/sdk/dist/protocols/uniswap-v4/addresses.js.map +1 -1
  464. package/sdk/dist/protocols/unitflow-v3/abis.d.ts +73 -0
  465. package/sdk/dist/protocols/unitflow-v3/abis.d.ts.map +1 -1
  466. package/sdk/dist/protocols/unitflow-v3/abis.js +56 -0
  467. package/sdk/dist/protocols/unitflow-v3/abis.js.map +1 -1
  468. package/sdk/dist/protocols/velodrome/abis.d.ts +76 -0
  469. package/sdk/dist/protocols/velodrome/abis.d.ts.map +1 -1
  470. package/sdk/dist/protocols/velodrome/abis.js +61 -0
  471. package/sdk/dist/protocols/velodrome/abis.js.map +1 -1
  472. package/sdk/dist/recipes/cctp-split.sauce.ts +2 -2
  473. package/sdk/dist/recipes/plain-transfer.sauce.ts +2 -2
  474. package/sdk/dist/routes/accessor-index.d.ts +2 -2
  475. package/sdk/dist/routes/accessor-index.d.ts.map +1 -1
  476. package/sdk/dist/routes/accessor-index.js +4 -3
  477. package/sdk/dist/routes/accessor-index.js.map +1 -1
  478. package/sdk/dist/routes/ambient.d.ts +5 -0
  479. package/sdk/dist/routes/ambient.d.ts.map +1 -1
  480. package/sdk/dist/routes/ambient.js +20 -0
  481. package/sdk/dist/routes/ambient.js.map +1 -1
  482. package/sdk/dist/routes/ast-walk.d.ts +17 -3
  483. package/sdk/dist/routes/ast-walk.d.ts.map +1 -1
  484. package/sdk/dist/routes/ast-walk.js +24 -2
  485. package/sdk/dist/routes/ast-walk.js.map +1 -1
  486. package/sdk/dist/routes/available.d.ts +43 -0
  487. package/sdk/dist/routes/available.d.ts.map +1 -0
  488. package/sdk/dist/routes/available.js +230 -0
  489. package/sdk/dist/routes/available.js.map +1 -0
  490. package/sdk/dist/routes/builtins.generated.d.ts +180 -0
  491. package/sdk/dist/routes/builtins.generated.d.ts.map +1 -0
  492. package/sdk/dist/routes/builtins.generated.js +2 -0
  493. package/sdk/dist/routes/builtins.generated.js.map +1 -0
  494. package/sdk/dist/routes/chain-exports.generated.d.ts +13 -8
  495. package/sdk/dist/routes/chain-exports.generated.d.ts.map +1 -1
  496. package/sdk/dist/routes/chain-exports.generated.js.map +1 -1
  497. package/sdk/dist/routes/closure.d.ts.map +1 -1
  498. package/sdk/dist/routes/closure.js +13 -26
  499. package/sdk/dist/routes/closure.js.map +1 -1
  500. package/sdk/dist/routes/composed.d.ts.map +1 -1
  501. package/sdk/dist/routes/composed.js +20 -8
  502. package/sdk/dist/routes/composed.js.map +1 -1
  503. package/sdk/dist/routes/encode.d.ts +17 -0
  504. package/sdk/dist/routes/encode.d.ts.map +1 -1
  505. package/sdk/dist/routes/encode.js +14 -11
  506. package/sdk/dist/routes/encode.js.map +1 -1
  507. package/sdk/dist/routes/entry.d.ts +76 -0
  508. package/sdk/dist/routes/entry.d.ts.map +1 -0
  509. package/sdk/dist/routes/entry.js +478 -0
  510. package/sdk/dist/routes/entry.js.map +1 -0
  511. package/sdk/dist/routes/index.d.ts +19 -12
  512. package/sdk/dist/routes/index.d.ts.map +1 -1
  513. package/sdk/dist/routes/index.js +11 -8
  514. package/sdk/dist/routes/index.js.map +1 -1
  515. package/sdk/dist/routes/intent-body.d.ts +97 -0
  516. package/sdk/dist/routes/intent-body.d.ts.map +1 -0
  517. package/sdk/dist/routes/intent-body.js +441 -0
  518. package/sdk/dist/routes/intent-body.js.map +1 -0
  519. package/sdk/dist/routes/intent-dsl.d.ts +21 -6
  520. package/sdk/dist/routes/intent-dsl.d.ts.map +1 -1
  521. package/sdk/dist/routes/intent-dsl.js +34 -17
  522. package/sdk/dist/routes/intent-dsl.js.map +1 -1
  523. package/sdk/dist/routes/intent-sugar.d.ts +77 -4
  524. package/sdk/dist/routes/intent-sugar.d.ts.map +1 -1
  525. package/sdk/dist/routes/intent-sugar.js +318 -129
  526. package/sdk/dist/routes/intent-sugar.js.map +1 -1
  527. package/sdk/dist/routes/intent.d.ts +13 -1
  528. package/sdk/dist/routes/intent.d.ts.map +1 -1
  529. package/sdk/dist/routes/intent.js +37 -1
  530. package/sdk/dist/routes/intent.js.map +1 -1
  531. package/sdk/dist/routes/nest.d.ts +3 -2
  532. package/sdk/dist/routes/nest.d.ts.map +1 -1
  533. package/sdk/dist/routes/nest.js +5 -3
  534. package/sdk/dist/routes/nest.js.map +1 -1
  535. package/sdk/dist/routes/parse.d.ts +6 -0
  536. package/sdk/dist/routes/parse.d.ts.map +1 -0
  537. package/sdk/dist/routes/parse.js +39 -0
  538. package/sdk/dist/routes/parse.js.map +1 -0
  539. package/sdk/dist/routes/portal.d.ts +258 -4
  540. package/sdk/dist/routes/portal.d.ts.map +1 -1
  541. package/sdk/dist/routes/portal.js +588 -9
  542. package/sdk/dist/routes/portal.js.map +1 -1
  543. package/sdk/dist/routes/protocol-rewrite.d.ts +71 -1
  544. package/sdk/dist/routes/protocol-rewrite.d.ts.map +1 -1
  545. package/sdk/dist/routes/protocol-rewrite.js +178 -54
  546. package/sdk/dist/routes/protocol-rewrite.js.map +1 -1
  547. package/sdk/dist/routes/rs-compile.d.ts +25 -22
  548. package/sdk/dist/routes/rs-compile.d.ts.map +1 -1
  549. package/sdk/dist/routes/rs-compile.js +55 -49
  550. package/sdk/dist/routes/rs-compile.js.map +1 -1
  551. package/sdk/dist/routes/sauce-calls.d.ts +26 -12
  552. package/sdk/dist/routes/sauce-calls.d.ts.map +1 -1
  553. package/sdk/dist/routes/sauce-calls.js +16 -23
  554. package/sdk/dist/routes/sauce-calls.js.map +1 -1
  555. package/sdk/dist/routes/sauce-route.d.ts +74 -7
  556. package/sdk/dist/routes/sauce-route.d.ts.map +1 -1
  557. package/sdk/dist/routes/sauce-route.js +225 -75
  558. package/sdk/dist/routes/sauce-route.js.map +1 -1
  559. package/sdk/dist/routes/source-globals.d.ts +107 -0
  560. package/sdk/dist/routes/source-globals.d.ts.map +1 -0
  561. package/sdk/dist/routes/source-globals.generated.d.ts +5523 -933
  562. package/sdk/dist/routes/source-globals.generated.d.ts.map +1 -1
  563. package/sdk/dist/routes/source-globals.generated.js +3 -4
  564. package/sdk/dist/routes/source-globals.generated.js.map +1 -1
  565. package/sdk/dist/routes/source-globals.js +174 -0
  566. package/sdk/dist/routes/source-globals.js.map +1 -0
  567. package/sdk/dist/routes/stock-tokens.d.ts +69 -0
  568. package/sdk/dist/routes/stock-tokens.d.ts.map +1 -0
  569. package/sdk/dist/routes/stock-tokens.generated.d.ts +4 -0
  570. package/sdk/dist/routes/stock-tokens.generated.d.ts.map +1 -0
  571. package/sdk/dist/routes/stock-tokens.generated.js +1836 -0
  572. package/sdk/dist/routes/stock-tokens.generated.js.map +1 -0
  573. package/sdk/dist/routes/stock-tokens.js +65 -0
  574. package/sdk/dist/routes/stock-tokens.js.map +1 -0
  575. package/sdk/dist/routes/token-registry.d.ts +64 -8
  576. package/sdk/dist/routes/token-registry.d.ts.map +1 -1
  577. package/sdk/dist/routes/token-registry.js +202 -32
  578. package/sdk/dist/routes/token-registry.js.map +1 -1
  579. package/sdk/dist/routes/token-rewrite.d.ts +1 -1
  580. package/sdk/dist/routes/token-rewrite.d.ts.map +1 -1
  581. package/sdk/dist/routes/token-rewrite.js +5 -9
  582. package/sdk/dist/routes/token-rewrite.js.map +1 -1
  583. package/sdk/dist/routes/unknown-global.d.ts +32 -0
  584. package/sdk/dist/routes/unknown-global.d.ts.map +1 -0
  585. package/sdk/dist/routes/unknown-global.js +106 -0
  586. package/sdk/dist/routes/unknown-global.js.map +1 -0
  587. package/sdk/dist/routes/vault.d.ts +38 -8
  588. package/sdk/dist/routes/vault.d.ts.map +1 -1
  589. package/sdk/dist/routes/vault.js +47 -8
  590. package/sdk/dist/routes/vault.js.map +1 -1
  591. package/sdk/dist/sauce-script/builtins.d.ts +309 -0
  592. package/sdk/dist/sauce-script/declarations.d.ts +3 -0
  593. package/sdk/dist/sauce-script/declarations.d.ts.map +1 -0
  594. package/sdk/dist/sauce-script/declarations.js +229 -0
  595. package/sdk/dist/sauce-script/declarations.js.map +1 -0
  596. package/sdk/dist/sauce-script/index.d.ts +2714 -0
  597. package/sdk/dist/sauce-script/ts-plugin.cjs +85 -0
  598. package/sdk/dist/skills/loader.d.ts.map +1 -1
  599. package/sdk/dist/skills/loader.js +4 -3
  600. package/sdk/dist/skills/loader.js.map +1 -1
  601. package/sdk/dist/std/router/balancer-v2-vault.abi.json +78 -0
  602. package/sdk/dist/std/router/curve-cryptoswap.abi.json +29 -0
  603. package/sdk/dist/std/router/curve-stableswap.abi.json +29 -0
  604. package/sdk/dist/std/router/dodo-v2-pool.abi.json +39 -0
  605. package/sdk/dist/std/router/lb-pair.abi.json +55 -0
  606. package/sdk/dist/std/router/package.json +7 -0
  607. package/sdk/dist/std/router/router.evm.js +567 -0
  608. package/sdk/dist/std/router/sauce-router.abi.json +202 -0
  609. package/sdk/dist/std/router/uniswap-v2-pair.abi.json +49 -0
  610. package/sdk/dist/std/router/woo-pp-v2.abi.json +42 -0
  611. package/sdk/dist/std/token/permit2.abi.json +226 -0
  612. package/sdk/dist/std/token/token.evm.js +73 -0
  613. package/sdk/dist/std/token/token.svm.js +194 -41
  614. package/sdk/dist/svm/client.d.ts +62 -15
  615. package/sdk/dist/svm/client.d.ts.map +1 -1
  616. package/sdk/dist/svm/client.js +103 -42
  617. package/sdk/dist/svm/client.js.map +1 -1
  618. package/sdk/dist/svm/engine.d.ts +66 -5
  619. package/sdk/dist/svm/engine.d.ts.map +1 -1
  620. package/sdk/dist/svm/engine.js +73 -5
  621. package/sdk/dist/svm/engine.js.map +1 -1
  622. package/sdk/dist/svm/index.d.ts +2 -0
  623. package/sdk/dist/svm/index.d.ts.map +1 -1
  624. package/sdk/dist/svm/index.js +2 -0
  625. package/sdk/dist/svm/index.js.map +1 -1
  626. package/sdk/dist/svm/instructions.d.ts +72 -1
  627. package/sdk/dist/svm/instructions.d.ts.map +1 -1
  628. package/sdk/dist/svm/instructions.js +81 -2
  629. package/sdk/dist/svm/instructions.js.map +1 -1
  630. package/sdk/dist/svm/kitchen.d.ts +20 -1
  631. package/sdk/dist/svm/kitchen.d.ts.map +1 -1
  632. package/sdk/dist/svm/kitchen.js +47 -1
  633. package/sdk/dist/svm/kitchen.js.map +1 -1
  634. package/sdk/dist/svm/portal.d.ts +250 -0
  635. package/sdk/dist/svm/portal.d.ts.map +1 -0
  636. package/sdk/dist/svm/portal.js +462 -0
  637. package/sdk/dist/svm/portal.js.map +1 -0
  638. package/sdk/dist/svm/send.d.ts +18 -2
  639. package/sdk/dist/svm/send.d.ts.map +1 -1
  640. package/sdk/dist/svm/send.js +28 -3
  641. package/sdk/dist/svm/send.js.map +1 -1
  642. package/sdk/dist/svm/token-accounts.d.ts +49 -0
  643. package/sdk/dist/svm/token-accounts.d.ts.map +1 -0
  644. package/sdk/dist/svm/token-accounts.js +58 -0
  645. package/sdk/dist/svm/token-accounts.js.map +1 -0
  646. package/sdk/dist/svm/token-extensions.d.ts +18 -7
  647. package/sdk/dist/svm/token-extensions.d.ts.map +1 -1
  648. package/sdk/dist/svm/token-extensions.js +58 -5
  649. package/sdk/dist/svm/token-extensions.js.map +1 -1
  650. package/sdk/dist/token/evm.js +1 -1
  651. package/sdk/dist/token/index.d.ts +1 -1
  652. package/sdk/dist/token/index.js +1 -1
  653. package/sdk/dist/token/params.js +1 -1
  654. package/sdk/dist/token/source.js +3 -3
  655. package/sdk/dist/token/source.js.map +1 -1
  656. package/sdk/dist/token/types.d.ts +2 -2
  657. package/sdk/dist/token/types.js +2 -2
  658. package/sdk/src/protocols/aerodrome/AerodromePoolABI.json +105 -0
  659. package/sdk/src/protocols/aerodrome/abis.ts +62 -0
  660. package/sdk/src/protocols/aerodrome-slipstream/AerodromeSlipstreamPoolABI.json +96 -0
  661. package/sdk/src/protocols/aerodrome-slipstream/abis.ts +55 -0
  662. package/sdk/src/protocols/camelot/CamelotV2FactoryABI.json +25 -0
  663. package/sdk/src/protocols/camelot/CamelotV2PairABI.json +109 -0
  664. package/sdk/src/protocols/camelot/CamelotV3FactoryABI.json +25 -0
  665. package/sdk/src/protocols/camelot/CamelotV3PoolABI.json +92 -0
  666. package/sdk/src/protocols/camelot/abis.ts +143 -0
  667. package/sdk/src/protocols/eco-routes/PortalABI.json +1448 -0
  668. package/sdk/src/protocols/eco-routes/ProverABI.json +162 -0
  669. package/sdk/src/protocols/eco-routes/abis.ts +1060 -51
  670. package/sdk/src/protocols/eco-routes/addresses.generated.ts +45 -62
  671. package/sdk/src/protocols/eco-routes/lookup.ts +18 -0
  672. package/sdk/src/protocols/maverick/MaverickV2PoolABI.json +107 -0
  673. package/sdk/src/protocols/maverick/abis.ts +59 -0
  674. package/sdk/src/protocols/maverick/addresses.ts +4 -0
  675. package/sdk/src/protocols/pancakeswap-v2/PancakeSwapV2PairABI.json +72 -0
  676. package/sdk/src/protocols/pancakeswap-v2/abis.ts +44 -0
  677. package/sdk/src/protocols/pancakeswap-v3/PancakeSwapV3PoolABI.json +100 -0
  678. package/sdk/src/protocols/pancakeswap-v3/abis.ts +57 -0
  679. package/sdk/src/protocols/permit2/Permit2ABI.json +154 -0
  680. package/sdk/src/protocols/permit2/abis.ts +63 -0
  681. package/sdk/src/protocols/quickswap/QuickSwapV2FactoryABI.json +25 -0
  682. package/sdk/src/protocols/quickswap/QuickSwapV2PairABI.json +72 -0
  683. package/sdk/src/protocols/quickswap/QuickSwapV3FactoryABI.json +25 -0
  684. package/sdk/src/protocols/quickswap/QuickSwapV3PoolABI.json +88 -0
  685. package/sdk/src/protocols/quickswap/abis.ts +123 -0
  686. package/sdk/src/protocols/sushiswap-v2/SushiSwapV2PairABI.json +72 -0
  687. package/sdk/src/protocols/sushiswap-v2/abis.ts +43 -0
  688. package/sdk/src/protocols/synthra-v3/SynthraV3PoolABI.json +100 -0
  689. package/sdk/src/protocols/synthra-v3/abis.ts +56 -0
  690. package/sdk/src/protocols/trader-joe/LBPairABI.json +185 -0
  691. package/sdk/src/protocols/trader-joe/abis.ts +102 -0
  692. package/sdk/src/protocols/trader-joe/addresses.ts +5 -0
  693. package/sdk/src/protocols/uniswap-v2/UniswapV2PairABI.json +72 -0
  694. package/sdk/src/protocols/uniswap-v2/abis.ts +45 -0
  695. package/sdk/src/protocols/uniswap-v3/UniswapV3PoolABI.json +100 -0
  696. package/sdk/src/protocols/uniswap-v3/abis.ts +56 -0
  697. package/sdk/src/protocols/uniswap-v4/UniswapV4PoolManagerABI.json +38 -0
  698. package/sdk/src/protocols/uniswap-v4/UniswapV4StateViewABI.json +307 -0
  699. package/sdk/src/protocols/uniswap-v4/abis.ts +168 -0
  700. package/sdk/src/protocols/uniswap-v4/addresses.ts +50 -0
  701. package/sdk/src/protocols/unitflow-v3/UnitFlowV3PoolABI.json +100 -0
  702. package/sdk/src/protocols/unitflow-v3/abis.ts +57 -0
  703. package/sdk/src/protocols/velodrome/VelodromePoolABI.json +105 -0
  704. package/sdk/src/protocols/velodrome/abis.ts +62 -0
  705. package/skills/sauce-actions/SKILL.md +166 -0
  706. package/skills/sauce-actions/examples/swap-and-supply.json +24 -0
  707. package/skills/sauce-actions/examples/swap-by-key.json +15 -0
  708. package/skills/sauce-actions/references/actions.md +731 -0
  709. package/skills/sauce-chains/SKILL.md +137 -0
  710. package/skills/sauce-chains/examples/chains.sauce.ts +25 -0
  711. package/skills/sauce-chains/references/arbitrum.md +158 -0
  712. package/skills/sauce-chains/references/arc.md +107 -0
  713. package/skills/sauce-chains/references/aurora.md +33 -0
  714. package/skills/sauce-chains/references/avalanche.md +106 -0
  715. package/skills/sauce-chains/references/base-stocks.md +77 -0
  716. package/skills/sauce-chains/references/base.md +141 -0
  717. package/skills/sauce-chains/references/berachain.md +33 -0
  718. package/skills/sauce-chains/references/blast.md +60 -0
  719. package/skills/sauce-chains/references/boba.md +33 -0
  720. package/skills/sauce-chains/references/bsc.md +97 -0
  721. package/skills/sauce-chains/references/celo.md +57 -0
  722. package/skills/sauce-chains/references/core.md +33 -0
  723. package/skills/sauce-chains/references/cronos.md +33 -0
  724. package/skills/sauce-chains/references/ethereum-stocks.md +1741 -0
  725. package/skills/sauce-chains/references/ethereum.md +255 -0
  726. package/skills/sauce-chains/references/evmos.md +33 -0
  727. package/skills/sauce-chains/references/fantom.md +61 -0
  728. package/skills/sauce-chains/references/fuse.md +33 -0
  729. package/skills/sauce-chains/references/gnosis.md +57 -0
  730. package/skills/sauce-chains/references/index.md +58 -0
  731. package/skills/sauce-chains/references/ink.md +55 -0
  732. package/skills/sauce-chains/references/kava.md +33 -0
  733. package/skills/sauce-chains/references/klaytn.md +33 -0
  734. package/skills/sauce-chains/references/linea.md +65 -0
  735. package/skills/sauce-chains/references/manta.md +33 -0
  736. package/skills/sauce-chains/references/mantle.md +33 -0
  737. package/skills/sauce-chains/references/metis.md +54 -0
  738. package/skills/sauce-chains/references/mode.md +55 -0
  739. package/skills/sauce-chains/references/monad.md +79 -0
  740. package/skills/sauce-chains/references/moonbeam.md +33 -0
  741. package/skills/sauce-chains/references/opbnb.md +55 -0
  742. package/skills/sauce-chains/references/optimism.md +123 -0
  743. package/skills/sauce-chains/references/plasma.md +35 -0
  744. package/skills/sauce-chains/references/polygon.md +123 -0
  745. package/skills/sauce-chains/references/pulsechain.md +33 -0
  746. package/skills/sauce-chains/references/ronin.md +35 -0
  747. package/skills/sauce-chains/references/scroll.md +62 -0
  748. package/skills/sauce-chains/references/sei.md +55 -0
  749. package/skills/sauce-chains/references/solana.md +53 -0
  750. package/skills/sauce-chains/references/sonic.md +57 -0
  751. package/skills/sauce-chains/references/unichain.md +61 -0
  752. package/skills/sauce-chains/references/zetachain.md +33 -0
  753. package/skills/sauce-chains/references/zksync.md +59 -0
  754. package/skills/sauce-chains/references/zora.md +57 -0
  755. package/skills/sauce-cli/SKILL.md +366 -0
  756. package/skills/sauce-cli/examples/pay.sauce.ts +23 -0
  757. package/skills/sauce-cli/examples/split.sauce.ts +30 -0
  758. package/skills/sauce-distributed-swap/SKILL.md +392 -0
  759. package/skills/sauce-distributed-swap/examples/distributed-swap.mts +251 -0
  760. package/skills/sauce-distributed-swap/examples/distributed-swap.sauce.ts +115 -0
  761. package/skills/sauce-examples/SKILL.md +96 -0
  762. package/skills/sauce-globals/SKILL.md +175 -0
  763. package/skills/sauce-globals/examples/globals.mts +111 -0
  764. package/skills/sauce-globals/examples/globals.sauce.ts +47 -0
  765. package/skills/sauce-globals/references/chains.md +53 -0
  766. package/skills/sauce-globals/references/protocols.md +405 -0
  767. package/skills/sauce-globals/references/stocks.md +1824 -0
  768. package/skills/sauce-globals/references/tokens.md +53 -0
  769. package/skills/sauce-intents/SKILL.md +505 -0
  770. package/skills/sauce-intents/examples/cross-chain.sauce.ts +37 -0
  771. package/skills/sauce-intents/examples/fund-by-transfer.sauce.ts +54 -0
  772. package/skills/sauce-intents/examples/intents.mts +343 -0
  773. package/skills/sauce-intents/examples/swap-on-base.sauce.ts +135 -0
  774. package/skills/sauce-intents/references/portal.md +77 -0
  775. package/skills/sauce-overview/SKILL.md +161 -0
  776. package/skills/sauce-protocols/SKILL.md +118 -0
  777. package/skills/sauce-protocols/examples/protocols.mts +77 -0
  778. package/skills/sauce-protocols/examples/protocols.sauce.ts +27 -0
  779. package/{sdk/src/skills → skills/sauce-protocols/references}/aave-v2.md +35 -17
  780. package/skills/sauce-protocols/references/aave-v3.md +144 -0
  781. package/skills/sauce-protocols/references/aave-v4.md +50 -0
  782. package/skills/sauce-protocols/references/abracadabra.md +72 -0
  783. package/skills/sauce-protocols/references/across.md +73 -0
  784. package/skills/sauce-protocols/references/aerodrome-slipstream.md +50 -0
  785. package/{sdk/src/skills → skills/sauce-protocols/references}/aerodrome.md +43 -24
  786. package/skills/sauce-protocols/references/aevo.md +49 -0
  787. package/{sdk/src/skills → skills/sauce-protocols/references}/alchemix.md +10 -25
  788. package/{sdk/src/skills → skills/sauce-protocols/references}/ambient.md +14 -21
  789. package/{sdk/src/skills → skills/sauce-protocols/references}/arbitrum-bridge.md +11 -14
  790. package/{sdk/src/skills → skills/sauce-protocols/references}/arrakis.md +10 -26
  791. package/skills/sauce-protocols/references/axelar.md +56 -0
  792. package/{sdk/src/skills → skills/sauce-protocols/references}/balancer-v2.md +13 -29
  793. package/{sdk/src/skills → skills/sauce-protocols/references}/base-bridge.md +11 -16
  794. package/{sdk/src/skills → skills/sauce-protocols/references}/baseswap.md +12 -19
  795. package/{sdk/src/skills → skills/sauce-protocols/references}/beefy.md +10 -30
  796. package/{sdk/src/skills → skills/sauce-protocols/references}/benqi.md +11 -21
  797. package/{sdk/src/skills → skills/sauce-protocols/references}/camelot.md +13 -27
  798. package/{sdk/src/skills → skills/sauce-protocols/references}/cbeth.md +10 -22
  799. package/skills/sauce-protocols/references/cctp.md +47 -0
  800. package/{sdk/src/skills → skills/sauce-protocols/references}/celer.md +11 -18
  801. package/{sdk/src/skills → skills/sauce-protocols/references}/chainlink-ccip.md +11 -21
  802. package/skills/sauce-protocols/references/chainlink.md +47 -0
  803. package/{sdk/src/skills → skills/sauce-protocols/references}/circle-gateway.md +12 -38
  804. package/{sdk/src/skills → skills/sauce-protocols/references}/compound-v2.md +11 -25
  805. package/{sdk/src/skills → skills/sauce-protocols/references}/compound-v3.md +43 -27
  806. package/{sdk/src/skills → skills/sauce-protocols/references}/connext.md +11 -15
  807. package/{sdk/src/skills → skills/sauce-protocols/references}/convex.md +10 -28
  808. package/{sdk/src/skills → skills/sauce-protocols/references}/cowswap.md +12 -19
  809. package/{sdk/src/skills → skills/sauce-protocols/references}/crvusd.md +10 -19
  810. package/skills/sauce-protocols/references/curve.md +98 -0
  811. package/{sdk/src/skills → skills/sauce-protocols/references}/debridge.md +11 -33
  812. package/{sdk/src/skills → skills/sauce-protocols/references}/dodo.md +13 -18
  813. package/skills/sauce-protocols/references/eigenlayer.md +48 -0
  814. package/{sdk/src/skills → skills/sauce-protocols/references}/ens.md +10 -26
  815. package/{sdk/src/skills → skills/sauce-protocols/references}/erc20.md +10 -24
  816. package/{sdk/src/skills → skills/sauce-protocols/references}/erc3156.md +10 -13
  817. package/{sdk/src/skills → skills/sauce-protocols/references}/erc4626.md +11 -27
  818. package/{sdk/src/skills → skills/sauce-protocols/references}/ethena.md +10 -27
  819. package/{sdk/src/skills → skills/sauce-protocols/references}/etherfi.md +10 -32
  820. package/{sdk/src/skills → skills/sauce-protocols/references}/euler-v2.md +11 -21
  821. package/{sdk/src/skills → skills/sauce-protocols/references}/fenix.md +12 -18
  822. package/{sdk/src/skills → skills/sauce-protocols/references}/fluid.md +11 -20
  823. package/{sdk/src/skills → skills/sauce-protocols/references}/frax-ether.md +10 -26
  824. package/{sdk/src/skills → skills/sauce-protocols/references}/frax.md +10 -19
  825. package/{sdk/src/skills → skills/sauce-protocols/references}/gains-network.md +11 -28
  826. package/skills/sauce-protocols/references/gamma.md +57 -0
  827. package/{sdk/src/skills → skills/sauce-protocols/references}/gelato.md +12 -20
  828. package/{sdk/src/skills → skills/sauce-protocols/references}/gho.md +10 -19
  829. package/{sdk/src/skills → skills/sauce-protocols/references}/gmx-v1.md +12 -34
  830. package/{sdk/src/skills → skills/sauce-protocols/references}/gmx-v2.md +15 -28
  831. package/skills/sauce-protocols/references/harvest.md +41 -0
  832. package/{sdk/src/skills → skills/sauce-protocols/references}/hegic.md +10 -18
  833. package/{sdk/src/skills → skills/sauce-protocols/references}/hop.md +11 -21
  834. package/{sdk/src/skills → skills/sauce-protocols/references}/hyperlane.md +11 -21
  835. package/skills/sauce-protocols/references/index.md +355 -0
  836. package/{sdk/src/skills → skills/sauce-protocols/references}/instadapp.md +10 -18
  837. package/skills/sauce-protocols/references/kelp.md +46 -0
  838. package/{sdk/src/skills → skills/sauce-protocols/references}/kim.md +12 -18
  839. package/{sdk/src/skills → skills/sauce-protocols/references}/kyberswap-aggregator.md +12 -35
  840. package/skills/sauce-protocols/references/kyberswap.md +72 -0
  841. package/{sdk/src/skills → skills/sauce-protocols/references}/layerbank.md +11 -26
  842. package/{sdk/src/skills → skills/sauce-protocols/references}/layerzero.md +11 -25
  843. package/{sdk/src/skills → skills/sauce-protocols/references}/level-finance.md +10 -24
  844. package/{sdk/src/skills → skills/sauce-protocols/references}/lido.md +10 -28
  845. package/{sdk/src/skills → skills/sauce-protocols/references}/lifi.md +11 -25
  846. package/{sdk/src/skills → skills/sauce-protocols/references}/linea-bridge.md +11 -14
  847. package/{sdk/src/skills → skills/sauce-protocols/references}/liquity-v1.md +10 -21
  848. package/{sdk/src/skills → skills/sauce-protocols/references}/liquity-v2.md +10 -19
  849. package/{sdk/src/skills → skills/sauce-protocols/references}/lynex.md +12 -18
  850. package/skills/sauce-protocols/references/maker.md +57 -0
  851. package/skills/sauce-protocols/references/mantle-meth.md +43 -0
  852. package/{sdk/src/skills → skills/sauce-protocols/references}/maverick.md +13 -25
  853. package/{sdk/src/skills → skills/sauce-protocols/references}/moonwell.md +11 -21
  854. package/{sdk/src/skills → skills/sauce-protocols/references}/morpho-blue.md +44 -21
  855. package/{sdk/src/skills → skills/sauce-protocols/references}/mux-protocol.md +10 -30
  856. package/skills/sauce-protocols/references/olympus.md +39 -0
  857. package/skills/sauce-protocols/references/oneinch.md +81 -0
  858. package/skills/sauce-protocols/references/openocean.md +69 -0
  859. package/{sdk/src/skills → skills/sauce-protocols/references}/optimism-bridge.md +11 -16
  860. package/{sdk/src/skills → skills/sauce-protocols/references}/opyn.md +10 -21
  861. package/{sdk/src/skills → skills/sauce-protocols/references}/pancakeswap-v2.md +39 -41
  862. package/skills/sauce-protocols/references/pancakeswap-v3.md +72 -0
  863. package/skills/sauce-protocols/references/paraswap.md +39 -0
  864. package/{sdk/src/skills → skills/sauce-protocols/references}/pendle.md +47 -29
  865. package/skills/sauce-protocols/references/permit2.md +101 -0
  866. package/skills/sauce-protocols/references/perpetual-protocol.md +53 -0
  867. package/{sdk/src/skills → skills/sauce-protocols/references}/polygon-bridge.md +11 -17
  868. package/{sdk/src/skills → skills/sauce-protocols/references}/premia.md +10 -19
  869. package/{sdk/src/skills → skills/sauce-protocols/references}/puffer.md +10 -21
  870. package/skills/sauce-protocols/references/pyth.md +45 -0
  871. package/{sdk/src/skills → skills/sauce-protocols/references}/quickswap.md +13 -27
  872. package/{sdk/src/skills → skills/sauce-protocols/references}/radiant.md +11 -15
  873. package/{sdk/src/skills → skills/sauce-protocols/references}/ramses.md +12 -18
  874. package/skills/sauce-protocols/references/reflexer.md +52 -0
  875. package/skills/sauce-protocols/references/registry/aave-v2.md +43 -0
  876. package/skills/sauce-protocols/references/registry/aave-v3.md +62 -0
  877. package/skills/sauce-protocols/references/registry/aave-v4.md +80 -0
  878. package/skills/sauce-protocols/references/registry/abracadabra.md +54 -0
  879. package/skills/sauce-protocols/references/registry/across.md +57 -0
  880. package/skills/sauce-protocols/references/registry/aerodrome-slipstream.md +72 -0
  881. package/skills/sauce-protocols/references/registry/aerodrome.md +58 -0
  882. package/skills/sauce-protocols/references/registry/aevo.md +39 -0
  883. package/skills/sauce-protocols/references/registry/alchemix.md +46 -0
  884. package/skills/sauce-protocols/references/registry/ambient.md +40 -0
  885. package/skills/sauce-protocols/references/registry/arbitrum-bridge.md +40 -0
  886. package/skills/sauce-protocols/references/registry/arrakis.md +49 -0
  887. package/skills/sauce-protocols/references/registry/axelar.md +65 -0
  888. package/skills/sauce-protocols/references/registry/balancer-v2.md +50 -0
  889. package/skills/sauce-protocols/references/registry/base-bridge.md +42 -0
  890. package/skills/sauce-protocols/references/registry/baseswap.md +40 -0
  891. package/skills/sauce-protocols/references/registry/beefy.md +51 -0
  892. package/skills/sauce-protocols/references/registry/benqi.md +49 -0
  893. package/skills/sauce-protocols/references/registry/camelot.md +82 -0
  894. package/skills/sauce-protocols/references/registry/cbeth.md +43 -0
  895. package/skills/sauce-protocols/references/registry/cctp.md +48 -0
  896. package/skills/sauce-protocols/references/registry/celer.md +44 -0
  897. package/skills/sauce-protocols/references/registry/chainlink-ccip.md +45 -0
  898. package/skills/sauce-protocols/references/registry/chainlink.md +49 -0
  899. package/skills/sauce-protocols/references/registry/circle-gateway.md +70 -0
  900. package/skills/sauce-protocols/references/registry/compound-v2.md +53 -0
  901. package/skills/sauce-protocols/references/registry/compound-v3.md +52 -0
  902. package/skills/sauce-protocols/references/registry/connext.md +41 -0
  903. package/skills/sauce-protocols/references/registry/convex.md +51 -0
  904. package/skills/sauce-protocols/references/registry/cowswap.md +40 -0
  905. package/skills/sauce-protocols/references/registry/crvusd.md +40 -0
  906. package/skills/sauce-protocols/references/registry/curve.md +81 -0
  907. package/skills/sauce-protocols/references/registry/debridge.md +59 -0
  908. package/skills/sauce-protocols/references/registry/dodo.md +39 -0
  909. package/skills/sauce-protocols/references/registry/eco-routes.md +65 -0
  910. package/skills/sauce-protocols/references/registry/eigenlayer.md +58 -0
  911. package/skills/sauce-protocols/references/registry/ens.md +49 -0
  912. package/skills/sauce-protocols/references/registry/erc20.md +44 -0
  913. package/skills/sauce-protocols/references/registry/erc3156.md +38 -0
  914. package/skills/sauce-protocols/references/registry/erc4626.md +51 -0
  915. package/skills/sauce-protocols/references/registry/ethena.md +50 -0
  916. package/skills/sauce-protocols/references/registry/etherfi.md +57 -0
  917. package/skills/sauce-protocols/references/registry/euler-v2.md +49 -0
  918. package/skills/sauce-protocols/references/registry/fenix.md +39 -0
  919. package/skills/sauce-protocols/references/registry/fluid.md +48 -0
  920. package/skills/sauce-protocols/references/registry/frax-ether.md +49 -0
  921. package/skills/sauce-protocols/references/registry/frax.md +40 -0
  922. package/skills/sauce-protocols/references/registry/gains-network.md +43 -0
  923. package/skills/sauce-protocols/references/registry/gamma.md +56 -0
  924. package/skills/sauce-protocols/references/registry/gelato.md +45 -0
  925. package/skills/sauce-protocols/references/registry/gho.md +40 -0
  926. package/skills/sauce-protocols/references/registry/gmx-v1.md +59 -0
  927. package/skills/sauce-protocols/references/registry/gmx-v2.md +41 -0
  928. package/skills/sauce-protocols/references/registry/harvest.md +44 -0
  929. package/skills/sauce-protocols/references/registry/hegic.md +39 -0
  930. package/skills/sauce-protocols/references/registry/hop.md +49 -0
  931. package/skills/sauce-protocols/references/registry/hyperlane.md +48 -0
  932. package/skills/sauce-protocols/references/registry/instadapp.md +39 -0
  933. package/skills/sauce-protocols/references/registry/kelp.md +47 -0
  934. package/skills/sauce-protocols/references/registry/kim.md +39 -0
  935. package/skills/sauce-protocols/references/registry/kyberswap-aggregator.md +49 -0
  936. package/skills/sauce-protocols/references/registry/kyberswap.md +63 -0
  937. package/skills/sauce-protocols/references/registry/layerbank.md +54 -0
  938. package/skills/sauce-protocols/references/registry/layerzero.md +49 -0
  939. package/skills/sauce-protocols/references/registry/level-finance.md +41 -0
  940. package/skills/sauce-protocols/references/registry/lido.md +51 -0
  941. package/skills/sauce-protocols/references/registry/lifi.md +48 -0
  942. package/skills/sauce-protocols/references/registry/linea-bridge.md +40 -0
  943. package/skills/sauce-protocols/references/registry/liquity-v1.md +42 -0
  944. package/skills/sauce-protocols/references/registry/liquity-v2.md +40 -0
  945. package/skills/sauce-protocols/references/registry/lynex.md +39 -0
  946. package/skills/sauce-protocols/references/registry/maker.md +55 -0
  947. package/skills/sauce-protocols/references/registry/mantle-meth.md +48 -0
  948. package/skills/sauce-protocols/references/registry/maverick.md +60 -0
  949. package/skills/sauce-protocols/references/registry/moonwell.md +49 -0
  950. package/skills/sauce-protocols/references/registry/morpho-blue.md +47 -0
  951. package/skills/sauce-protocols/references/registry/mux-protocol.md +49 -0
  952. package/skills/sauce-protocols/references/registry/olympus.md +42 -0
  953. package/skills/sauce-protocols/references/registry/oneinch.md +45 -0
  954. package/skills/sauce-protocols/references/registry/openocean.md +44 -0
  955. package/skills/sauce-protocols/references/registry/optimism-bridge.md +42 -0
  956. package/skills/sauce-protocols/references/registry/opyn.md +42 -0
  957. package/skills/sauce-protocols/references/registry/pancakeswap-v2.md +71 -0
  958. package/skills/sauce-protocols/references/registry/pancakeswap-v3.md +76 -0
  959. package/skills/sauce-protocols/references/registry/paraswap.md +51 -0
  960. package/skills/sauce-protocols/references/registry/pendle.md +43 -0
  961. package/skills/sauce-protocols/references/registry/permit2.md +50 -0
  962. package/skills/sauce-protocols/references/registry/perpetual-protocol.md +49 -0
  963. package/skills/sauce-protocols/references/registry/polygon-bridge.md +43 -0
  964. package/skills/sauce-protocols/references/registry/premia.md +40 -0
  965. package/skills/sauce-protocols/references/registry/puffer.md +43 -0
  966. package/skills/sauce-protocols/references/registry/pyth.md +40 -0
  967. package/skills/sauce-protocols/references/registry/quickswap.md +80 -0
  968. package/skills/sauce-protocols/references/registry/radiant.md +41 -0
  969. package/skills/sauce-protocols/references/registry/ramses.md +39 -0
  970. package/skills/sauce-protocols/references/registry/reflexer.md +56 -0
  971. package/skills/sauce-protocols/references/registry/renzo.md +47 -0
  972. package/skills/sauce-protocols/references/registry/rocket-pool.md +49 -0
  973. package/skills/sauce-protocols/references/registry/sablier.md +40 -0
  974. package/skills/sauce-protocols/references/registry/safe.md +47 -0
  975. package/skills/sauce-protocols/references/registry/scroll-bridge.md +48 -0
  976. package/skills/sauce-protocols/references/registry/seamless.md +42 -0
  977. package/skills/sauce-protocols/references/registry/seaport.md +44 -0
  978. package/skills/sauce-protocols/references/registry/silo.md +48 -0
  979. package/skills/sauce-protocols/references/registry/socket.md +44 -0
  980. package/skills/sauce-protocols/references/registry/sommelier.md +43 -0
  981. package/skills/sauce-protocols/references/registry/spark.md +42 -0
  982. package/skills/sauce-protocols/references/registry/spookyswap.md +40 -0
  983. package/skills/sauce-protocols/references/registry/squid.md +45 -0
  984. package/skills/sauce-protocols/references/registry/stader.md +47 -0
  985. package/skills/sauce-protocols/references/registry/stargate.md +45 -0
  986. package/skills/sauce-protocols/references/registry/superfluid.md +49 -0
  987. package/skills/sauce-protocols/references/registry/sushiswap-v2.md +71 -0
  988. package/skills/sauce-protocols/references/registry/swell.md +49 -0
  989. package/skills/sauce-protocols/references/registry/synapse.md +46 -0
  990. package/skills/sauce-protocols/references/registry/syncswap.md +38 -0
  991. package/skills/sauce-protocols/references/registry/synthetix-v3.md +48 -0
  992. package/skills/sauce-protocols/references/registry/synthra-v3.md +77 -0
  993. package/skills/sauce-protocols/references/registry/thales.md +51 -0
  994. package/skills/sauce-protocols/references/registry/thena.md +39 -0
  995. package/skills/sauce-protocols/references/registry/thruster.md +38 -0
  996. package/skills/sauce-protocols/references/registry/tokemak.md +45 -0
  997. package/skills/sauce-protocols/references/registry/trader-joe.md +66 -0
  998. package/skills/sauce-protocols/references/registry/uniswap-v2.md +77 -0
  999. package/skills/sauce-protocols/references/registry/uniswap-v3.md +113 -0
  1000. package/skills/sauce-protocols/references/registry/uniswap-v4.md +117 -0
  1001. package/skills/sauce-protocols/references/registry/unitflow-v3.md +65 -0
  1002. package/skills/sauce-protocols/references/registry/velodrome.md +58 -0
  1003. package/skills/sauce-protocols/references/registry/venus.md +62 -0
  1004. package/skills/sauce-protocols/references/registry/vertex.md +46 -0
  1005. package/skills/sauce-protocols/references/registry/wormhole.md +59 -0
  1006. package/skills/sauce-protocols/references/registry/yearn-v3.md +46 -0
  1007. package/skills/sauce-protocols/references/registry/zerolend.md +41 -0
  1008. package/skills/sauce-protocols/references/registry/zerox.md +44 -0
  1009. package/skills/sauce-protocols/references/registry/zksync-bridge.md +40 -0
  1010. package/{sdk/src/skills → skills/sauce-protocols/references}/renzo.md +10 -24
  1011. package/{sdk/src/skills → skills/sauce-protocols/references}/rocket-pool.md +10 -26
  1012. package/{sdk/src/skills → skills/sauce-protocols/references}/sablier.md +10 -27
  1013. package/skills/sauce-protocols/references/safe.md +42 -0
  1014. package/{sdk/src/skills → skills/sauce-protocols/references}/scroll-bridge.md +11 -20
  1015. package/{sdk/src/skills → skills/sauce-protocols/references}/seamless.md +11 -16
  1016. package/skills/sauce-protocols/references/seaport.md +38 -0
  1017. package/{sdk/src/skills → skills/sauce-protocols/references}/silo.md +11 -20
  1018. package/{sdk/src/skills → skills/sauce-protocols/references}/socket.md +11 -18
  1019. package/skills/sauce-protocols/references/sommelier.md +40 -0
  1020. package/{sdk/src/skills → skills/sauce-protocols/references}/spark.md +11 -16
  1021. package/{sdk/src/skills → skills/sauce-protocols/references}/spookyswap.md +12 -19
  1022. package/{sdk/src/skills → skills/sauce-protocols/references}/squid.md +11 -21
  1023. package/skills/sauce-protocols/references/stader.md +39 -0
  1024. package/{sdk/src/skills → skills/sauce-protocols/references}/stargate.md +11 -22
  1025. package/{sdk/src/skills → skills/sauce-protocols/references}/superfluid.md +10 -28
  1026. package/{sdk/src/skills → skills/sauce-protocols/references}/sushiswap-v2.md +38 -43
  1027. package/skills/sauce-protocols/references/swell.md +49 -0
  1028. package/skills/sauce-protocols/references/synapse.md +54 -0
  1029. package/{sdk/src/skills → skills/sauce-protocols/references}/syncswap.md +12 -17
  1030. package/{sdk/src/skills → skills/sauce-protocols/references}/synthetix-v3.md +10 -29
  1031. package/skills/sauce-protocols/references/synthra-v3.md +63 -0
  1032. package/skills/sauce-protocols/references/thales.md +58 -0
  1033. package/{sdk/src/skills → skills/sauce-protocols/references}/thena.md +12 -18
  1034. package/{sdk/src/skills → skills/sauce-protocols/references}/thruster.md +13 -18
  1035. package/skills/sauce-protocols/references/tokemak.md +40 -0
  1036. package/{sdk/src/skills → skills/sauce-protocols/references}/trader-joe.md +13 -26
  1037. package/{sdk/src/skills → skills/sauce-protocols/references}/uniswap-v2.md +46 -44
  1038. package/skills/sauce-protocols/references/uniswap-v3.md +188 -0
  1039. package/skills/sauce-protocols/references/uniswap-v4.md +155 -0
  1040. package/skills/sauce-protocols/references/unitflow-v3.md +63 -0
  1041. package/{sdk/src/skills → skills/sauce-protocols/references}/velodrome.md +12 -24
  1042. package/{sdk/src/skills → skills/sauce-protocols/references}/venus.md +12 -31
  1043. package/skills/sauce-protocols/references/vertex.md +42 -0
  1044. package/skills/sauce-protocols/references/wormhole.md +57 -0
  1045. package/{sdk/src/skills → skills/sauce-protocols/references}/yearn-v3.md +10 -25
  1046. package/{sdk/src/skills → skills/sauce-protocols/references}/zerolend.md +11 -15
  1047. package/skills/sauce-protocols/references/zerox.md +39 -0
  1048. package/{sdk/src/skills → skills/sauce-protocols/references}/zksync-bridge.md +11 -14
  1049. package/skills/sauce-script/SKILL.md +407 -0
  1050. package/skills/sauce-script/examples/IOracle.json +12 -0
  1051. package/skills/sauce-script/examples/saucescript.mts +167 -0
  1052. package/skills/sauce-script/examples/twap.sauce.ts +29 -0
  1053. package/skills/sauce-script/references/builtins.json +823 -0
  1054. package/skills/sauce-script/references/builtins.md +674 -0
  1055. package/skills/sauce-solana/SKILL.md +322 -0
  1056. package/skills/sauce-solana/examples/solana.mts +166 -0
  1057. package/skills/sauce-solana/examples/solana.sauce.ts +45 -0
  1058. package/skills/sauce-solana/examples/token-2022.sauce.ts +38 -0
  1059. package/skills/sauce-swaps/SKILL.md +200 -0
  1060. package/skills/sauce-swaps/examples/swap-leg.sauce.ts +50 -0
  1061. package/skills/sauce-swaps/examples/swaps.mts +124 -0
  1062. package/skills/sauce-typescript/SKILL.md +178 -0
  1063. package/skills/sauce-typescript/examples/actions.mts +100 -0
  1064. package/skills/sauce-typescript/examples/compiler.mts +69 -0
  1065. package/skills/sauce-typescript/examples/cook.mts +65 -0
  1066. package/skills/sauce-typescript/examples/verify.mts +104 -0
  1067. package/dev-tools/README.md +0 -16
  1068. package/dev-tools/artifacts/IERC20.json +0 -1
  1069. package/dev-tools/artifacts/ISauceRouter.json +0 -1
  1070. package/dev-tools/artifacts/IUniswapV3Pool.json +0 -1
  1071. package/dev-tools/artifacts/Router.json +0 -1
  1072. package/dev-tools/hardhat.config.cjs +0 -18
  1073. package/dev-tools/sauce/js/add.js +0 -4
  1074. package/dev-tools/sauce/js/call.js +0 -8
  1075. package/dev-tools/sauce/js/erc20.js +0 -18
  1076. package/dev-tools/sauce/js/example.js +0 -6
  1077. package/dev-tools/sauce/js/fibonacci.js +0 -13
  1078. package/dev-tools/sauce/ts/add.ts +0 -4
  1079. package/dev-tools/sauce/ts/call.ts +0 -8
  1080. package/dev-tools/sauce/ts/erc20.ts +0 -18
  1081. package/dev-tools/sauce/ts/example.ts +0 -6
  1082. package/dev-tools/sauce/ts/fibonacci.ts +0 -13
  1083. package/dev-tools/sauce/ts/saucescript.d.ts +0 -1
  1084. package/dev-tools/sauce/ts/tsconfig.json +0 -12
  1085. package/dev-tools/scripts/deploy.ts +0 -107
  1086. package/dev-tools/scripts/init.js +0 -132
  1087. package/dev-tools/scripts/run.ts +0 -67
  1088. package/dev-tools/scripts/start-fork.sh +0 -92
  1089. package/dev-tools/scripts/start-local.sh +0 -120
  1090. package/dev-tools/scripts/stop-local.sh +0 -40
  1091. package/dev-tools/scripts/sync-artifacts.js +0 -46
  1092. package/dev-tools/scripts/sync-price.ts +0 -58
  1093. package/dev-tools/src/contracts.ts +0 -59
  1094. package/dev-tools/src/runner.ts +0 -355
  1095. package/dev-tools/src/svm-local.ts +0 -305
  1096. package/dev-tools/src/sync-price.ts +0 -217
  1097. package/sdk/dist/deployments/v12.generated.d.ts +0 -95
  1098. package/sdk/dist/deployments/v12.generated.d.ts.map +0 -1
  1099. package/sdk/dist/deployments/v12.generated.js +0 -50
  1100. package/sdk/dist/deployments/v12.generated.js.map +0 -1
  1101. package/sdk/dist/swap/index.d.ts +0 -29
  1102. package/sdk/dist/swap/index.d.ts.map +0 -1
  1103. package/sdk/dist/swap/index.js +0 -27
  1104. package/sdk/dist/swap/index.js.map +0 -1
  1105. package/sdk/dist/swap/params.d.ts +0 -29
  1106. package/sdk/dist/swap/params.d.ts.map +0 -1
  1107. package/sdk/dist/swap/params.js +0 -123
  1108. package/sdk/dist/swap/params.js.map +0 -1
  1109. package/sdk/dist/swap/source.d.ts +0 -30
  1110. package/sdk/dist/swap/source.d.ts.map +0 -1
  1111. package/sdk/dist/swap/source.js +0 -101
  1112. package/sdk/dist/swap/source.js.map +0 -1
  1113. package/sdk/dist/swap/types.d.ts +0 -160
  1114. package/sdk/dist/swap/types.d.ts.map +0 -1
  1115. package/sdk/dist/swap/types.js +0 -106
  1116. package/sdk/dist/swap/types.js.map +0 -1
  1117. package/sdk/src/skills/aave-v3.md +0 -134
  1118. package/sdk/src/skills/aave-v4.md +0 -91
  1119. package/sdk/src/skills/abracadabra.md +0 -93
  1120. package/sdk/src/skills/across.md +0 -90
  1121. package/sdk/src/skills/aerodrome-slipstream.md +0 -57
  1122. package/sdk/src/skills/aevo.md +0 -58
  1123. package/sdk/src/skills/axelar.md +0 -80
  1124. package/sdk/src/skills/chainlink.md +0 -62
  1125. package/sdk/src/skills/curve.md +0 -141
  1126. package/sdk/src/skills/eigenlayer.md +0 -71
  1127. package/sdk/src/skills/gamma.md +0 -79
  1128. package/sdk/src/skills/harvest.md +0 -49
  1129. package/sdk/src/skills/index.md +0 -299
  1130. package/sdk/src/skills/kelp.md +0 -60
  1131. package/sdk/src/skills/kyberswap.md +0 -100
  1132. package/sdk/src/skills/loader.ts +0 -46
  1133. package/sdk/src/skills/maker.md +0 -79
  1134. package/sdk/src/skills/mantle-meth.md +0 -60
  1135. package/sdk/src/skills/olympus.md +0 -46
  1136. package/sdk/src/skills/oneinch.md +0 -64
  1137. package/sdk/src/skills/openocean.md +0 -86
  1138. package/sdk/src/skills/pancakeswap-v3.md +0 -104
  1139. package/sdk/src/skills/paraswap.md +0 -67
  1140. package/sdk/src/skills/permit2.md +0 -73
  1141. package/sdk/src/skills/perpetual-protocol.md +0 -73
  1142. package/sdk/src/skills/pyth.md +0 -58
  1143. package/sdk/src/skills/reflexer.md +0 -73
  1144. package/sdk/src/skills/safe.md +0 -56
  1145. package/sdk/src/skills/seaport.md +0 -65
  1146. package/sdk/src/skills/sommelier.md +0 -47
  1147. package/sdk/src/skills/stader.md +0 -53
  1148. package/sdk/src/skills/swell.md +0 -65
  1149. package/sdk/src/skills/synapse.md +0 -63
  1150. package/sdk/src/skills/synthra-v3.md +0 -57
  1151. package/sdk/src/skills/thales.md +0 -74
  1152. package/sdk/src/skills/tokemak.md +0 -48
  1153. package/sdk/src/skills/uniswap-v3.md +0 -202
  1154. package/sdk/src/skills/uniswap-v4.md +0 -125
  1155. package/sdk/src/skills/unitflow-v3.md +0 -62
  1156. package/sdk/src/skills/vertex.md +0 -55
  1157. package/sdk/src/skills/wormhole.md +0 -76
  1158. package/sdk/src/skills/zerox.md +0 -51
@@ -0,0 +1,53 @@
1
+ <!-- Generated from the SDK's registries. Do not edit. -->
2
+
3
+ # Token globals
4
+
5
+ A program compiled for a chain names these symbols with no import; each is that chain's token,
6
+ and amounts are in its smallest units (its decimals). Their addresses are in the chain's file in
7
+ `sauce-chains`. Any other ERC-20 is `Token(<address>)`.
8
+
9
+ - **Ethereum** (`ethereum`, [addresses](../../sauce-chains/references/ethereum.md)): `USDC` (6), `USDT` (6), `WETH` (18); and 1731 tokenized stocks ([stocks](stocks.md))
10
+ - **Optimism** (`optimism`, [addresses](../../sauce-chains/references/optimism.md)): `USDC` (6), `USDT` (6), `WETH` (18)
11
+ - **Polygon** (`polygon`, [addresses](../../sauce-chains/references/polygon.md)): `USDC` (6), `WETH` (18), `WPOL` (18)
12
+ - **Monad** (`monad`, [addresses](../../sauce-chains/references/monad.md)): `USDC` (6), `WMON` (18)
13
+ - **Arc** (`arc`, [addresses](../../sauce-chains/references/arc.md)): `EURC` (6), `USDC` (6), `USYC` (6), `WETH` (18)
14
+ - **Base** (`base`, [addresses](../../sauce-chains/references/base.md)): `USDC` (6), `WETH` (18); and 67 tokenized stocks ([stocks](stocks.md))
15
+ - **Arbitrum** (`arbitrum`, [addresses](../../sauce-chains/references/arbitrum.md)): `USDC` (6), `WETH` (18)
16
+ - **Solana** (`solana`, [addresses](../../sauce-chains/references/solana.md)): `PYUSD` (6), `USDC` (6), `USDT` (6), `WSOL` (9)
17
+
18
+ On Solana a symbol is the mint's 32-byte key, a value for the `@sauce/token` functions
19
+ (`balanceOf(USDC, account)`); the token accounts are `Account` parameters, and the token
20
+ methods (`USDC.transfer(...)`) are EVM-only. Devnet's mints, which differ, are in the Solana
21
+ file in `sauce-chains`, passed as a define that wins over the symbol. That file also names each
22
+ mint's token program: legacy SPL Token, or Token-2022, whose mints a program moves with the
23
+ checked writes (`sauce-solana`).
24
+
25
+ ## Token functions
26
+
27
+ Every program can call these `@sauce/token` functions with no import. The EVM writes are
28
+ SafeERC20: a token that returns nothing works, and one that returns `false` reverts.
29
+
30
+ On EVM chains:
31
+
32
+ - `balanceOf(token: Address, account: Account): Uint256`
33
+ - `totalSupply(token: Address): Uint256`
34
+ - `decimals(token: Address): Uint256`
35
+ - `allowance(token: Address, owner: Address, spender: Address): Uint256`
36
+ - `transfer(token: Address, to: Address, amount: Uint256): void`
37
+ - `transferFrom(token: Address, from: Address, to: Address, amount: Uint256): void`
38
+ - `approve(token: Address, spender: Address, amount: Uint256): void`
39
+ - `permit(token: Address, owner: Address, spender: Address, value: Uint256, deadline: Uint256, v: Uint256, r: Uint256, s: Uint256): void`
40
+ - `permitTransferFrom(token: Address, owner: Address, amount: Uint256, nonce: Uint256, deadline: Uint256, signature: bytes, permit2: Address): void`
41
+
42
+ On Solana:
43
+
44
+ - `balanceOf(token: Address, account: Account): Uint256`
45
+ - `ownerOf(token: Address, account: Account): Address`
46
+ - `totalSupply(token: Account): Uint256`
47
+ - `decimals(token: Account): Uint256`
48
+ - `allowance(token: Address, account: Account, spender: Address): Uint256`
49
+ - `transfer(token: Address, tokenProgram: Account, source: Account, dest: Account, authority: Account, amount: Uint256): void`
50
+ - `transferFrom(token: Address, tokenProgram: Account, source: Account, dest: Account, authority: Account, amount: Uint256): void`
51
+ - `approve(token: Address, tokenProgram: Account, source: Account, delegate: Account, authority: Account, amount: Uint256): void`
52
+ - `transferChecked(token: Address, tokenProgram: Account, source: Account, mint: Account, dest: Account, authority: Account, amount: Uint256, decimals: Uint256): void`
53
+ - `approveChecked(token: Address, tokenProgram: Account, source: Account, mint: Account, delegate: Account, authority: Account, amount: Uint256, decimals: Uint256): void`
@@ -0,0 +1,505 @@
1
+ ---
2
+ name: sauce-intents
3
+ description: Cross-chain intents written in Sauce — a file that is the intent, Base(() => { ... }).reward({ ... }) as top-level statements with no main and its values as defines; how an intent is published, funded, discovered, filled, proven, claimed, cancelled and refunded (a sauce intent command each) (the intent hash, the per-intent vault, IntentPublished and IntentFunded, isIntentFunded); every way to publish and fund it (sauce intent publish from a wallet, sauce run from a Pot, a transfer into the vault then publish, cascade children, quoted intents); amounts measured on chain; token-only bodies versus program bodies; the delivery; on which chain each name resolves; the shared destination Pot and the Kitchen fee the solver pays; rehearsing both sides; and the deadline and creator every intent needs. Use when a program should continue on another chain, forward a swap or bridge output, build a cascade, pay a solver, or when the user mentions intents, rewards, vaults, solvers, Portals, provers, Executors or Pots.
4
+ ---
5
+
6
+ # Cross-chain intents in Sauce
7
+
8
+ An intent is an **offer**: run this on the destination chain, and the reward escrowed on this chain
9
+ is yours. An intent file is written as **top-level statements, with no `main`**: the chain name
10
+ called as a function opens the intent, and every value the file does not compute is a define, left
11
+ undeclared in the file and set with `--define NAME=VALUE` (`sauce-script`).
12
+
13
+ ```sauce chain=base define=RECIPIENT,AMOUNT
14
+ Ethereum(() => {
15
+ USDC.transfer(RECIPIENT, AMOUNT); // Ethereum's USDC: the body runs there
16
+ }).reward({ tokens: [{ token: USDC, amount: AMOUNT }] }); // the source chain's USDC
17
+ ```
18
+
19
+ Nothing about the fill is guaranteed: a solver decides whether the reward is worth it, and the
20
+ package prices nothing. Say an intent is _offered_, never that it _will execute_.
21
+
22
+ ## Supported chains
23
+
24
+ For the initial release, intents are published, and every step of their life sent, only between
25
+ **Ethereum, Base and Solana**, the chains Sauce supports transactions on. Every other chain in the
26
+ registry is a **preview chain**: an intent that involves one still compiles, `sauce inspect` lists
27
+ it, and `sauce intent publish --dry-run` and `sauce intent fill` without `--send` rehearse it, but
28
+ the `sauce` command and its MCP server build and send none of its transactions. They refuse before
29
+ anything is built, signed or sent:
30
+
31
+ - **Publishing** — `sauce intent publish` (sent, or printed with `--format`), and `sauce run` or
32
+ `sauce tx` of a file that opens the intent — is refused unless the source and every destination
33
+ it opens are supported. The later levels of a cascade are not checked: keep every level on a
34
+ supported chain.
35
+ - **Each later step** is refused by the chain it is sent on: `fill --send`, `prove` and `cancel` by
36
+ the destination; `claim` and `refund` by the source.
37
+
38
+ The refusal names the supported chains and links the request for that chain (an MCP tool returns it
39
+ as `refused`, with the issue's title, body and a comment to post). To ask for a chain, find its
40
+ request among the existing ones
41
+ (https://github.com/eco-incorp/sauce/issues?q=is%3Aissue+label%3Achain-support) and add the use case
42
+ as a comment, or open one from the form
43
+ (https://github.com/eco-incorp/sauce/issues/new?template=chain-support.yml): the chain and its id,
44
+ what you want to run there, the protocols and tokens it needs, and the volume expected and when.
45
+
46
+ ## The lifecycle
47
+
48
+ An intent is three values: the **destination** chain, the **route** (what runs there: a salt, the
49
+ route's deadline, the destination Portal, `nativeAmount`, the tokens the solver delivers, and the
50
+ calls) and the **reward** (its deadline, the creator, the prover, a native amount and tokens). Its
51
+ hash is `keccak256(abi.encodePacked(uint64 destination, keccak256(route bytes), keccak256(abi.encode(reward))))`,
52
+ so every field is in it: the deadlines and the destination Kitchen's fee (the route's
53
+ `nativeAmount`) too. **Changing any of them is a different intent**: rebuild every transaction,
54
+ including any unsigned one printed earlier.
55
+
56
+ 1. **Fund.** The reward sits in the intent's own **vault** on the source chain. Its address follows
57
+ from the intent hash, so it exists before anything is published or deployed:
58
+ `Portal.intentVaultAddress(destination, route, reward)` returns it, and tokens sent there count.
59
+ 2. **Publish.** `Portal.publish` records the intent and emits `IntentPublished`, which solvers
60
+ watch. It needs no funding and anyone may send it; sending it again re-emits the event.
61
+ 3. **Discover and check.** A solver picks the intent up from `IntentPublished` (or, for an intent
62
+ it quoted, from `IntentFunded`) and calls `Portal.isIntentFunded(destination, route, reward)`:
63
+ true when the intent's status is Funded **or** the vault already holds the whole reward. A
64
+ solver that finds it unfunded may retry for a while, then drop it: fund before or with the
65
+ publication.
66
+ 4. **Fill.** On the destination the solver calls the destination Portal's `fulfill`, sending the
67
+ route's `nativeAmount` as value and delivering the route's tokens; the Portal's Executor runs the
68
+ calls. Before the route's deadline, once. `fulfillAndProve` does the same and sends the proof in
69
+ the same transaction, its value the `nativeAmount` plus the prover's fee.
70
+ 5. **Prove.** The destination Portal's `prove(prover, sourceDomain, intentHashes, data)` hands what
71
+ it recorded (the claimant, or a cancellation) to the destination's prover, which sends it to the
72
+ reward's prover on the source chain for a fee it quotes (`fetchFee`). With Hyperlane, a relayer
73
+ delivers the message; the source prover then records the claimant, which
74
+ `provenIntents(intentHash)` returns.
75
+ 6. **Claim.** Once the source has the proof, `withdraw(destination, routeHash, reward)`, sent by
76
+ anyone, pays the vault's reward to the claimant the proof names (`batchWithdraw` claims several).
77
+ 7. **Refund.** After the reward's deadline, with no proven fill, `refund(destination, routeHash,
78
+ reward)`, sent by anyone, returns everything the vault holds of the reward to the creator (the
79
+ creator alone may send `refundTo` to choose another recipient). Before the deadline it reverts
80
+ `InvalidStatusForRefund`. A vault that was funded but never published refunds the same way.
81
+ 8. **Cancel, for an earlier refund.** Where the destination Portal has `cancel`, anyone may cancel
82
+ an unfilled intent strictly after the route's deadline: no fill can land after it. Proving the
83
+ cancellation (5) lets the creator refund at once, before the reward's deadline. A cancellation is
84
+ recorded as a claimant no key controls, so the source Portal must refuse to pay it
85
+ (`withdraw` reverting `CancelledIntent`); prove one only to a source Portal that does. Prove it
86
+ once the cancel is final on the destination: a reorg that let a fill in first would leave that
87
+ solver unpaid.
88
+
89
+ ## Every step from the command line
90
+
91
+ `sauce intent` drives the whole lifecycle. Each verb takes the intent file (with `--chain`, the
92
+ source, and the flags it was built with) or the intent's hash, and `--config sauce.config.json`
93
+ with both chains' endpoints. Every intent the commands publish, fill or import goes into a local
94
+ store in your home directory (`--store <dir>` names another), so later steps name it by hash; where it
95
+ stands is read from the chains each time.
96
+
97
+ ```sh
98
+ npx sauce intent publish --config sauce.config.json --keystore <keystore>
99
+ npx sauce intent status <intent-hash> --config sauce.config.json
100
+ npx sauce intent fill <intent-hash> --config sauce.config.json --send --keystore <keystore>
101
+ npx sauce intent prove <intent-hash> --config sauce.config.json --keystore <keystore>
102
+ npx sauce intent claim <intent-hash> --chain <source> --config sauce.config.json --keystore <keystore>
103
+ npx sauce intent refund <intent-hash> --chain <source> --config sauce.config.json --keystore <keystore>
104
+ npx sauce intent cancel <intent-hash> --config sauce.config.json --keystore <keystore>
105
+ npx sauce intent import <tx-hash> --chain <source> --config sauce.config.json
106
+ ```
107
+
108
+ - `publish` with no file asks, at a terminal, for the chains, the token and amount delivered and
109
+ to whom, the reward (suggested: what is delivered plus a margin over the solver's destination
110
+ costs), the deadlines, the prover and how the reward is funded (a transfer to the vault by
111
+ default), writes the intent as a `.sauce.ts` file, rehearses publishing and filling it, and
112
+ publishes it once approved. Each question has a flag (`--source`, `--destination`, `--token`,
113
+ `--amount`, `--recipient`, `--reward-token`, `--reward`, `--prover`, `--fill-deadline`,
114
+ `--reward-deadline`, `--intent-fund-via`), so it runs without a terminal.
115
+ - `status` prints the intent's state on both chains (unfunded, funded, filled, cancelled, proven,
116
+ cancelProven, claimed, refunded), its deadlines, and whether each next step can be taken now,
117
+ with why not and from when. An intent funded by a transfer into its vault counts as funded,
118
+ though the Portal's status for it stays Initial.
119
+ - `fill --send` fills it as a solver, from the signer: rehearsed first on the signer's real
120
+ balances and not sent if it reverts, and what it spends (each delivered token, and the value)
121
+ shown for approval (`--auto-approve` approves). It sends the approvals (zero first where a smaller one
122
+ stands), then `fulfillAndProve` with the prover's fee, or `fulfill` with `--no-prove`. It prints
123
+ the Hyperlane message the proof travels as.
124
+ - `prove` sends the proof of a filled or cancelled intent, paying the prover's fee; `claim` pays the
125
+ reward once the source has the proof, and says so, with the message's id, while it has not;
126
+ `refund` returns the reward when the Portal allows it, and says from when otherwise; `cancel`
127
+ cancels after the route's deadline, refusing where either Portal lacks the cancellation support
128
+ described above.
129
+ - Without a signer, each prints its transactions unsigned, for a wallet to send in order.
130
+ - `sauce intent` alone, at a terminal, lists the stored intents with where each stands, and runs
131
+ these on the one picked.
132
+
133
+ **An intent to Solana.** An intent Ethereum or Base publishes for Solana is filled, proven and
134
+ cancelled on Solana, through its Portal program, and claimed or refunded on its source as above.
135
+ The config gives Solana's endpoint under its chain id, `1399811149`.
136
+
137
+ ```sh
138
+ npx sauce intent import <tx-hash> --chain <source> --config sauce.config.json
139
+ npx sauce intent fill <intent-hash> --config sauce.config.json --solver <solana-key> --claimant <address>
140
+ npx sauce intent fill <intent-hash> --config sauce.config.json --claimant <address> --send --keypair <keypair>
141
+ npx sauce intent cancel <intent-hash> --config sauce.config.json --keypair <keypair>
142
+ ```
143
+
144
+ - `--claimant` is required: the address on the source chain the reward pays. A Solana key is not
145
+ one.
146
+ - The rehearsal runs on the solver's accounts as they are, since Solana's simulation takes no
147
+ overrides: the solver must hold the route's tokens.
148
+ - `fill --send` sends the fill, then the proof through the HyperProver, with Hyperlane's gas paid in
149
+ the same transaction. Each spend is approved.
150
+ - `prove` and `cancel` sign with `--keypair`, which pays their fee. A cancellation's proof waits
151
+ until the slot that cancelled it is finalized.
152
+
153
+ The Portal's functions, events and errors, with selectors and topics, are in
154
+ [references/portal.md](references/portal.md).
155
+
156
+ ## Names resolve per chain
157
+
158
+ The file is compiled for the **source** chain, the one that pays the reward (`--chain`).
159
+
160
+ - **In `.reward(...)`**, names are the source chain's, which funds and escrows the reward: `USDC`
161
+ there is the source chain's USDC. A reward token must be known when the file is compiled: a
162
+ symbol, or a token's address on the source chain as a literal, a define or a top-level `const` of
163
+ a literal. Its amount may be a measured value.
164
+ - **Inside the braces, and in the delivery argument**, the code runs on the destination, and every
165
+ name a chain supplies resolves there: in an `Ethereum(...)` body, `USDC` is Ethereum's USDC,
166
+ `AaveV3.Pool` is Ethereum's pool, and `chainId` and a `Namespace_Contract` define are Ethereum's.
167
+ The tokens a destination has are listed in
168
+ [../sauce-globals/references/tokens.md](../sauce-globals/references/tokens.md), with their
169
+ addresses in the destination's file in `sauce-chains`
170
+ ([../sauce-chains/references/ethereum.md](../sauce-chains/references/ethereum.md) for Ethereum).
171
+ - **The rule repeats at every depth.** An intent opened inside a body is funded on that body's
172
+ chain, so its reward resolves there and its own body on its own destination.
173
+ - **Name a token by a symbol, a literal, a define or a top-level `const` of a literal.** Any other
174
+ top-level `const` holding a token's address (`const TOKEN = USDC;`), used in the reward or the
175
+ delivery, counts as a value the program computes, so the compile refuses the intent, saying the
176
+ token's address must be known when the intent is built, and so does `sauce intent publish`. A
177
+ `const` inside the braces is fine.
178
+ - A literal address means that address everywhere, and so does a define whose name no chain uses
179
+ (`RECIPIENT`). A define under a chain-scoped name (`USDC`, `chainId`, a protocol address) is a
180
+ name on the source chain: it applies to the file's own statements and the reward, and a body on
181
+ another chain keeps that chain's value.
182
+
183
+ ## Publishing and funding
184
+
185
+ | Way | What is sent | Emits | Choose it when |
186
+ | ----------------------------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------- | ----------------------------------------------------------------------------------- |
187
+ | (a) From a wallet, `sauce intent publish` | a transfer of each reward token to the intent's vault, then `publish`: no approval | `IntentPublished` | every amount is known when you build it, and a wallet pays |
188
+ | (b) From a Pot, `sauce run` | the same, by the Pot, inside the cook, with the vault read from the Portal | `IntentPublished` | an amount is measured on chain, or the intent must open atomically with other steps |
189
+ | (c) Transfer into the vault, by hand | a token transfer to `intentVaultAddress(...)`, then `publish`, for an intent you encode yourself | `IntentPublished` | the intent was not built from a file the package compiles |
190
+ | `--intent-fund-via publishAndFund` | (a) or (b) with `approve(Portal, reward)` per token, then `publishAndFund` | `IntentPublished`, `IntentFunded` | an intent built from a solver's quote (below) |
191
+
192
+ Funding by transfer needs no approval, so no allowance is left standing and USDT needs nothing
193
+ special. The vault counts whatever it holds, so `isIntentFunded` is true from the moment the
194
+ transfer lands; the intent's status stays Initial (only `publishAndFund` or `fund` set Funded), and
195
+ `isIntentFunded`, the check solvers make, accepts either. The reward always goes into the vault
196
+ **before** `publish` is sent, so a solver that sees `IntentPublished` finds the intent funded.
197
+
198
+ **(a) From a wallet.** `sauce intent publish` builds each intent before anything runs, so every amount
199
+ must be a literal, a define or a top-level `const` of a literal, and the file may do nothing but
200
+ open intents (a file with an amount measured or computed on chain is refused, with `sauce run` named
201
+ instead). For each intent it computes the vault from the
202
+ Portal's address and the intent and, with an endpoint, reads it from the Portal's
203
+ `intentVaultAddress`: the two must agree, or nothing is sent. The wallet then transfers each reward
204
+ token to the vault (and sends a native reward to it), only what the vault does not hold yet, and
205
+ calls `publish(destination, route, reward)` once the Portal reports the intent funded. A token whose
206
+ transfer returns `false` stops it there, before the intent is published, with what was paid still
207
+ in the vault: top it up and run it again, or `refund` after the deadline. A second run that finds
208
+ the vault funded only publishes.
209
+
210
+ ```sh
211
+ npx sauce intent publish pay-on-ethereum.sauce.ts --chain base --config sauce.config.json \
212
+ --from <address> --dry-run --assume-balance USDC:1 --define RECIPIENT=<address> \
213
+ --define AMOUNT=1000000 --intent-deadline <unix seconds> --intent-creator <address>
214
+ npx sauce intent publish pay-on-ethereum.sauce.ts --chain base --from <address> --format json \
215
+ --define RECIPIENT=<address> --define AMOUNT=1000000 \
216
+ --intent-deadline <unix seconds> --intent-creator <address>
217
+ ```
218
+
219
+ - `--dry-run` rehearses the transfers and `publish` together from the wallet, then reports what
220
+ `isIntentFunded` returns after them, and sends nothing; `--assume-balance USDC:1` (whole tokens)
221
+ gives the wallet the reward for the rehearsal only, so a wallet that does not hold it yet can
222
+ rehearse. Without `--dry-run`, `--keystore <keystore>` in place of `--from` signs and sends them.
223
+ - `--format json` (or `cast`) with `--from` and no signer prints the transactions, unsigned, for that
224
+ wallet to send in order, transfers first, with each intent's `vault`. With no endpoint the vault
225
+ is the package's own computation and each transfer is for the whole reward; with one, the vault
226
+ is also read from the Portal and only what it does not hold yet is transferred. Send `publish`
227
+ only once the transfers have landed.
228
+
229
+ **(b) From a Pot.** `sauce run` cooks the file on your Pot, and opening the intent is one of its
230
+ steps: in the same transaction as everything else, the Pot reads the intent's vault from the Portal
231
+ (`intentVaultAddress` over the very bytes it then publishes), transfers each reward token there,
232
+ sends a native reward, and calls `publish`, so nothing is published unless the whole cook succeeds,
233
+ and a token whose transfer returns `false` reverts it. Values measured while it runs can flow into the intent: in
234
+ `const amount = USDC.balanceOf(ctx.self())`, `amount` does not exist until the program runs, and
235
+ using it inside the braces, in the delivery or in the reward is enough. The package encodes the
236
+ intent with a slot for it, and the program writes the measured value in before it publishes. Any
237
+ one-word value can be carried this way.
238
+
239
+ ```sh
240
+ npx sauce run cross-chain.sauce.ts --chain base --config sauce.config.json --keystore <keystore> \
241
+ --define BENEFICIARY=<address> --intent-deadline <unix seconds> --intent-creator <address> \
242
+ --intent-execution-fee <wei>
243
+ ```
244
+
245
+ **(c) Transfer into the vault, by hand.** (a) and (b) do this for every intent a file opens. For an
246
+ intent encoded some other way, do the same in one cook, with the program reading the vault from the
247
+ Portal itself so it cannot be wrong:
248
+ [examples/fund-by-transfer.sauce.ts](examples/fund-by-transfer.sauce.ts) takes the intent as
249
+ `publish`'s three arguments, transfers each reward token to
250
+ `intentVaultAddress(destination, route, reward)` and calls `publish(destination, route, reward)`,
251
+ which returns the intent hash and the vault. For an intent file, those three arguments are the
252
+ arguments of the `publish` that `sauce intent publish … --from <address> --format json` prints; decode them
253
+ with its signature (in [references/portal.md](references/portal.md)).
254
+
255
+ ```sh
256
+ npx sauce run fund-by-transfer.sauce.ts --chain base --config sauce.config.json \
257
+ --keystore <keystore> --args <portal> <destination> <route> <reward>
258
+ ```
259
+
260
+ - **From a wallet**, it is two transactions: **transfer first, then publish**, so a solver that sees
261
+ `IntentPublished` finds the intent funded. If the publish fails or is never sent, nothing is lost:
262
+ publish later (the vault still holds the reward), or `refund` after the deadline.
263
+ - **What the CLI emits**: `sauce intent publish` and `sauce run` fund every intent this way by default, as
264
+ (a) and (b) describe; `--intent-fund-via publishAndFund` gives the approve and `publishAndFund`
265
+ instead.
266
+ - A native reward (`reward.nativeAmount`) is native coin sent to the vault the same way, by
267
+ `sauce intent publish` and `sauce run` alike; the example funds tokens only and refuses a native reward.
268
+
269
+ **Quoted intents.** A solver that quoted an intent marks its quote funded when it sees
270
+ `IntentFunded`, which only `publishAndFund` and `fund` emit. For an intent built from a solver's
271
+ quote, fund it with `publishAndFund`: (a) or (b) with `--intent-fund-via publishAndFund`, not by
272
+ transfer. The wallet then approves each reward token to the **Portal** for exactly the reward (with
273
+ an endpoint, a smaller allowance already standing is reset to zero first, as USDT requires), and
274
+ `publishAndFund(destination, route, reward, false)` pulls the reward into the same vault and marks
275
+ the intent Funded; from a Pot, the same happens inside the cook.
276
+
277
+ `sauce inspect <file> --chain <chain>` with the same defines and intent flags prints each intent
278
+ the file opens: its destination, hashes, the route's calls and the reward, with every measured value
279
+ named.
280
+
281
+ ## Two kinds of body
282
+
283
+ | The body is… | Lowers to | Needs | Token writes |
284
+ | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
285
+ | only `transfer`/`approve` calls on a symbol or `Token(address)`, with literal, define or captured arguments | plain calls the destination Portal's Executor makes | nothing more: no Pot, no Kitchen fee | USDT works and `approve` is reset to zero first, but a `false` return is **not** detected |
286
+ | anything else: a local, a balance read, a condition, a protocol call, `transferFrom`, a nested intent | a program compiled for the destination and cooked on its Pot | the destination's Kitchen fee, and the delivery as the second argument | SafeERC20: a `false` return reverts the fulfilment |
287
+
288
+ The Executor checks only that each call did not revert, so a token-only body's transfer that
289
+ returns `false` fills the intent with nothing moved; a call with data to an address with no code
290
+ reverts `CallToEOA`. A program body must say what the solver delivers, because a balance read
291
+ inside it reads what is there, not what must be brought:
292
+
293
+ ```sauce chain=base define=BENEFICIARY
294
+ const amount = USDC.balanceOf(ctx.self());
295
+ const delivered = amount - (amount * 10n) / 10000n;
296
+ Ethereum(
297
+ () => {
298
+ USDC.approve(AaveV3.Pool, delivered);
299
+ AaveV3.Pool.supply(USDC, delivered, BENEFICIARY, 0n);
300
+ },
301
+ { tokens: [{ token: USDC, amount: delivered }] },
302
+ ).reward({ tokens: [{ token: USDC, amount }] });
303
+ ```
304
+
305
+ The gap between `delivered` (brought on Ethereum) and `amount` (paid on Base) is the solver's
306
+ margin. Make it worth filling.
307
+
308
+ ## A whole program as the body
309
+
310
+ The body can be any program for the destination. It is written inside the braces and uses the
311
+ file's defines as values. It may also use what the file declares: its imports (an ABI, a library)
312
+ and its helper functions, each compiled into the body's program for the destination. It calls
313
+ contracts as any program does (`sauce-script`): by namespace (`UniswapV3.Factory.getPool(...)`),
314
+ through a registry ABI import, or through an ABI of the file's own imported at its top. A swap is a
315
+ `@sauce/router`
316
+ call (`sauce-swaps`), imported at the top of the file. Every unsold input and every output leaves the destination Pot
317
+ before the body ends, and a refund the body makes lands on the destination chain. The body runs on
318
+ the shared intent Pot, which holds nothing of anyone's between intents, so it may return a token's
319
+ whole balance there, as the refunds below do; a program on an owner's Pot returns only what is left
320
+ of its own amount instead (`sauce-distributed-swap`).
321
+
322
+ A one-pool swap, with the guard every swap needs (`sauce-swaps`): WETH a solver delivers on Base is
323
+ sold on the Uniswap V3 0.05% pool down to `SQRT_PRICE_LIMIT_X96`, at least `MIN_OUT` USDC goes to
324
+ `RECIPIENT`, and any unsold WETH to `REFUND_TO`, on Base. A fill below `MIN_OUT` reverts the whole
325
+ fulfilment, so set it from the limit (`sauce-distributed-swap` has the recipe), never above what the
326
+ pool can pay.
327
+
328
+ ```sauce chain=ethereum define=AMOUNT_IN,REWARD,SQRT_PRICE_LIMIT_X96,MIN_OUT,RECIPIENT,REFUND_TO
329
+ import { uniswapV3 } from "@sauce/router";
330
+
331
+ Base(
332
+ () => {
333
+ const pool = UniswapV3.Factory.getPool(WETH, USDC, 500n); // Base's 0.05% tier
334
+ require(pool != 0n, "no WETH/USDC pool at 0.05%");
335
+ // Pays RECIPIENT the USDC, and reverts the whole fulfilment below MIN_OUT.
336
+ uniswapV3(pool, WETH, USDC, AMOUNT_IN, SQRT_PRICE_LIMIT_X96, MIN_OUT, RECIPIENT);
337
+ const unsold = WETH.balanceOf(ctx.self()); // the shared Pot: return all of it
338
+ if (unsold > 0n) {
339
+ WETH.transfer(REFUND_TO, unsold);
340
+ }
341
+ },
342
+ { tokens: [{ token: WETH, amount: AMOUNT_IN }] }, // Base's WETH, which the solver delivers
343
+ ).reward({ tokens: [{ token: WETH, amount: REWARD }] }); // the source chain's WETH
344
+ ```
345
+
346
+ `REWARD` must exceed what the solver delivers, `AMOUNT_IN`, by what filling costs it (below). To buy
347
+ WETH instead, swap `USDC` for `WETH` and deliver USDC: USDC is token1 on Base, so the limit is then
348
+ a ceiling, the `buy` block of `sauce price`.
349
+ [examples/swap-on-base.sauce.ts](examples/swap-on-base.sauce.ts) is the same with a distributed
350
+ swap as the body (`sauce-distributed-swap`): one pass over every Uniswap V3 and hookless V4 pool of
351
+ the pair, each offered the WETH still unsold up to its own fee-adjusted limit, and skipped when it
352
+ has no liquidity or is past that limit. It swaps through `@sauce/router`, finds each V3 pool with
353
+ `UniswapV3.Factory.getPool` and reads it as `UniswapV3.Pool(pool)`, and reads the V4 pools from
354
+ `UniswapV4.StateView`.
355
+
356
+ ## Cascades
357
+
358
+ An intent's body can open the next one. Each level's amounts are measured at that level's own
359
+ execution and carried into the level below; no amount past the first exists when the user signs.
360
+
361
+ ```sauce chain=base define=RECIPIENT
362
+ const amount = USDC.balanceOf(ctx.self());
363
+ Ethereum(
364
+ () => {
365
+ const arrived = USDC.balanceOf(ctx.self()); // Ethereum's USDC
366
+ Base(() => {
367
+ USDC.transfer(RECIPIENT, arrived); // Base's USDC
368
+ }).reward({ tokens: [{ token: USDC, amount: arrived }] }); // Ethereum's: it funds this level
369
+ },
370
+ { tokens: [{ token: USDC, amount }] },
371
+ ).reward({ tokens: [{ token: USDC, amount }] });
372
+ ```
373
+
374
+ Each level is a separate fulfilment by a solver, later, on its own chain: a failure on a later hop
375
+ does not undo an earlier one. The child is published and funded **by the parent's body**, as (b)
376
+ above: when the Ethereum level runs, the shared Pot there pays the next level's reward into its
377
+ vault on Ethereum's Portal from what it holds, in Ethereum's USDC, and calls `publish`, so the child
378
+ is published like any other intent and any solver can discover it. Keep every level on a supported
379
+ chain, as here (Base, Ethereum, then Base again): the command checks the first level's chains only.
380
+ Each level's deadline must be no
381
+ earlier than its parent's. (The TypeScript cascade builder, `.nest()` in `sauce-typescript`, also
382
+ funds a child by a transfer into its vault by default, but with no publication of its own, and
383
+ takes `publishAndFund` as an option.)
384
+
385
+ ## What the compile supplies, and what you pass
386
+
387
+ The Portal, the prover, the destination Pot and the encoding are looked up from the eco-routes
388
+ registry, which records each chain's Portal and a prover deployed on both sides. Each chain's file in
389
+ `sauce-chains` says whether it takes intents and gives its Portal, Executor and shared intent Pot
390
+ ([../sauce-chains/references/index.md](../sauce-chains/references/index.md)). Three values are the
391
+ developer's:
392
+
393
+ - **`--intent-deadline <unix seconds>`**: when the intent must be filled by.
394
+ - **`--intent-creator <address>`**: who may reclaim an unearned reward. Never a Pot.
395
+ - **`--intent-execution-fee <wei>`** for a program body: the destination Kitchen's fee. It is
396
+ mutable on chain and lives on the destination, so read it there just before sending: an
397
+ `eth_call` of `executionFee()` on the destination's Kitchen (its address is in the chain's file in
398
+ `sauce-chains`), or pass `--intent-execution-fee auto`, which reads it through `--config`. An
399
+ increase before the fill makes the cook, and the fulfilment, revert.
400
+
401
+ **Units and defines.** Amounts are base units (`AMOUNT=1000000` is 1 USDC); only `--assume-balance`
402
+ and `--fund` take whole tokens. In a `--defines` file, write an address or any value past 2^53 as a
403
+ JSON string (`"AMOUNT_IN": "1000000000000000000"`): a JSON number loses precision. The intent file
404
+ stays top-level statements with no `main`, so every input is a define.
405
+
406
+ Refused at compile time, never silently changed: a name that is neither a define nor a program
407
+ variable, a missing deadline, creator or fee, a chain with no eco-routes deployment, a pair with no
408
+ prover deployed on both sides.
409
+
410
+ ## The destination side
411
+
412
+ - **The shared Pot.** A program body cooks on the destination Portal Executor's **shared Pot** (its
413
+ owner is the Executor, its salt zero); the destination's file in `sauce-chains` gives the Pot and
414
+ the Executor. **The Pot must exist before any fill**: until it does, every fulfilment of a program
415
+ body reverts (`CallToEOA`). `npx sauce pot --chain <destination> --owner <Executor>` prints its
416
+ address and deploy transaction; with `--deploy --config sauce.config.json --keystore <keystore>`
417
+ any signer deploys it (the Pot is the Executor's either way), and an existing one is reported, not
418
+ redeployed; `sauce intent fill` says whether it is deployed on the destination, and deploys it in its
419
+ rehearsal when it is not. Anything left in the Pot after the program, token or allowance, belongs
420
+ to the next intent through that Portal: approve exactly what is spent and move every remainder
421
+ out.
422
+ - **What the solver pays.** The Kitchen fee becomes the route's `nativeAmount`: the solver sends it,
423
+ in the destination's native coin, as the value of `fulfill`, and pays the destination gas too.
424
+ Nothing in the reward pays either back, so the margin (the reward minus what the solver delivers)
425
+ must cover both; a body that reads and swaps on many pools costs a lot of gas, so measure it in a
426
+ rehearsal (below). Solvers apply checks of their own, such as the reward covering the route's
427
+ tokens plus their fee, and decide which routes they fill.
428
+ - **Refunds of unsold input land on the destination**, where the body runs.
429
+
430
+ ## Rehearse both sides before a solver does
431
+
432
+ - **The source side**: `sauce intent publish --dry-run --assume-balance …` (above) rehearses the transfers
433
+ into the vault and `publish`; `sauce simulate` rehearses a file run from a Pot.
434
+ - **The fill, on the destination**: the body runs there, when a solver fills the intent, and that is
435
+ where a swap misses its minimum or a refund fails. Rehearse it with `sauce intent fill`, the same file
436
+ and flags, before publishing; it signs nothing and sends nothing:
437
+
438
+ ```sh
439
+ npx sauce intent fill swap-on-base.sauce.ts --chain <chain> --config sauce.config.json \
440
+ --defines <defines.json> --intent-deadline <unix seconds> --intent-creator <address> \
441
+ --intent-execution-fee <Base Kitchen fee in wei>
442
+ ```
443
+
444
+ On each intent's destination it runs, in one simulated block, what a solver sends: the shared
445
+ Pot's deployment when the body cooks on it and nobody has deployed it yet, the solver's approval
446
+ of the destination Portal for the delivered tokens, then `Portal.fulfillAndProve` with the
447
+ Kitchen's fee and the prover's fee as its value (or `Portal.fulfill` with the Kitchen's fee alone,
448
+ with `--no-prove` or a prover it does not drive). The solver is given the delivered tokens for the rehearsal only. It prints each
449
+ transfer, each address's net change (an address a define holds is named by the define) and what
450
+ the shared Pot and the Executor were left holding, which must be nothing; or why the fill
451
+ reverts, down to the body's own `require` message. It warns when the shared Pot is not deployed,
452
+ and when `--intent-execution-fee` is below the destination Kitchen's fee, naming the fee to pass.
453
+ `--config` must name the destination chain's endpoint (`--rpc-url` works when every intent goes
454
+ to one chain, and is then that chain's endpoint). An intent that uses a value measured on chain
455
+ cannot be rehearsed this way: its route exists only once the program runs. Fix what it reports
456
+ and rehearse again before `sauce intent publish` or `sauce run`. With `--send` and a signer,
457
+ `sauce intent fill` then fills it for real (above).
458
+
459
+ - **The body alone, as a program**: copy the body (what is inside the braces) into a file of its own,
460
+ top-level statements with the same defines, and rehearse it as a program for the destination,
461
+ with the delivered tokens assumed in the Pot. It runs on your Pot instead of the shared one, but
462
+ executes the same calls, shows what moves, and gives the gas:
463
+
464
+ ```sh
465
+ npx sauce simulate one-pool-body.sauce.ts --chain base --owner <address> \
466
+ --config sauce.config.json --assume-balance WETH:0.001 --define AMOUNT_IN=1000000000000000 \
467
+ --define SQRT_PRICE_LIMIT_X96=<sqrtPriceX96> --define MIN_OUT=<amount> \
468
+ --define RECIPIENT=<address> --define REFUND_TO=<address>
469
+ ```
470
+
471
+ - **The fill by hand**, as a solver sends it, on a fork of the destination
472
+ (`anvil --fork-url <destination endpoint>`), with any client:
473
+ 1. Get the intent: `sauce inspect <file> --chain <source> --json`, with the same defines and
474
+ intent flags, prints each intent's `intentHash`, `routeHash`, `rewardHash`, route and reward;
475
+ the raw route bytes are the `route` argument of the `publish` that
476
+ `sauce intent publish <file> … --from <address> --format json` prints (their keccak-256 is
477
+ `routeHash`).
478
+ 2. Make sure the shared Pot exists (above).
479
+ 3. Hold the route's `tokens` in an account and approve the **destination** Portal for each;
480
+ `fulfill` pulls them from the sender.
481
+ 4. From that account, call the destination Portal's
482
+ `fulfill(bytes32 intentHash, Route route, bytes32 rewardHash, bytes32 claimant)` with **value =
483
+ the route's `nativeAmount`**, the route decoded from its bytes and the claimant the solver's
484
+ address as 32 bytes. Less value reverts `InsufficientNativeAmount(sent, required)`, a missing
485
+ Pot `CallToEOA(<Pot>)`, and a body that reverts surfaces as the Executor's `CallFailed`, with
486
+ the body's own reason inside.
487
+ 5. Read the outcome: what the recipient got, what was refunded, the gas, and that the Pot holds
488
+ nothing.
489
+
490
+ Solana destinations are not built this way (see `sauce-solana`). An application can also build an
491
+ intent from TypeScript around a program it compiles itself (`sauce-typescript`).
492
+
493
+ ## Examples
494
+
495
+ - [examples/cross-chain.sauce.ts](examples/cross-chain.sauce.ts) forwards the Pot's USDC to Aave on
496
+ Ethereum. It measures its amount, so it runs from a Pot.
497
+ - [examples/swap-on-base.sauce.ts](examples/swap-on-base.sauce.ts) is the distributed swap as the
498
+ body of an intent to Base, opened from Ethereum. Its amounts are defines, so it can be run from a
499
+ Pot or published from a wallet.
500
+ - [examples/fund-by-transfer.sauce.ts](examples/fund-by-transfer.sauce.ts) funds an intent by a
501
+ transfer into its vault and publishes it, in one cook on a Pot.
502
+ - [examples/intents.mts](examples/intents.mts) compiles the intent files, with the deadline, the
503
+ creator, Base's and Ethereum's fees and the recipient as developer inputs, and pins on which chain
504
+ each name resolves, the fee requirement, the token-only case, the pool ABI's selectors, and the
505
+ rehearsal's transactions: the Pot's deploy and `fulfill` with the fee as its value.
@@ -0,0 +1,37 @@
1
+ // Forwards the USDC this Pot holds to Ethereum, where a solver supplies it to Aave V3 for
2
+ // BENEFICIARY. The amount is only known when this runs, so the file runs on the owner's Pot (sauce
3
+ // run) and opens the intent as it goes. The whole file is the program: top-level statements, no
4
+ // main, and BENEFICIARY a define.
5
+ //
6
+ // `--chain` is the source chain, which funds the reward: `USDC` in `.reward(...)` is its USDC.
7
+ // Inside the braces, and in the delivery argument after them, the code runs on Ethereum: `USDC` and
8
+ // `AaveV3.Pool` there are Ethereum's. The gap between what is delivered and the reward is the
9
+ // solver's margin.
10
+ //
11
+ // sauce run cross-chain.sauce.ts --chain <chain> --config sauce.config.json \
12
+ // --keystore <keystore> --define BENEFICIARY=<address> --intent-deadline <unix seconds> \
13
+ // --intent-creator <address> --intent-execution-fee <Ethereum Kitchen fee in wei>
14
+ //
15
+ // BENEFICIARY: Address who the Aave V3 position on Ethereum is supplied for
16
+ // --intent-deadline: unix seconds the last second a solver may fill it
17
+ // --intent-creator: Address who may reclaim the reward if no solver earns it
18
+ // --intent-execution-fee: wei Ethereum's Kitchen fee for the body's cook; `auto` reads it
19
+ // through --config
20
+ //
21
+ // From Base, with the fee read from Ethereum:
22
+ //
23
+ // sauce run cross-chain.sauce.ts --chain base --config sauce.config.json \
24
+ // --keystore <keystore> --define BENEFICIARY=<address> --intent-deadline <unix seconds> \
25
+ // --intent-creator <address> --intent-execution-fee auto
26
+ require(BENEFICIARY != 0n, "set BENEFICIARY");
27
+ const amount = USDC.balanceOf(ctx.self());
28
+ require(amount > 0n, "nothing to forward");
29
+ const delivered = amount - (amount * 10n) / 10000n; // the solver keeps 0.1%
30
+
31
+ Ethereum(
32
+ () => {
33
+ USDC.approve(AaveV3.Pool, delivered);
34
+ AaveV3.Pool.supply(USDC, delivered, BENEFICIARY, 0n);
35
+ },
36
+ { tokens: [{ token: USDC, amount: delivered }] },
37
+ ).reward({ tokens: [{ token: USDC, amount }] });