@eco-incorp/sauce 0.99.6 → 0.99.8
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.
- package/README.md +58 -16
- package/actions/action-program.schema.json +480 -379
- package/actions/dist/abis.d.ts +19 -18
- package/actions/dist/abis.d.ts.map +1 -1
- package/actions/dist/abis.js +29 -29
- package/actions/dist/compile.d.ts +4 -4
- package/actions/dist/compile.d.ts.map +1 -1
- package/actions/dist/compile.js +3 -1
- package/actions/dist/compose.d.ts +63 -6
- package/actions/dist/compose.d.ts.map +1 -1
- package/actions/dist/compose.js +100 -16
- package/actions/dist/index.d.ts +1 -1
- package/actions/dist/index.d.ts.map +1 -1
- package/actions/dist/names.d.ts +88 -0
- package/actions/dist/names.d.ts.map +1 -0
- package/actions/dist/names.js +334 -0
- package/actions/dist/program.d.ts.map +1 -1
- package/actions/dist/program.js +115 -5
- package/actions/dist/registry.d.ts +10 -8
- package/actions/dist/registry.d.ts.map +1 -1
- package/actions/dist/registry.js +10 -8
- package/actions/dist/schema.d.ts.map +1 -1
- package/actions/dist/schema.js +99 -12
- package/actions/dist/semantics.d.ts +12 -2
- package/actions/dist/semantics.d.ts.map +1 -1
- package/actions/dist/semantics.js +78 -8
- package/actions/dist/spec.d.ts +30 -0
- package/actions/dist/spec.d.ts.map +1 -1
- package/actions/dist/spec.js +151 -138
- package/actions/dist/split-swap.d.ts +10 -5
- package/actions/dist/split-swap.d.ts.map +1 -1
- package/actions/dist/split-swap.js +48 -7
- package/actions/dist/to-quote.d.ts +14 -5
- package/actions/dist/to-quote.d.ts.map +1 -1
- package/actions/dist/to-quote.js +210 -244
- package/actions/dist/to-sauce.d.ts +18 -4
- package/actions/dist/to-sauce.d.ts.map +1 -1
- package/actions/dist/to-sauce.js +232 -205
- package/actions/dist/types.d.ts +245 -147
- package/actions/dist/types.d.ts.map +1 -1
- package/actions/dist/types.js +4 -0
- package/docs/README.md +38 -0
- package/docs/api/README.md +37 -23
- package/docs/api/compiler.md +53 -12
- package/docs/api/contracts.md +105 -0
- package/docs/api/coverage.md +96 -57
- package/docs/api/router.md +238 -0
- package/docs/api/routes.md +31 -22
- package/docs/concepts/architecture.md +26 -3
- package/docs/concepts/saucescript.md +35 -55
- package/docs/examples/README.md +21 -14
- package/docs/examples/action-program.ts +51 -35
- package/docs/examples/cross-chain-cascade.sauce.ts +4 -0
- package/docs/examples/cross-chain-intent.sauce.ts +2 -1
- package/docs/examples/evm-execution.ts +2 -4
- package/docs/examples/first-intent.ts +7 -2
- package/docs/examples/pot-router.ts +19 -0
- package/docs/examples/registry-names.ts +52 -0
- package/docs/examples/router-route.sauce.ts +31 -0
- package/docs/examples/router-route.ts +72 -0
- package/docs/examples/router-swap.sauce.ts +16 -0
- package/docs/examples/router-swap.ts +47 -0
- package/docs/examples/venue-where-deployed.sauce.ts +14 -0
- package/docs/guides/actions.md +230 -120
- package/docs/guides/builders-and-actions.md +20 -14
- package/docs/guides/cli.md +1446 -0
- package/docs/guides/compiling.md +19 -7
- package/docs/guides/intents.md +228 -15
- package/docs/guides/mcp.md +540 -0
- package/docs/guides/nested-intents.md +21 -6
- package/docs/guides/protocols-and-tokens.md +218 -39
- package/docs/guides/quick-start.md +5 -0
- package/docs/guides/solana.md +199 -52
- package/docs/guides/verification.md +2 -2
- package/mcp/dist/config.js +78 -0
- package/mcp/dist/config.js.map +1 -0
- package/mcp/dist/entry.js +112 -0
- package/mcp/dist/entry.js.map +1 -0
- package/mcp/dist/files.js +64 -0
- package/mcp/dist/files.js.map +1 -0
- package/mcp/dist/guard.js +262 -0
- package/mcp/dist/guard.js.map +1 -0
- package/mcp/dist/http.js +111 -0
- package/mcp/dist/http.js.map +1 -0
- package/mcp/dist/intents.js +579 -0
- package/mcp/dist/intents.js.map +1 -0
- package/mcp/dist/prompts.js +153 -0
- package/mcp/dist/prompts.js.map +1 -0
- package/mcp/dist/reach.js +98 -0
- package/mcp/dist/reach.js.map +1 -0
- package/mcp/dist/resources.js +154 -0
- package/mcp/dist/resources.js.map +1 -0
- package/mcp/dist/sdk.js +34 -0
- package/mcp/dist/sdk.js.map +1 -0
- package/mcp/dist/server.js +119 -0
- package/mcp/dist/server.js.map +1 -0
- package/mcp/dist/setup.js +189 -0
- package/mcp/dist/setup.js.map +1 -0
- package/mcp/dist/skilltools.js +520 -0
- package/mcp/dist/skilltools.js.map +1 -0
- package/mcp/dist/terms.js +93 -0
- package/mcp/dist/terms.js.map +1 -0
- package/mcp/dist/tools.js +1499 -0
- package/mcp/dist/tools.js.map +1 -0
- package/mcp/dist/wallets.js +168 -0
- package/mcp/dist/wallets.js.map +1 -0
- package/package.json +18 -13
- package/sdk/dist/artifacts/V12Deployments.json +3 -1
- package/sdk/dist/artifacts/V12EngineGate.json +1 -2
- package/sdk/dist/artifacts/V12KitchenProxy.json +1 -0
- package/sdk/dist/chains/canonical.d.ts +15 -24
- package/sdk/dist/chains/canonical.d.ts.map +1 -1
- package/sdk/dist/chains/canonical.js +18 -29
- package/sdk/dist/chains/canonical.js.map +1 -1
- package/sdk/dist/cli/actions.d.ts +29 -0
- package/sdk/dist/cli/actions.d.ts.map +1 -0
- package/sdk/dist/cli/actions.js +122 -0
- package/sdk/dist/cli/actions.js.map +1 -0
- package/sdk/dist/cli/args.d.ts +118 -0
- package/sdk/dist/cli/args.d.ts.map +1 -0
- package/sdk/dist/cli/args.js +354 -0
- package/sdk/dist/cli/args.js.map +1 -0
- package/sdk/dist/cli/assume.d.ts +51 -0
- package/sdk/dist/cli/assume.d.ts.map +1 -0
- package/sdk/dist/cli/assume.js +207 -0
- package/sdk/dist/cli/assume.js.map +1 -0
- package/sdk/dist/cli/chain.d.ts +173 -0
- package/sdk/dist/cli/chain.d.ts.map +1 -0
- package/sdk/dist/cli/chain.js +462 -0
- package/sdk/dist/cli/chain.js.map +1 -0
- package/sdk/dist/cli/commands.d.ts +226 -0
- package/sdk/dist/cli/commands.d.ts.map +1 -0
- package/sdk/dist/cli/commands.js +637 -0
- package/sdk/dist/cli/commands.js.map +1 -0
- package/sdk/dist/cli/create.d.ts +70 -0
- package/sdk/dist/cli/create.d.ts.map +1 -0
- package/sdk/dist/cli/create.js +483 -0
- package/sdk/dist/cli/create.js.map +1 -0
- package/sdk/dist/cli/diagnostics.d.ts +12 -0
- package/sdk/dist/cli/diagnostics.d.ts.map +1 -0
- package/sdk/dist/cli/diagnostics.js +225 -0
- package/sdk/dist/cli/diagnostics.js.map +1 -0
- package/sdk/dist/cli/effects.d.ts +71 -0
- package/sdk/dist/cli/effects.d.ts.map +1 -0
- package/sdk/dist/cli/effects.js +279 -0
- package/sdk/dist/cli/effects.js.map +1 -0
- package/sdk/dist/cli/fill.d.ts +83 -0
- package/sdk/dist/cli/fill.d.ts.map +1 -0
- package/sdk/dist/cli/fill.js +734 -0
- package/sdk/dist/cli/fill.js.map +1 -0
- package/sdk/dist/cli/funding.d.ts +126 -0
- package/sdk/dist/cli/funding.d.ts.map +1 -0
- package/sdk/dist/cli/funding.js +514 -0
- package/sdk/dist/cli/funding.js.map +1 -0
- package/sdk/dist/cli/globals.d.ts +16 -0
- package/sdk/dist/cli/globals.d.ts.map +1 -0
- package/sdk/dist/cli/globals.js +219 -0
- package/sdk/dist/cli/globals.js.map +1 -0
- package/sdk/dist/cli/init.d.ts +34 -0
- package/sdk/dist/cli/init.d.ts.map +1 -0
- package/sdk/dist/cli/init.js +181 -0
- package/sdk/dist/cli/init.js.map +1 -0
- package/sdk/dist/cli/inputs.d.ts +72 -0
- package/sdk/dist/cli/inputs.d.ts.map +1 -0
- package/sdk/dist/cli/inputs.js +152 -0
- package/sdk/dist/cli/inputs.js.map +1 -0
- package/sdk/dist/cli/inspect.d.ts +48 -0
- package/sdk/dist/cli/inspect.d.ts.map +1 -0
- package/sdk/dist/cli/inspect.js +536 -0
- package/sdk/dist/cli/inspect.js.map +1 -0
- package/sdk/dist/cli/intent-commands.d.ts +71 -0
- package/sdk/dist/cli/intent-commands.d.ts.map +1 -0
- package/sdk/dist/cli/intent-commands.js +698 -0
- package/sdk/dist/cli/intent-commands.js.map +1 -0
- package/sdk/dist/cli/intent-svm.d.ts +15 -0
- package/sdk/dist/cli/intent-svm.d.ts.map +1 -0
- package/sdk/dist/cli/intent-svm.js +222 -0
- package/sdk/dist/cli/intent-svm.js.map +1 -0
- package/sdk/dist/cli/intents.d.ts +43 -0
- package/sdk/dist/cli/intents.d.ts.map +1 -0
- package/sdk/dist/cli/intents.js +89 -0
- package/sdk/dist/cli/intents.js.map +1 -0
- package/sdk/dist/cli/interactive.d.ts +11 -0
- package/sdk/dist/cli/interactive.d.ts.map +1 -0
- package/sdk/dist/cli/interactive.js +161 -0
- package/sdk/dist/cli/interactive.js.map +1 -0
- package/sdk/dist/cli/lifecycle-svm.d.ts +109 -0
- package/sdk/dist/cli/lifecycle-svm.d.ts.map +1 -0
- package/sdk/dist/cli/lifecycle-svm.js +299 -0
- package/sdk/dist/cli/lifecycle-svm.js.map +1 -0
- package/sdk/dist/cli/lifecycle.d.ts +439 -0
- package/sdk/dist/cli/lifecycle.d.ts.map +1 -0
- package/sdk/dist/cli/lifecycle.js +1721 -0
- package/sdk/dist/cli/lifecycle.js.map +1 -0
- package/sdk/dist/cli/main.d.ts +3 -0
- package/sdk/dist/cli/main.d.ts.map +1 -0
- package/sdk/dist/cli/main.js +8 -0
- package/sdk/dist/cli/main.js.map +1 -0
- package/sdk/dist/cli/mcp.d.ts +66 -0
- package/sdk/dist/cli/mcp.d.ts.map +1 -0
- package/sdk/dist/cli/mcp.js +169 -0
- package/sdk/dist/cli/mcp.js.map +1 -0
- package/sdk/dist/cli/password.d.ts +54 -0
- package/sdk/dist/cli/password.d.ts.map +1 -0
- package/sdk/dist/cli/password.js +148 -0
- package/sdk/dist/cli/password.js.map +1 -0
- package/sdk/dist/cli/policy.d.ts +130 -0
- package/sdk/dist/cli/policy.d.ts.map +1 -0
- package/sdk/dist/cli/policy.js +702 -0
- package/sdk/dist/cli/policy.js.map +1 -0
- package/sdk/dist/cli/pools.d.ts +140 -0
- package/sdk/dist/cli/pools.d.ts.map +1 -0
- package/sdk/dist/cli/pools.js +658 -0
- package/sdk/dist/cli/pools.js.map +1 -0
- package/sdk/dist/cli/price.d.ts +74 -0
- package/sdk/dist/cli/price.d.ts.map +1 -0
- package/sdk/dist/cli/price.js +321 -0
- package/sdk/dist/cli/price.js.map +1 -0
- package/sdk/dist/cli/prompt.d.ts +30 -0
- package/sdk/dist/cli/prompt.d.ts.map +1 -0
- package/sdk/dist/cli/prompt.js +53 -0
- package/sdk/dist/cli/prompt.js.map +1 -0
- package/sdk/dist/cli/publish.d.ts +48 -0
- package/sdk/dist/cli/publish.d.ts.map +1 -0
- package/sdk/dist/cli/publish.js +480 -0
- package/sdk/dist/cli/publish.js.map +1 -0
- package/sdk/dist/cli/receipt.d.ts +35 -0
- package/sdk/dist/cli/receipt.d.ts.map +1 -0
- package/sdk/dist/cli/receipt.js +63 -0
- package/sdk/dist/cli/receipt.js.map +1 -0
- package/sdk/dist/cli/rehearse.d.ts +80 -0
- package/sdk/dist/cli/rehearse.d.ts.map +1 -0
- package/sdk/dist/cli/rehearse.js +265 -0
- package/sdk/dist/cli/rehearse.js.map +1 -0
- package/sdk/dist/cli/report.d.ts +69 -0
- package/sdk/dist/cli/report.d.ts.map +1 -0
- package/sdk/dist/cli/report.js +206 -0
- package/sdk/dist/cli/report.js.map +1 -0
- package/sdk/dist/cli/returned.d.ts +16 -0
- package/sdk/dist/cli/returned.d.ts.map +1 -0
- package/sdk/dist/cli/returned.js +111 -0
- package/sdk/dist/cli/returned.js.map +1 -0
- package/sdk/dist/cli/run.d.ts +40 -0
- package/sdk/dist/cli/run.d.ts.map +1 -0
- package/sdk/dist/cli/run.js +3163 -0
- package/sdk/dist/cli/run.js.map +1 -0
- package/sdk/dist/cli/signer.d.ts +72 -0
- package/sdk/dist/cli/signer.d.ts.map +1 -0
- package/sdk/dist/cli/signer.js +243 -0
- package/sdk/dist/cli/signer.js.map +1 -0
- package/sdk/dist/cli/simulate.d.ts +11 -0
- package/sdk/dist/cli/simulate.d.ts.map +1 -0
- package/sdk/dist/cli/simulate.js +246 -0
- package/sdk/dist/cli/simulate.js.map +1 -0
- package/sdk/dist/cli/skills.d.ts +77 -0
- package/sdk/dist/cli/skills.d.ts.map +1 -0
- package/sdk/dist/cli/skills.js +527 -0
- package/sdk/dist/cli/skills.js.map +1 -0
- package/sdk/dist/cli/solana.d.ts +184 -0
- package/sdk/dist/cli/solana.d.ts.map +1 -0
- package/sdk/dist/cli/solana.js +1370 -0
- package/sdk/dist/cli/solana.js.map +1 -0
- package/sdk/dist/cli/store.d.ts +60 -0
- package/sdk/dist/cli/store.d.ts.map +1 -0
- package/sdk/dist/cli/store.js +196 -0
- package/sdk/dist/cli/store.js.map +1 -0
- package/sdk/dist/cli/support.d.ts +144 -0
- package/sdk/dist/cli/support.d.ts.map +1 -0
- package/sdk/dist/cli/support.js +217 -0
- package/sdk/dist/cli/support.js.map +1 -0
- package/sdk/dist/cli/svm-effects.d.ts +50 -0
- package/sdk/dist/cli/svm-effects.d.ts.map +1 -0
- package/sdk/dist/cli/svm-effects.js +196 -0
- package/sdk/dist/cli/svm-effects.js.map +1 -0
- package/sdk/dist/cli/terminal.d.ts +42 -0
- package/sdk/dist/cli/terminal.d.ts.map +1 -0
- package/sdk/dist/cli/terminal.js +136 -0
- package/sdk/dist/cli/terminal.js.map +1 -0
- package/sdk/dist/cli/verify.d.ts +32 -0
- package/sdk/dist/cli/verify.d.ts.map +1 -0
- package/sdk/dist/cli/verify.js +185 -0
- package/sdk/dist/cli/verify.js.map +1 -0
- package/sdk/dist/cli/wallet-commands.d.ts +59 -0
- package/sdk/dist/cli/wallet-commands.d.ts.map +1 -0
- package/sdk/dist/cli/wallet-commands.js +222 -0
- package/sdk/dist/cli/wallet-commands.js.map +1 -0
- package/sdk/dist/cli/wallet-send.d.ts +38 -0
- package/sdk/dist/cli/wallet-send.d.ts.map +1 -0
- package/sdk/dist/cli/wallet-send.js +303 -0
- package/sdk/dist/cli/wallet-send.js.map +1 -0
- package/sdk/dist/cli/wallets.d.ts +79 -0
- package/sdk/dist/cli/wallets.d.ts.map +1 -0
- package/sdk/dist/cli/wallets.js +297 -0
- package/sdk/dist/cli/wallets.js.map +1 -0
- package/sdk/dist/deployments/index.d.ts +4 -62
- package/sdk/dist/deployments/index.d.ts.map +1 -1
- package/sdk/dist/deployments/index.js +4 -84
- package/sdk/dist/deployments/index.js.map +1 -1
- package/sdk/dist/deployments/pot.d.ts +17 -7
- package/sdk/dist/deployments/pot.d.ts.map +1 -1
- package/sdk/dist/deployments/pot.js +25 -10
- package/sdk/dist/deployments/pot.js.map +1 -1
- package/sdk/dist/deployments/releases.d.ts +36 -0
- package/sdk/dist/deployments/releases.d.ts.map +1 -0
- package/sdk/dist/deployments/releases.js +61 -0
- package/sdk/dist/deployments/releases.js.map +1 -0
- package/sdk/dist/deployments/releases.json +76 -0
- package/sdk/dist/deployments/v12-addresses.d.ts +13 -0
- package/sdk/dist/deployments/v12-addresses.d.ts.map +1 -1
- package/sdk/dist/deployments/v12-addresses.js +16 -3
- package/sdk/dist/deployments/v12-addresses.js.map +1 -1
- package/sdk/dist/deposit/index.d.ts +6 -6
- package/sdk/dist/deposit/index.d.ts.map +1 -1
- package/sdk/dist/deposit/index.js +1 -1
- package/sdk/dist/deposit/index.js.map +1 -1
- package/sdk/dist/deposit/params.d.ts +4 -4
- package/sdk/dist/deposit/params.d.ts.map +1 -1
- package/sdk/dist/deposit/params.js +7 -4
- package/sdk/dist/deposit/params.js.map +1 -1
- package/sdk/dist/deposit/source.d.ts +3 -30
- package/sdk/dist/deposit/source.d.ts.map +1 -1
- package/sdk/dist/deposit/source.js +7 -83
- package/sdk/dist/deposit/source.js.map +1 -1
- package/sdk/dist/deposit/templates.d.ts +1 -2
- package/sdk/dist/deposit/templates.d.ts.map +1 -1
- package/sdk/dist/deposit/templates.js +10 -2
- package/sdk/dist/deposit/templates.js.map +1 -1
- package/sdk/dist/deposit/types.d.ts +14 -12
- package/sdk/dist/deposit/types.d.ts.map +1 -1
- package/sdk/dist/deposit/types.js +6 -0
- package/sdk/dist/deposit/types.js.map +1 -1
- package/sdk/dist/descriptors/accessors.d.ts +38 -35
- package/sdk/dist/descriptors/accessors.d.ts.map +1 -1
- package/sdk/dist/descriptors/accessors.js +16 -0
- package/sdk/dist/descriptors/accessors.js.map +1 -1
- package/sdk/dist/descriptors/call.d.ts +66 -14
- package/sdk/dist/descriptors/call.d.ts.map +1 -1
- package/sdk/dist/descriptors/call.js +94 -13
- package/sdk/dist/descriptors/call.js.map +1 -1
- package/sdk/dist/descriptors/contracts.generated.d.ts +3393 -0
- package/sdk/dist/descriptors/contracts.generated.d.ts.map +1 -0
- package/sdk/dist/descriptors/contracts.generated.js +728 -0
- package/sdk/dist/descriptors/contracts.generated.js.map +1 -0
- package/sdk/dist/descriptors/derive.d.ts +20 -11
- package/sdk/dist/descriptors/derive.d.ts.map +1 -1
- package/sdk/dist/descriptors/derive.js +68 -30
- package/sdk/dist/descriptors/derive.js.map +1 -1
- package/sdk/dist/descriptors/index.d.ts +6 -7
- package/sdk/dist/descriptors/index.d.ts.map +1 -1
- package/sdk/dist/descriptors/index.js +2 -2
- package/sdk/dist/descriptors/index.js.map +1 -1
- package/sdk/dist/descriptors/links.d.ts +23 -214
- package/sdk/dist/descriptors/links.d.ts.map +1 -1
- package/sdk/dist/descriptors/links.js +1 -232
- package/sdk/dist/descriptors/links.js.map +1 -1
- package/sdk/dist/descriptors/query.d.ts +1 -1
- package/sdk/dist/descriptors/query.d.ts.map +1 -1
- package/sdk/dist/descriptors/query.js +1 -1
- package/sdk/dist/descriptors/query.js.map +1 -1
- package/sdk/dist/descriptors/registry.d.ts +2 -5
- package/sdk/dist/descriptors/registry.d.ts.map +1 -1
- package/sdk/dist/descriptors/registry.js +11 -66
- package/sdk/dist/descriptors/registry.js.map +1 -1
- package/sdk/dist/embedded/resolve.d.ts +4 -4
- package/sdk/dist/embedded/resolve.d.ts.map +1 -1
- package/sdk/dist/embedded/resolve.js +12 -8
- package/sdk/dist/embedded/resolve.js.map +1 -1
- package/sdk/dist/embedded/skills.generated.d.ts +1 -1
- package/sdk/dist/embedded/skills.generated.d.ts.map +1 -1
- package/sdk/dist/embedded/skills.generated.js +137 -136
- package/sdk/dist/embedded/skills.generated.js.map +1 -1
- package/sdk/dist/embedded/sources.generated.d.ts.map +1 -1
- package/sdk/dist/embedded/sources.generated.js +40 -6
- package/sdk/dist/embedded/sources.generated.js.map +1 -1
- package/sdk/dist/evm/engine.d.ts +813 -10
- package/sdk/dist/evm/engine.d.ts.map +1 -1
- package/sdk/dist/evm/engine.js +127 -8
- package/sdk/dist/evm/engine.js.map +1 -1
- package/sdk/dist/index.d.ts +3 -2
- package/sdk/dist/index.d.ts.map +1 -1
- package/sdk/dist/index.js +6 -2
- package/sdk/dist/index.js.map +1 -1
- package/sdk/dist/price.d.ts +40 -0
- package/sdk/dist/price.d.ts.map +1 -0
- package/sdk/dist/price.js +101 -0
- package/sdk/dist/price.js.map +1 -0
- package/sdk/dist/protocols/aerodrome/abis.d.ts +76 -0
- package/sdk/dist/protocols/aerodrome/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/aerodrome/abis.js +61 -0
- package/sdk/dist/protocols/aerodrome/abis.js.map +1 -1
- package/sdk/dist/protocols/aerodrome-slipstream/abis.d.ts +70 -0
- package/sdk/dist/protocols/aerodrome-slipstream/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/aerodrome-slipstream/abis.js +54 -0
- package/sdk/dist/protocols/aerodrome-slipstream/abis.js.map +1 -1
- package/sdk/dist/protocols/camelot/abis.d.ts +178 -0
- package/sdk/dist/protocols/camelot/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/camelot/abis.js +139 -0
- package/sdk/dist/protocols/camelot/abis.js.map +1 -1
- package/sdk/dist/protocols/eco-routes/abis.d.ts +792 -50
- package/sdk/dist/protocols/eco-routes/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/eco-routes/abis.js +1058 -49
- package/sdk/dist/protocols/eco-routes/abis.js.map +1 -1
- package/sdk/dist/protocols/eco-routes/addresses.generated.d.ts +44 -61
- package/sdk/dist/protocols/eco-routes/addresses.generated.d.ts.map +1 -1
- package/sdk/dist/protocols/eco-routes/addresses.generated.js +45 -62
- package/sdk/dist/protocols/eco-routes/addresses.generated.js.map +1 -1
- package/sdk/dist/protocols/eco-routes/lookup.d.ts +10 -0
- package/sdk/dist/protocols/eco-routes/lookup.d.ts.map +1 -1
- package/sdk/dist/protocols/eco-routes/lookup.js +16 -0
- package/sdk/dist/protocols/eco-routes/lookup.js.map +1 -1
- package/sdk/dist/protocols/maverick/abis.d.ts +77 -0
- package/sdk/dist/protocols/maverick/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/maverick/abis.js +58 -0
- package/sdk/dist/protocols/maverick/abis.js.map +1 -1
- package/sdk/dist/protocols/maverick/addresses.d.ts.map +1 -1
- package/sdk/dist/protocols/maverick/addresses.js +4 -0
- package/sdk/dist/protocols/maverick/addresses.js.map +1 -1
- package/sdk/dist/protocols/pancakeswap-v2/abis.d.ts +52 -0
- package/sdk/dist/protocols/pancakeswap-v2/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/pancakeswap-v2/abis.js +43 -0
- package/sdk/dist/protocols/pancakeswap-v2/abis.js.map +1 -1
- package/sdk/dist/protocols/pancakeswap-v3/abis.d.ts +73 -0
- package/sdk/dist/protocols/pancakeswap-v3/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/pancakeswap-v3/abis.js +56 -0
- package/sdk/dist/protocols/pancakeswap-v3/abis.js.map +1 -1
- package/sdk/dist/protocols/permit2/abis.d.ts +113 -0
- package/sdk/dist/protocols/permit2/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/permit2/abis.js +63 -0
- package/sdk/dist/protocols/permit2/abis.js.map +1 -1
- package/sdk/dist/protocols/quickswap/abis.d.ts +148 -0
- package/sdk/dist/protocols/quickswap/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/quickswap/abis.js +119 -0
- package/sdk/dist/protocols/quickswap/abis.js.map +1 -1
- package/sdk/dist/protocols/sushiswap-v2/abis.d.ts +52 -0
- package/sdk/dist/protocols/sushiswap-v2/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/sushiswap-v2/abis.js +42 -0
- package/sdk/dist/protocols/sushiswap-v2/abis.js.map +1 -1
- package/sdk/dist/protocols/synthra-v3/abis.d.ts +73 -0
- package/sdk/dist/protocols/synthra-v3/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/synthra-v3/abis.js +55 -0
- package/sdk/dist/protocols/synthra-v3/abis.js.map +1 -1
- package/sdk/dist/protocols/trader-joe/abis.d.ts +133 -0
- package/sdk/dist/protocols/trader-joe/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/trader-joe/abis.js +101 -0
- package/sdk/dist/protocols/trader-joe/abis.js.map +1 -1
- package/sdk/dist/protocols/trader-joe/addresses.d.ts.map +1 -1
- package/sdk/dist/protocols/trader-joe/addresses.js +5 -0
- package/sdk/dist/protocols/trader-joe/addresses.js.map +1 -1
- package/sdk/dist/protocols/uniswap-v2/abis.d.ts +52 -0
- package/sdk/dist/protocols/uniswap-v2/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/uniswap-v2/abis.js +44 -0
- package/sdk/dist/protocols/uniswap-v2/abis.js.map +1 -1
- package/sdk/dist/protocols/uniswap-v3/abis.d.ts +73 -0
- package/sdk/dist/protocols/uniswap-v3/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/uniswap-v3/abis.js +55 -0
- package/sdk/dist/protocols/uniswap-v3/abis.js.map +1 -1
- package/sdk/dist/protocols/uniswap-v4/abis.d.ts +247 -0
- package/sdk/dist/protocols/uniswap-v4/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/uniswap-v4/abis.js +167 -0
- package/sdk/dist/protocols/uniswap-v4/abis.js.map +1 -1
- package/sdk/dist/protocols/uniswap-v4/addresses.d.ts.map +1 -1
- package/sdk/dist/protocols/uniswap-v4/addresses.js +50 -0
- package/sdk/dist/protocols/uniswap-v4/addresses.js.map +1 -1
- package/sdk/dist/protocols/unitflow-v3/abis.d.ts +73 -0
- package/sdk/dist/protocols/unitflow-v3/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/unitflow-v3/abis.js +56 -0
- package/sdk/dist/protocols/unitflow-v3/abis.js.map +1 -1
- package/sdk/dist/protocols/velodrome/abis.d.ts +76 -0
- package/sdk/dist/protocols/velodrome/abis.d.ts.map +1 -1
- package/sdk/dist/protocols/velodrome/abis.js +61 -0
- package/sdk/dist/protocols/velodrome/abis.js.map +1 -1
- package/sdk/dist/recipes/cctp-split.sauce.ts +2 -2
- package/sdk/dist/recipes/plain-transfer.sauce.ts +2 -2
- package/sdk/dist/routes/accessor-index.d.ts +2 -2
- package/sdk/dist/routes/accessor-index.d.ts.map +1 -1
- package/sdk/dist/routes/accessor-index.js +4 -3
- package/sdk/dist/routes/accessor-index.js.map +1 -1
- package/sdk/dist/routes/ambient.d.ts +5 -0
- package/sdk/dist/routes/ambient.d.ts.map +1 -1
- package/sdk/dist/routes/ambient.js +20 -0
- package/sdk/dist/routes/ambient.js.map +1 -1
- package/sdk/dist/routes/ast-walk.d.ts +17 -3
- package/sdk/dist/routes/ast-walk.d.ts.map +1 -1
- package/sdk/dist/routes/ast-walk.js +24 -2
- package/sdk/dist/routes/ast-walk.js.map +1 -1
- package/sdk/dist/routes/available.d.ts +43 -0
- package/sdk/dist/routes/available.d.ts.map +1 -0
- package/sdk/dist/routes/available.js +230 -0
- package/sdk/dist/routes/available.js.map +1 -0
- package/sdk/dist/routes/builtins.generated.d.ts +180 -0
- package/sdk/dist/routes/builtins.generated.d.ts.map +1 -0
- package/sdk/dist/routes/builtins.generated.js +2 -0
- package/sdk/dist/routes/builtins.generated.js.map +1 -0
- package/sdk/dist/routes/chain-exports.generated.d.ts +13 -8
- package/sdk/dist/routes/chain-exports.generated.d.ts.map +1 -1
- package/sdk/dist/routes/chain-exports.generated.js.map +1 -1
- package/sdk/dist/routes/closure.d.ts.map +1 -1
- package/sdk/dist/routes/closure.js +13 -26
- package/sdk/dist/routes/closure.js.map +1 -1
- package/sdk/dist/routes/composed.d.ts.map +1 -1
- package/sdk/dist/routes/composed.js +20 -8
- package/sdk/dist/routes/composed.js.map +1 -1
- package/sdk/dist/routes/encode.d.ts +17 -0
- package/sdk/dist/routes/encode.d.ts.map +1 -1
- package/sdk/dist/routes/encode.js +14 -11
- package/sdk/dist/routes/encode.js.map +1 -1
- package/sdk/dist/routes/entry.d.ts +76 -0
- package/sdk/dist/routes/entry.d.ts.map +1 -0
- package/sdk/dist/routes/entry.js +478 -0
- package/sdk/dist/routes/entry.js.map +1 -0
- package/sdk/dist/routes/index.d.ts +19 -12
- package/sdk/dist/routes/index.d.ts.map +1 -1
- package/sdk/dist/routes/index.js +11 -8
- package/sdk/dist/routes/index.js.map +1 -1
- package/sdk/dist/routes/intent-body.d.ts +97 -0
- package/sdk/dist/routes/intent-body.d.ts.map +1 -0
- package/sdk/dist/routes/intent-body.js +441 -0
- package/sdk/dist/routes/intent-body.js.map +1 -0
- package/sdk/dist/routes/intent-dsl.d.ts +21 -6
- package/sdk/dist/routes/intent-dsl.d.ts.map +1 -1
- package/sdk/dist/routes/intent-dsl.js +34 -17
- package/sdk/dist/routes/intent-dsl.js.map +1 -1
- package/sdk/dist/routes/intent-sugar.d.ts +77 -4
- package/sdk/dist/routes/intent-sugar.d.ts.map +1 -1
- package/sdk/dist/routes/intent-sugar.js +318 -129
- package/sdk/dist/routes/intent-sugar.js.map +1 -1
- package/sdk/dist/routes/intent.d.ts +13 -1
- package/sdk/dist/routes/intent.d.ts.map +1 -1
- package/sdk/dist/routes/intent.js +37 -1
- package/sdk/dist/routes/intent.js.map +1 -1
- package/sdk/dist/routes/nest.d.ts +3 -2
- package/sdk/dist/routes/nest.d.ts.map +1 -1
- package/sdk/dist/routes/nest.js +5 -3
- package/sdk/dist/routes/nest.js.map +1 -1
- package/sdk/dist/routes/parse.d.ts +6 -0
- package/sdk/dist/routes/parse.d.ts.map +1 -0
- package/sdk/dist/routes/parse.js +39 -0
- package/sdk/dist/routes/parse.js.map +1 -0
- package/sdk/dist/routes/portal.d.ts +258 -4
- package/sdk/dist/routes/portal.d.ts.map +1 -1
- package/sdk/dist/routes/portal.js +588 -9
- package/sdk/dist/routes/portal.js.map +1 -1
- package/sdk/dist/routes/protocol-rewrite.d.ts +71 -1
- package/sdk/dist/routes/protocol-rewrite.d.ts.map +1 -1
- package/sdk/dist/routes/protocol-rewrite.js +178 -54
- package/sdk/dist/routes/protocol-rewrite.js.map +1 -1
- package/sdk/dist/routes/rs-compile.d.ts +25 -22
- package/sdk/dist/routes/rs-compile.d.ts.map +1 -1
- package/sdk/dist/routes/rs-compile.js +55 -49
- package/sdk/dist/routes/rs-compile.js.map +1 -1
- package/sdk/dist/routes/sauce-calls.d.ts +26 -12
- package/sdk/dist/routes/sauce-calls.d.ts.map +1 -1
- package/sdk/dist/routes/sauce-calls.js +16 -23
- package/sdk/dist/routes/sauce-calls.js.map +1 -1
- package/sdk/dist/routes/sauce-route.d.ts +74 -7
- package/sdk/dist/routes/sauce-route.d.ts.map +1 -1
- package/sdk/dist/routes/sauce-route.js +225 -75
- package/sdk/dist/routes/sauce-route.js.map +1 -1
- package/sdk/dist/routes/source-globals.d.ts +107 -0
- package/sdk/dist/routes/source-globals.d.ts.map +1 -0
- package/sdk/dist/routes/source-globals.generated.d.ts +5601 -933
- package/sdk/dist/routes/source-globals.generated.d.ts.map +1 -1
- package/sdk/dist/routes/source-globals.generated.js +3 -4
- package/sdk/dist/routes/source-globals.generated.js.map +1 -1
- package/sdk/dist/routes/source-globals.js +175 -0
- package/sdk/dist/routes/source-globals.js.map +1 -0
- package/sdk/dist/routes/stock-tokens.d.ts +89 -0
- package/sdk/dist/routes/stock-tokens.d.ts.map +1 -0
- package/sdk/dist/routes/stock-tokens.generated.d.ts +7 -0
- package/sdk/dist/routes/stock-tokens.generated.d.ts.map +1 -0
- package/sdk/dist/routes/stock-tokens.generated.js +3664 -0
- package/sdk/dist/routes/stock-tokens.generated.js.map +1 -0
- package/sdk/dist/routes/stock-tokens.js +89 -0
- package/sdk/dist/routes/stock-tokens.js.map +1 -0
- package/sdk/dist/routes/token-registry.d.ts +68 -8
- package/sdk/dist/routes/token-registry.d.ts.map +1 -1
- package/sdk/dist/routes/token-registry.js +218 -32
- package/sdk/dist/routes/token-registry.js.map +1 -1
- package/sdk/dist/routes/token-rewrite.d.ts +1 -1
- package/sdk/dist/routes/token-rewrite.d.ts.map +1 -1
- package/sdk/dist/routes/token-rewrite.js +5 -9
- package/sdk/dist/routes/token-rewrite.js.map +1 -1
- package/sdk/dist/routes/unknown-global.d.ts +32 -0
- package/sdk/dist/routes/unknown-global.d.ts.map +1 -0
- package/sdk/dist/routes/unknown-global.js +106 -0
- package/sdk/dist/routes/unknown-global.js.map +1 -0
- package/sdk/dist/routes/vault.d.ts +38 -8
- package/sdk/dist/routes/vault.d.ts.map +1 -1
- package/sdk/dist/routes/vault.js +47 -8
- package/sdk/dist/routes/vault.js.map +1 -1
- package/sdk/dist/sauce-script/builtins.d.ts +309 -0
- package/sdk/dist/sauce-script/declarations.d.ts +3 -0
- package/sdk/dist/sauce-script/declarations.d.ts.map +1 -0
- package/sdk/dist/sauce-script/declarations.js +229 -0
- package/sdk/dist/sauce-script/declarations.js.map +1 -0
- package/sdk/dist/sauce-script/index.d.ts +2714 -0
- package/sdk/dist/sauce-script/ts-plugin.cjs +85 -0
- package/sdk/dist/skills/loader.d.ts.map +1 -1
- package/sdk/dist/skills/loader.js +4 -3
- package/sdk/dist/skills/loader.js.map +1 -1
- package/sdk/dist/std/router/balancer-v2-vault.abi.json +78 -0
- package/sdk/dist/std/router/curve-cryptoswap.abi.json +29 -0
- package/sdk/dist/std/router/curve-stableswap.abi.json +29 -0
- package/sdk/dist/std/router/dodo-v2-pool.abi.json +39 -0
- package/sdk/dist/std/router/lb-pair.abi.json +55 -0
- package/sdk/dist/std/router/package.json +7 -0
- package/sdk/dist/std/router/router.evm.js +567 -0
- package/sdk/dist/std/router/sauce-router.abi.json +202 -0
- package/sdk/dist/std/router/uniswap-v2-pair.abi.json +49 -0
- package/sdk/dist/std/router/woo-pp-v2.abi.json +42 -0
- package/sdk/dist/std/token/permit2.abi.json +226 -0
- package/sdk/dist/std/token/token.evm.js +73 -0
- package/sdk/dist/std/token/token.svm.js +194 -41
- package/sdk/dist/svm/client.d.ts +62 -15
- package/sdk/dist/svm/client.d.ts.map +1 -1
- package/sdk/dist/svm/client.js +103 -42
- package/sdk/dist/svm/client.js.map +1 -1
- package/sdk/dist/svm/engine.d.ts +66 -5
- package/sdk/dist/svm/engine.d.ts.map +1 -1
- package/sdk/dist/svm/engine.js +73 -5
- package/sdk/dist/svm/engine.js.map +1 -1
- package/sdk/dist/svm/index.d.ts +2 -0
- package/sdk/dist/svm/index.d.ts.map +1 -1
- package/sdk/dist/svm/index.js +2 -0
- package/sdk/dist/svm/index.js.map +1 -1
- package/sdk/dist/svm/instructions.d.ts +72 -1
- package/sdk/dist/svm/instructions.d.ts.map +1 -1
- package/sdk/dist/svm/instructions.js +81 -2
- package/sdk/dist/svm/instructions.js.map +1 -1
- package/sdk/dist/svm/kitchen.d.ts +20 -1
- package/sdk/dist/svm/kitchen.d.ts.map +1 -1
- package/sdk/dist/svm/kitchen.js +47 -1
- package/sdk/dist/svm/kitchen.js.map +1 -1
- package/sdk/dist/svm/portal.d.ts +250 -0
- package/sdk/dist/svm/portal.d.ts.map +1 -0
- package/sdk/dist/svm/portal.js +462 -0
- package/sdk/dist/svm/portal.js.map +1 -0
- package/sdk/dist/svm/send.d.ts +18 -2
- package/sdk/dist/svm/send.d.ts.map +1 -1
- package/sdk/dist/svm/send.js +28 -3
- package/sdk/dist/svm/send.js.map +1 -1
- package/sdk/dist/svm/token-accounts.d.ts +49 -0
- package/sdk/dist/svm/token-accounts.d.ts.map +1 -0
- package/sdk/dist/svm/token-accounts.js +58 -0
- package/sdk/dist/svm/token-accounts.js.map +1 -0
- package/sdk/dist/svm/token-extensions.d.ts +18 -7
- package/sdk/dist/svm/token-extensions.d.ts.map +1 -1
- package/sdk/dist/svm/token-extensions.js +58 -5
- package/sdk/dist/svm/token-extensions.js.map +1 -1
- package/sdk/dist/token/evm.js +1 -1
- package/sdk/dist/token/index.d.ts +1 -1
- package/sdk/dist/token/index.js +1 -1
- package/sdk/dist/token/params.js +1 -1
- package/sdk/dist/token/source.js +3 -3
- package/sdk/dist/token/source.js.map +1 -1
- package/sdk/dist/token/types.d.ts +2 -2
- package/sdk/dist/token/types.js +2 -2
- package/sdk/src/protocols/aerodrome/AerodromePoolABI.json +105 -0
- package/sdk/src/protocols/aerodrome/abis.ts +62 -0
- package/sdk/src/protocols/aerodrome-slipstream/AerodromeSlipstreamPoolABI.json +96 -0
- package/sdk/src/protocols/aerodrome-slipstream/abis.ts +55 -0
- package/sdk/src/protocols/camelot/CamelotV2FactoryABI.json +25 -0
- package/sdk/src/protocols/camelot/CamelotV2PairABI.json +109 -0
- package/sdk/src/protocols/camelot/CamelotV3FactoryABI.json +25 -0
- package/sdk/src/protocols/camelot/CamelotV3PoolABI.json +92 -0
- package/sdk/src/protocols/camelot/abis.ts +143 -0
- package/sdk/src/protocols/eco-routes/PortalABI.json +1448 -0
- package/sdk/src/protocols/eco-routes/ProverABI.json +162 -0
- package/sdk/src/protocols/eco-routes/abis.ts +1060 -51
- package/sdk/src/protocols/eco-routes/addresses.generated.ts +45 -62
- package/sdk/src/protocols/eco-routes/lookup.ts +18 -0
- package/sdk/src/protocols/maverick/MaverickV2PoolABI.json +107 -0
- package/sdk/src/protocols/maverick/abis.ts +59 -0
- package/sdk/src/protocols/maverick/addresses.ts +4 -0
- package/sdk/src/protocols/pancakeswap-v2/PancakeSwapV2PairABI.json +72 -0
- package/sdk/src/protocols/pancakeswap-v2/abis.ts +44 -0
- package/sdk/src/protocols/pancakeswap-v3/PancakeSwapV3PoolABI.json +100 -0
- package/sdk/src/protocols/pancakeswap-v3/abis.ts +57 -0
- package/sdk/src/protocols/permit2/Permit2ABI.json +154 -0
- package/sdk/src/protocols/permit2/abis.ts +63 -0
- package/sdk/src/protocols/quickswap/QuickSwapV2FactoryABI.json +25 -0
- package/sdk/src/protocols/quickswap/QuickSwapV2PairABI.json +72 -0
- package/sdk/src/protocols/quickswap/QuickSwapV3FactoryABI.json +25 -0
- package/sdk/src/protocols/quickswap/QuickSwapV3PoolABI.json +88 -0
- package/sdk/src/protocols/quickswap/abis.ts +123 -0
- package/sdk/src/protocols/sushiswap-v2/SushiSwapV2PairABI.json +72 -0
- package/sdk/src/protocols/sushiswap-v2/abis.ts +43 -0
- package/sdk/src/protocols/synthra-v3/SynthraV3PoolABI.json +100 -0
- package/sdk/src/protocols/synthra-v3/abis.ts +56 -0
- package/sdk/src/protocols/trader-joe/LBPairABI.json +185 -0
- package/sdk/src/protocols/trader-joe/abis.ts +102 -0
- package/sdk/src/protocols/trader-joe/addresses.ts +5 -0
- package/sdk/src/protocols/uniswap-v2/UniswapV2PairABI.json +72 -0
- package/sdk/src/protocols/uniswap-v2/abis.ts +45 -0
- package/sdk/src/protocols/uniswap-v3/UniswapV3PoolABI.json +100 -0
- package/sdk/src/protocols/uniswap-v3/abis.ts +56 -0
- package/sdk/src/protocols/uniswap-v4/UniswapV4PoolManagerABI.json +38 -0
- package/sdk/src/protocols/uniswap-v4/UniswapV4StateViewABI.json +307 -0
- package/sdk/src/protocols/uniswap-v4/abis.ts +168 -0
- package/sdk/src/protocols/uniswap-v4/addresses.ts +50 -0
- package/sdk/src/protocols/unitflow-v3/UnitFlowV3PoolABI.json +100 -0
- package/sdk/src/protocols/unitflow-v3/abis.ts +57 -0
- package/sdk/src/protocols/velodrome/VelodromePoolABI.json +105 -0
- package/sdk/src/protocols/velodrome/abis.ts +62 -0
- package/skills/sauce-actions/SKILL.md +166 -0
- package/skills/sauce-actions/examples/swap-and-supply.json +24 -0
- package/skills/sauce-actions/examples/swap-by-key.json +15 -0
- package/skills/sauce-actions/references/actions.md +731 -0
- package/skills/sauce-chains/SKILL.md +137 -0
- package/skills/sauce-chains/examples/chains.sauce.ts +25 -0
- package/skills/sauce-chains/references/arbitrum.md +158 -0
- package/skills/sauce-chains/references/arc.md +107 -0
- package/skills/sauce-chains/references/aurora.md +33 -0
- package/skills/sauce-chains/references/avalanche.md +106 -0
- package/skills/sauce-chains/references/base-stocks.md +77 -0
- package/skills/sauce-chains/references/base.md +141 -0
- package/skills/sauce-chains/references/berachain.md +33 -0
- package/skills/sauce-chains/references/blast.md +60 -0
- package/skills/sauce-chains/references/boba.md +33 -0
- package/skills/sauce-chains/references/bsc.md +97 -0
- package/skills/sauce-chains/references/celo.md +57 -0
- package/skills/sauce-chains/references/core.md +33 -0
- package/skills/sauce-chains/references/cronos.md +33 -0
- package/skills/sauce-chains/references/ethereum-stocks.md +1741 -0
- package/skills/sauce-chains/references/ethereum.md +255 -0
- package/skills/sauce-chains/references/evmos.md +33 -0
- package/skills/sauce-chains/references/fantom.md +61 -0
- package/skills/sauce-chains/references/fuse.md +33 -0
- package/skills/sauce-chains/references/gnosis.md +57 -0
- package/skills/sauce-chains/references/index.md +58 -0
- package/skills/sauce-chains/references/ink.md +55 -0
- package/skills/sauce-chains/references/kava.md +33 -0
- package/skills/sauce-chains/references/klaytn.md +33 -0
- package/skills/sauce-chains/references/linea.md +65 -0
- package/skills/sauce-chains/references/manta.md +33 -0
- package/skills/sauce-chains/references/mantle.md +33 -0
- package/skills/sauce-chains/references/metis.md +54 -0
- package/skills/sauce-chains/references/mode.md +55 -0
- package/skills/sauce-chains/references/monad.md +79 -0
- package/skills/sauce-chains/references/moonbeam.md +33 -0
- package/skills/sauce-chains/references/opbnb.md +55 -0
- package/skills/sauce-chains/references/optimism.md +123 -0
- package/skills/sauce-chains/references/plasma.md +35 -0
- package/skills/sauce-chains/references/polygon.md +123 -0
- package/skills/sauce-chains/references/pulsechain.md +33 -0
- package/skills/sauce-chains/references/ronin.md +35 -0
- package/skills/sauce-chains/references/scroll.md +62 -0
- package/skills/sauce-chains/references/sei.md +55 -0
- package/skills/sauce-chains/references/solana-stocks.md +1812 -0
- package/skills/sauce-chains/references/solana.md +56 -0
- package/skills/sauce-chains/references/sonic.md +57 -0
- package/skills/sauce-chains/references/unichain.md +61 -0
- package/skills/sauce-chains/references/zetachain.md +33 -0
- package/skills/sauce-chains/references/zksync.md +59 -0
- package/skills/sauce-chains/references/zora.md +57 -0
- package/skills/sauce-cli/SKILL.md +366 -0
- package/skills/sauce-cli/examples/pay.sauce.ts +23 -0
- package/skills/sauce-cli/examples/split.sauce.ts +30 -0
- package/skills/sauce-distributed-swap/SKILL.md +392 -0
- package/skills/sauce-distributed-swap/examples/distributed-swap.mts +251 -0
- package/skills/sauce-distributed-swap/examples/distributed-swap.sauce.ts +115 -0
- package/skills/sauce-examples/SKILL.md +96 -0
- package/skills/sauce-globals/SKILL.md +213 -0
- package/skills/sauce-globals/examples/globals.mts +111 -0
- package/skills/sauce-globals/examples/globals.sauce.ts +47 -0
- package/skills/sauce-globals/references/chains.md +53 -0
- package/skills/sauce-globals/references/protocols.md +405 -0
- package/skills/sauce-globals/references/stocks.md +3635 -0
- package/skills/sauce-globals/references/tokens.md +53 -0
- package/skills/sauce-intents/SKILL.md +505 -0
- package/skills/sauce-intents/examples/cross-chain.sauce.ts +37 -0
- package/skills/sauce-intents/examples/fund-by-transfer.sauce.ts +54 -0
- package/skills/sauce-intents/examples/intents.mts +343 -0
- package/skills/sauce-intents/examples/swap-on-base.sauce.ts +135 -0
- package/skills/sauce-intents/references/portal.md +77 -0
- package/skills/sauce-overview/SKILL.md +161 -0
- package/skills/sauce-protocols/SKILL.md +118 -0
- package/skills/sauce-protocols/examples/protocols.mts +77 -0
- package/skills/sauce-protocols/examples/protocols.sauce.ts +27 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/aave-v2.md +35 -17
- package/skills/sauce-protocols/references/aave-v3.md +144 -0
- package/skills/sauce-protocols/references/aave-v4.md +50 -0
- package/skills/sauce-protocols/references/abracadabra.md +72 -0
- package/skills/sauce-protocols/references/across.md +73 -0
- package/skills/sauce-protocols/references/aerodrome-slipstream.md +50 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/aerodrome.md +43 -24
- package/skills/sauce-protocols/references/aevo.md +49 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/alchemix.md +10 -25
- package/{sdk/src/skills → skills/sauce-protocols/references}/ambient.md +14 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/arbitrum-bridge.md +11 -14
- package/{sdk/src/skills → skills/sauce-protocols/references}/arrakis.md +10 -26
- package/skills/sauce-protocols/references/axelar.md +56 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/balancer-v2.md +13 -29
- package/{sdk/src/skills → skills/sauce-protocols/references}/base-bridge.md +11 -16
- package/{sdk/src/skills → skills/sauce-protocols/references}/baseswap.md +12 -19
- package/{sdk/src/skills → skills/sauce-protocols/references}/beefy.md +10 -30
- package/{sdk/src/skills → skills/sauce-protocols/references}/benqi.md +11 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/camelot.md +13 -27
- package/{sdk/src/skills → skills/sauce-protocols/references}/cbeth.md +10 -22
- package/skills/sauce-protocols/references/cctp.md +47 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/celer.md +11 -18
- package/{sdk/src/skills → skills/sauce-protocols/references}/chainlink-ccip.md +11 -21
- package/skills/sauce-protocols/references/chainlink.md +47 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/circle-gateway.md +12 -38
- package/{sdk/src/skills → skills/sauce-protocols/references}/compound-v2.md +11 -25
- package/{sdk/src/skills → skills/sauce-protocols/references}/compound-v3.md +43 -27
- package/{sdk/src/skills → skills/sauce-protocols/references}/connext.md +11 -15
- package/{sdk/src/skills → skills/sauce-protocols/references}/convex.md +10 -28
- package/{sdk/src/skills → skills/sauce-protocols/references}/cowswap.md +12 -19
- package/{sdk/src/skills → skills/sauce-protocols/references}/crvusd.md +10 -19
- package/skills/sauce-protocols/references/curve.md +98 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/debridge.md +11 -33
- package/{sdk/src/skills → skills/sauce-protocols/references}/dodo.md +13 -18
- package/skills/sauce-protocols/references/eigenlayer.md +48 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/ens.md +10 -26
- package/{sdk/src/skills → skills/sauce-protocols/references}/erc20.md +10 -24
- package/{sdk/src/skills → skills/sauce-protocols/references}/erc3156.md +10 -13
- package/{sdk/src/skills → skills/sauce-protocols/references}/erc4626.md +11 -27
- package/{sdk/src/skills → skills/sauce-protocols/references}/ethena.md +10 -27
- package/{sdk/src/skills → skills/sauce-protocols/references}/etherfi.md +10 -32
- package/{sdk/src/skills → skills/sauce-protocols/references}/euler-v2.md +11 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/fenix.md +12 -18
- package/{sdk/src/skills → skills/sauce-protocols/references}/fluid.md +11 -20
- package/{sdk/src/skills → skills/sauce-protocols/references}/frax-ether.md +10 -26
- package/{sdk/src/skills → skills/sauce-protocols/references}/frax.md +10 -19
- package/{sdk/src/skills → skills/sauce-protocols/references}/gains-network.md +11 -28
- package/skills/sauce-protocols/references/gamma.md +57 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/gelato.md +12 -20
- package/{sdk/src/skills → skills/sauce-protocols/references}/gho.md +10 -19
- package/{sdk/src/skills → skills/sauce-protocols/references}/gmx-v1.md +12 -34
- package/{sdk/src/skills → skills/sauce-protocols/references}/gmx-v2.md +15 -28
- package/skills/sauce-protocols/references/harvest.md +41 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/hegic.md +10 -18
- package/{sdk/src/skills → skills/sauce-protocols/references}/hop.md +11 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/hyperlane.md +11 -21
- package/skills/sauce-protocols/references/index.md +355 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/instadapp.md +10 -18
- package/skills/sauce-protocols/references/kelp.md +46 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/kim.md +12 -18
- package/{sdk/src/skills → skills/sauce-protocols/references}/kyberswap-aggregator.md +12 -35
- package/skills/sauce-protocols/references/kyberswap.md +72 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/layerbank.md +11 -26
- package/{sdk/src/skills → skills/sauce-protocols/references}/layerzero.md +11 -25
- package/{sdk/src/skills → skills/sauce-protocols/references}/level-finance.md +10 -24
- package/{sdk/src/skills → skills/sauce-protocols/references}/lido.md +10 -28
- package/{sdk/src/skills → skills/sauce-protocols/references}/lifi.md +11 -25
- package/{sdk/src/skills → skills/sauce-protocols/references}/linea-bridge.md +11 -14
- package/{sdk/src/skills → skills/sauce-protocols/references}/liquity-v1.md +10 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/liquity-v2.md +10 -19
- package/{sdk/src/skills → skills/sauce-protocols/references}/lynex.md +12 -18
- package/skills/sauce-protocols/references/maker.md +57 -0
- package/skills/sauce-protocols/references/mantle-meth.md +43 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/maverick.md +13 -25
- package/{sdk/src/skills → skills/sauce-protocols/references}/moonwell.md +11 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/morpho-blue.md +44 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/mux-protocol.md +10 -30
- package/skills/sauce-protocols/references/olympus.md +39 -0
- package/skills/sauce-protocols/references/oneinch.md +81 -0
- package/skills/sauce-protocols/references/openocean.md +69 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/optimism-bridge.md +11 -16
- package/{sdk/src/skills → skills/sauce-protocols/references}/opyn.md +10 -21
- package/{sdk/src/skills → skills/sauce-protocols/references}/pancakeswap-v2.md +39 -41
- package/skills/sauce-protocols/references/pancakeswap-v3.md +72 -0
- package/skills/sauce-protocols/references/paraswap.md +39 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/pendle.md +47 -29
- package/skills/sauce-protocols/references/permit2.md +101 -0
- package/skills/sauce-protocols/references/perpetual-protocol.md +53 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/polygon-bridge.md +11 -17
- package/{sdk/src/skills → skills/sauce-protocols/references}/premia.md +10 -19
- package/{sdk/src/skills → skills/sauce-protocols/references}/puffer.md +10 -21
- package/skills/sauce-protocols/references/pyth.md +45 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/quickswap.md +13 -27
- package/{sdk/src/skills → skills/sauce-protocols/references}/radiant.md +11 -15
- package/{sdk/src/skills → skills/sauce-protocols/references}/ramses.md +12 -18
- package/skills/sauce-protocols/references/reflexer.md +52 -0
- package/skills/sauce-protocols/references/registry/aave-v2.md +43 -0
- package/skills/sauce-protocols/references/registry/aave-v3.md +62 -0
- package/skills/sauce-protocols/references/registry/aave-v4.md +80 -0
- package/skills/sauce-protocols/references/registry/abracadabra.md +54 -0
- package/skills/sauce-protocols/references/registry/across.md +57 -0
- package/skills/sauce-protocols/references/registry/aerodrome-slipstream.md +72 -0
- package/skills/sauce-protocols/references/registry/aerodrome.md +58 -0
- package/skills/sauce-protocols/references/registry/aevo.md +39 -0
- package/skills/sauce-protocols/references/registry/alchemix.md +46 -0
- package/skills/sauce-protocols/references/registry/ambient.md +40 -0
- package/skills/sauce-protocols/references/registry/arbitrum-bridge.md +40 -0
- package/skills/sauce-protocols/references/registry/arrakis.md +49 -0
- package/skills/sauce-protocols/references/registry/axelar.md +65 -0
- package/skills/sauce-protocols/references/registry/balancer-v2.md +50 -0
- package/skills/sauce-protocols/references/registry/base-bridge.md +42 -0
- package/skills/sauce-protocols/references/registry/baseswap.md +40 -0
- package/skills/sauce-protocols/references/registry/beefy.md +51 -0
- package/skills/sauce-protocols/references/registry/benqi.md +49 -0
- package/skills/sauce-protocols/references/registry/camelot.md +82 -0
- package/skills/sauce-protocols/references/registry/cbeth.md +43 -0
- package/skills/sauce-protocols/references/registry/cctp.md +48 -0
- package/skills/sauce-protocols/references/registry/celer.md +44 -0
- package/skills/sauce-protocols/references/registry/chainlink-ccip.md +45 -0
- package/skills/sauce-protocols/references/registry/chainlink.md +49 -0
- package/skills/sauce-protocols/references/registry/circle-gateway.md +70 -0
- package/skills/sauce-protocols/references/registry/compound-v2.md +53 -0
- package/skills/sauce-protocols/references/registry/compound-v3.md +52 -0
- package/skills/sauce-protocols/references/registry/connext.md +41 -0
- package/skills/sauce-protocols/references/registry/convex.md +51 -0
- package/skills/sauce-protocols/references/registry/cowswap.md +40 -0
- package/skills/sauce-protocols/references/registry/crvusd.md +40 -0
- package/skills/sauce-protocols/references/registry/curve.md +81 -0
- package/skills/sauce-protocols/references/registry/debridge.md +59 -0
- package/skills/sauce-protocols/references/registry/dodo.md +39 -0
- package/skills/sauce-protocols/references/registry/eco-routes.md +65 -0
- package/skills/sauce-protocols/references/registry/eigenlayer.md +58 -0
- package/skills/sauce-protocols/references/registry/ens.md +49 -0
- package/skills/sauce-protocols/references/registry/erc20.md +44 -0
- package/skills/sauce-protocols/references/registry/erc3156.md +38 -0
- package/skills/sauce-protocols/references/registry/erc4626.md +51 -0
- package/skills/sauce-protocols/references/registry/ethena.md +50 -0
- package/skills/sauce-protocols/references/registry/etherfi.md +57 -0
- package/skills/sauce-protocols/references/registry/euler-v2.md +49 -0
- package/skills/sauce-protocols/references/registry/fenix.md +39 -0
- package/skills/sauce-protocols/references/registry/fluid.md +48 -0
- package/skills/sauce-protocols/references/registry/frax-ether.md +49 -0
- package/skills/sauce-protocols/references/registry/frax.md +40 -0
- package/skills/sauce-protocols/references/registry/gains-network.md +43 -0
- package/skills/sauce-protocols/references/registry/gamma.md +56 -0
- package/skills/sauce-protocols/references/registry/gelato.md +45 -0
- package/skills/sauce-protocols/references/registry/gho.md +40 -0
- package/skills/sauce-protocols/references/registry/gmx-v1.md +59 -0
- package/skills/sauce-protocols/references/registry/gmx-v2.md +41 -0
- package/skills/sauce-protocols/references/registry/harvest.md +44 -0
- package/skills/sauce-protocols/references/registry/hegic.md +39 -0
- package/skills/sauce-protocols/references/registry/hop.md +49 -0
- package/skills/sauce-protocols/references/registry/hyperlane.md +48 -0
- package/skills/sauce-protocols/references/registry/instadapp.md +39 -0
- package/skills/sauce-protocols/references/registry/kelp.md +47 -0
- package/skills/sauce-protocols/references/registry/kim.md +39 -0
- package/skills/sauce-protocols/references/registry/kyberswap-aggregator.md +49 -0
- package/skills/sauce-protocols/references/registry/kyberswap.md +63 -0
- package/skills/sauce-protocols/references/registry/layerbank.md +54 -0
- package/skills/sauce-protocols/references/registry/layerzero.md +49 -0
- package/skills/sauce-protocols/references/registry/level-finance.md +41 -0
- package/skills/sauce-protocols/references/registry/lido.md +51 -0
- package/skills/sauce-protocols/references/registry/lifi.md +48 -0
- package/skills/sauce-protocols/references/registry/linea-bridge.md +40 -0
- package/skills/sauce-protocols/references/registry/liquity-v1.md +42 -0
- package/skills/sauce-protocols/references/registry/liquity-v2.md +40 -0
- package/skills/sauce-protocols/references/registry/lynex.md +39 -0
- package/skills/sauce-protocols/references/registry/maker.md +55 -0
- package/skills/sauce-protocols/references/registry/mantle-meth.md +48 -0
- package/skills/sauce-protocols/references/registry/maverick.md +60 -0
- package/skills/sauce-protocols/references/registry/moonwell.md +49 -0
- package/skills/sauce-protocols/references/registry/morpho-blue.md +47 -0
- package/skills/sauce-protocols/references/registry/mux-protocol.md +49 -0
- package/skills/sauce-protocols/references/registry/olympus.md +42 -0
- package/skills/sauce-protocols/references/registry/oneinch.md +45 -0
- package/skills/sauce-protocols/references/registry/openocean.md +44 -0
- package/skills/sauce-protocols/references/registry/optimism-bridge.md +42 -0
- package/skills/sauce-protocols/references/registry/opyn.md +42 -0
- package/skills/sauce-protocols/references/registry/pancakeswap-v2.md +71 -0
- package/skills/sauce-protocols/references/registry/pancakeswap-v3.md +76 -0
- package/skills/sauce-protocols/references/registry/paraswap.md +51 -0
- package/skills/sauce-protocols/references/registry/pendle.md +43 -0
- package/skills/sauce-protocols/references/registry/permit2.md +50 -0
- package/skills/sauce-protocols/references/registry/perpetual-protocol.md +49 -0
- package/skills/sauce-protocols/references/registry/polygon-bridge.md +43 -0
- package/skills/sauce-protocols/references/registry/premia.md +40 -0
- package/skills/sauce-protocols/references/registry/puffer.md +43 -0
- package/skills/sauce-protocols/references/registry/pyth.md +40 -0
- package/skills/sauce-protocols/references/registry/quickswap.md +80 -0
- package/skills/sauce-protocols/references/registry/radiant.md +41 -0
- package/skills/sauce-protocols/references/registry/ramses.md +39 -0
- package/skills/sauce-protocols/references/registry/reflexer.md +56 -0
- package/skills/sauce-protocols/references/registry/renzo.md +47 -0
- package/skills/sauce-protocols/references/registry/rocket-pool.md +49 -0
- package/skills/sauce-protocols/references/registry/sablier.md +40 -0
- package/skills/sauce-protocols/references/registry/safe.md +47 -0
- package/skills/sauce-protocols/references/registry/scroll-bridge.md +48 -0
- package/skills/sauce-protocols/references/registry/seamless.md +42 -0
- package/skills/sauce-protocols/references/registry/seaport.md +44 -0
- package/skills/sauce-protocols/references/registry/silo.md +48 -0
- package/skills/sauce-protocols/references/registry/socket.md +44 -0
- package/skills/sauce-protocols/references/registry/sommelier.md +43 -0
- package/skills/sauce-protocols/references/registry/spark.md +42 -0
- package/skills/sauce-protocols/references/registry/spookyswap.md +40 -0
- package/skills/sauce-protocols/references/registry/squid.md +45 -0
- package/skills/sauce-protocols/references/registry/stader.md +47 -0
- package/skills/sauce-protocols/references/registry/stargate.md +45 -0
- package/skills/sauce-protocols/references/registry/superfluid.md +49 -0
- package/skills/sauce-protocols/references/registry/sushiswap-v2.md +71 -0
- package/skills/sauce-protocols/references/registry/swell.md +49 -0
- package/skills/sauce-protocols/references/registry/synapse.md +46 -0
- package/skills/sauce-protocols/references/registry/syncswap.md +38 -0
- package/skills/sauce-protocols/references/registry/synthetix-v3.md +48 -0
- package/skills/sauce-protocols/references/registry/synthra-v3.md +77 -0
- package/skills/sauce-protocols/references/registry/thales.md +51 -0
- package/skills/sauce-protocols/references/registry/thena.md +39 -0
- package/skills/sauce-protocols/references/registry/thruster.md +38 -0
- package/skills/sauce-protocols/references/registry/tokemak.md +45 -0
- package/skills/sauce-protocols/references/registry/trader-joe.md +66 -0
- package/skills/sauce-protocols/references/registry/uniswap-v2.md +77 -0
- package/skills/sauce-protocols/references/registry/uniswap-v3.md +113 -0
- package/skills/sauce-protocols/references/registry/uniswap-v4.md +117 -0
- package/skills/sauce-protocols/references/registry/unitflow-v3.md +65 -0
- package/skills/sauce-protocols/references/registry/velodrome.md +58 -0
- package/skills/sauce-protocols/references/registry/venus.md +62 -0
- package/skills/sauce-protocols/references/registry/vertex.md +46 -0
- package/skills/sauce-protocols/references/registry/wormhole.md +59 -0
- package/skills/sauce-protocols/references/registry/yearn-v3.md +46 -0
- package/skills/sauce-protocols/references/registry/zerolend.md +41 -0
- package/skills/sauce-protocols/references/registry/zerox.md +44 -0
- package/skills/sauce-protocols/references/registry/zksync-bridge.md +40 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/renzo.md +10 -24
- package/{sdk/src/skills → skills/sauce-protocols/references}/rocket-pool.md +10 -26
- package/{sdk/src/skills → skills/sauce-protocols/references}/sablier.md +10 -27
- package/skills/sauce-protocols/references/safe.md +42 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/scroll-bridge.md +11 -20
- package/{sdk/src/skills → skills/sauce-protocols/references}/seamless.md +11 -16
- package/skills/sauce-protocols/references/seaport.md +38 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/silo.md +11 -20
- package/{sdk/src/skills → skills/sauce-protocols/references}/socket.md +11 -18
- package/skills/sauce-protocols/references/sommelier.md +40 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/spark.md +11 -16
- package/{sdk/src/skills → skills/sauce-protocols/references}/spookyswap.md +12 -19
- package/{sdk/src/skills → skills/sauce-protocols/references}/squid.md +11 -21
- package/skills/sauce-protocols/references/stader.md +39 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/stargate.md +11 -22
- package/{sdk/src/skills → skills/sauce-protocols/references}/superfluid.md +10 -28
- package/{sdk/src/skills → skills/sauce-protocols/references}/sushiswap-v2.md +38 -43
- package/skills/sauce-protocols/references/swell.md +49 -0
- package/skills/sauce-protocols/references/synapse.md +54 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/syncswap.md +12 -17
- package/{sdk/src/skills → skills/sauce-protocols/references}/synthetix-v3.md +10 -29
- package/skills/sauce-protocols/references/synthra-v3.md +63 -0
- package/skills/sauce-protocols/references/thales.md +58 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/thena.md +12 -18
- package/{sdk/src/skills → skills/sauce-protocols/references}/thruster.md +13 -18
- package/skills/sauce-protocols/references/tokemak.md +40 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/trader-joe.md +13 -26
- package/{sdk/src/skills → skills/sauce-protocols/references}/uniswap-v2.md +46 -44
- package/skills/sauce-protocols/references/uniswap-v3.md +188 -0
- package/skills/sauce-protocols/references/uniswap-v4.md +155 -0
- package/skills/sauce-protocols/references/unitflow-v3.md +63 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/velodrome.md +12 -24
- package/{sdk/src/skills → skills/sauce-protocols/references}/venus.md +12 -31
- package/skills/sauce-protocols/references/vertex.md +42 -0
- package/skills/sauce-protocols/references/wormhole.md +57 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/yearn-v3.md +10 -25
- package/{sdk/src/skills → skills/sauce-protocols/references}/zerolend.md +11 -15
- package/skills/sauce-protocols/references/zerox.md +39 -0
- package/{sdk/src/skills → skills/sauce-protocols/references}/zksync-bridge.md +11 -14
- package/skills/sauce-script/SKILL.md +407 -0
- package/skills/sauce-script/examples/IOracle.json +12 -0
- package/skills/sauce-script/examples/saucescript.mts +167 -0
- package/skills/sauce-script/examples/twap.sauce.ts +29 -0
- package/skills/sauce-script/references/builtins.json +823 -0
- package/skills/sauce-script/references/builtins.md +674 -0
- package/skills/sauce-solana/SKILL.md +324 -0
- package/skills/sauce-solana/examples/solana.mts +166 -0
- package/skills/sauce-solana/examples/solana.sauce.ts +45 -0
- package/skills/sauce-solana/examples/token-2022.sauce.ts +38 -0
- package/skills/sauce-swaps/SKILL.md +200 -0
- package/skills/sauce-swaps/examples/swap-leg.sauce.ts +50 -0
- package/skills/sauce-swaps/examples/swaps.mts +124 -0
- package/skills/sauce-typescript/SKILL.md +178 -0
- package/skills/sauce-typescript/examples/actions.mts +100 -0
- package/skills/sauce-typescript/examples/compiler.mts +69 -0
- package/skills/sauce-typescript/examples/cook.mts +65 -0
- package/skills/sauce-typescript/examples/verify.mts +104 -0
- package/dev-tools/README.md +0 -16
- package/dev-tools/artifacts/IERC20.json +0 -1
- package/dev-tools/artifacts/ISauceRouter.json +0 -1
- package/dev-tools/artifacts/IUniswapV3Pool.json +0 -1
- package/dev-tools/artifacts/Router.json +0 -1
- package/dev-tools/hardhat.config.cjs +0 -18
- package/dev-tools/sauce/js/add.js +0 -4
- package/dev-tools/sauce/js/call.js +0 -8
- package/dev-tools/sauce/js/erc20.js +0 -18
- package/dev-tools/sauce/js/example.js +0 -6
- package/dev-tools/sauce/js/fibonacci.js +0 -13
- package/dev-tools/sauce/ts/add.ts +0 -4
- package/dev-tools/sauce/ts/call.ts +0 -8
- package/dev-tools/sauce/ts/erc20.ts +0 -18
- package/dev-tools/sauce/ts/example.ts +0 -6
- package/dev-tools/sauce/ts/fibonacci.ts +0 -13
- package/dev-tools/sauce/ts/saucescript.d.ts +0 -1
- package/dev-tools/sauce/ts/tsconfig.json +0 -12
- package/dev-tools/scripts/deploy.ts +0 -107
- package/dev-tools/scripts/init.js +0 -132
- package/dev-tools/scripts/run.ts +0 -67
- package/dev-tools/scripts/start-fork.sh +0 -92
- package/dev-tools/scripts/start-local.sh +0 -120
- package/dev-tools/scripts/stop-local.sh +0 -40
- package/dev-tools/scripts/sync-artifacts.js +0 -46
- package/dev-tools/scripts/sync-price.ts +0 -58
- package/dev-tools/src/contracts.ts +0 -59
- package/dev-tools/src/runner.ts +0 -355
- package/dev-tools/src/svm-local.ts +0 -305
- package/dev-tools/src/sync-price.ts +0 -217
- package/sdk/dist/deployments/v12.generated.d.ts +0 -95
- package/sdk/dist/deployments/v12.generated.d.ts.map +0 -1
- package/sdk/dist/deployments/v12.generated.js +0 -50
- package/sdk/dist/deployments/v12.generated.js.map +0 -1
- package/sdk/dist/swap/index.d.ts +0 -29
- package/sdk/dist/swap/index.d.ts.map +0 -1
- package/sdk/dist/swap/index.js +0 -27
- package/sdk/dist/swap/index.js.map +0 -1
- package/sdk/dist/swap/params.d.ts +0 -29
- package/sdk/dist/swap/params.d.ts.map +0 -1
- package/sdk/dist/swap/params.js +0 -123
- package/sdk/dist/swap/params.js.map +0 -1
- package/sdk/dist/swap/source.d.ts +0 -30
- package/sdk/dist/swap/source.d.ts.map +0 -1
- package/sdk/dist/swap/source.js +0 -101
- package/sdk/dist/swap/source.js.map +0 -1
- package/sdk/dist/swap/types.d.ts +0 -160
- package/sdk/dist/swap/types.d.ts.map +0 -1
- package/sdk/dist/swap/types.js +0 -106
- package/sdk/dist/swap/types.js.map +0 -1
- package/sdk/src/skills/aave-v3.md +0 -134
- package/sdk/src/skills/aave-v4.md +0 -91
- package/sdk/src/skills/abracadabra.md +0 -93
- package/sdk/src/skills/across.md +0 -90
- package/sdk/src/skills/aerodrome-slipstream.md +0 -57
- package/sdk/src/skills/aevo.md +0 -58
- package/sdk/src/skills/axelar.md +0 -80
- package/sdk/src/skills/chainlink.md +0 -62
- package/sdk/src/skills/curve.md +0 -141
- package/sdk/src/skills/eigenlayer.md +0 -71
- package/sdk/src/skills/gamma.md +0 -79
- package/sdk/src/skills/harvest.md +0 -49
- package/sdk/src/skills/index.md +0 -299
- package/sdk/src/skills/kelp.md +0 -60
- package/sdk/src/skills/kyberswap.md +0 -100
- package/sdk/src/skills/loader.ts +0 -46
- package/sdk/src/skills/maker.md +0 -79
- package/sdk/src/skills/mantle-meth.md +0 -60
- package/sdk/src/skills/olympus.md +0 -46
- package/sdk/src/skills/oneinch.md +0 -64
- package/sdk/src/skills/openocean.md +0 -86
- package/sdk/src/skills/pancakeswap-v3.md +0 -104
- package/sdk/src/skills/paraswap.md +0 -67
- package/sdk/src/skills/permit2.md +0 -73
- package/sdk/src/skills/perpetual-protocol.md +0 -73
- package/sdk/src/skills/pyth.md +0 -58
- package/sdk/src/skills/reflexer.md +0 -73
- package/sdk/src/skills/safe.md +0 -56
- package/sdk/src/skills/seaport.md +0 -65
- package/sdk/src/skills/sommelier.md +0 -47
- package/sdk/src/skills/stader.md +0 -53
- package/sdk/src/skills/swell.md +0 -65
- package/sdk/src/skills/synapse.md +0 -63
- package/sdk/src/skills/synthra-v3.md +0 -57
- package/sdk/src/skills/thales.md +0 -74
- package/sdk/src/skills/tokemak.md +0 -48
- package/sdk/src/skills/uniswap-v3.md +0 -202
- package/sdk/src/skills/uniswap-v4.md +0 -125
- package/sdk/src/skills/unitflow-v3.md +0 -62
- package/sdk/src/skills/vertex.md +0 -55
- package/sdk/src/skills/wormhole.md +0 -76
- package/sdk/src/skills/zerox.md +0 -51
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sauce-overview
|
|
3
|
+
description: Start here for any Sauce task — what Sauce is (a programmable-transaction runtime whose programs, written in SauceScript as .sauce.ts files, run atomically on EVM chains and Solana), the path from a program file to an executed transaction with the sauce command, the rules every program follows, and which Sauce skill to load next. Use when the user mentions Sauce, SauceScript, a .sauce or .sauce.ts file, @eco-incorp/sauce, the sauce command, a Pot, Kitchen, cook or engine, Eco intents, or asks to "write a Sauce program", "do this atomically on chain", or "swap/bridge/lend with Sauce".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sauce
|
|
7
|
+
|
|
8
|
+
**Sauce is a programmable-transaction runtime.** You write a program in **SauceScript**, a checked
|
|
9
|
+
subset of TypeScript, in a `.sauce.ts` file. It compiles for a chain into bytecode, and a Sauce
|
|
10
|
+
engine executes it inside one transaction: on an EVM chain through your Pot's
|
|
11
|
+
`cook(engine, program)`, on Solana through the Kitchen. Every step lands or none does. A program
|
|
12
|
+
has control flow, reads and checks, and the engine runs it as written: it is not a multicall, and
|
|
13
|
+
it does not use a magic header.
|
|
14
|
+
|
|
15
|
+
On top of the runtime sit **intents**: an offer of work on another chain, with a reward escrowed on
|
|
16
|
+
this one, written as a chain name called as a function: `Ethereum(() => { ... }).reward({ ... })`.
|
|
17
|
+
A solver decides whether to fill it (`sauce-intents`).
|
|
18
|
+
|
|
19
|
+
## You write the program
|
|
20
|
+
|
|
21
|
+
Write each program yourself, in SauceScript, for the task as it is asked. These skills teach the
|
|
22
|
+
language, the names each chain offers and the patterns; their example programs show idioms and the
|
|
23
|
+
rules a correct program follows. They are not templates to copy, adapt or choose between: never
|
|
24
|
+
ask the user which example or existing file to start from. Ask only for the facts the request
|
|
25
|
+
leaves open (an amount, a price limit, a recipient, the chain); decide the rest, write the
|
|
26
|
+
program, and rehearse it with `sauce simulate`.
|
|
27
|
+
|
|
28
|
+
Call typed bindings, namespaces and library functions directly: `USDC.transfer(...)`,
|
|
29
|
+
`UniswapV3.Factory.getPool(...)`, `uniswapV3(...)` from `@sauce/router`. Do not wrap a single call
|
|
30
|
+
in a helper, and do not hand-roll a raw selector with `evm.static` and `abi.decode` where a typed
|
|
31
|
+
binding or a namespace exists. Keep a helper only for real logic used more than once.
|
|
32
|
+
|
|
33
|
+
Start every program with a comment that says, in order: what it does, in one line; the `sauce`
|
|
34
|
+
command that runs it, with `--chain <chain>` and `--args` naming every `main` parameter in order
|
|
35
|
+
(`--args <tokenIn> <tokenOut> <amountIn>`); one line per parameter with its type, its meaning and
|
|
36
|
+
its units, in smallest units (`5000000000` is 5,000 USDC, which has 6 decimals; an array or a
|
|
37
|
+
record is passed as JSON); and one concrete invocation on a supported chain with real values,
|
|
38
|
+
addresses taken from the registry and the developer's own inputs left as `<placeholders>`. An
|
|
39
|
+
intent file lists its defines the same way. `sauce-script` shows one.
|
|
40
|
+
|
|
41
|
+
## Supported chains
|
|
42
|
+
|
|
43
|
+
For the initial release, Sauce supports transactions on **Ethereum, Base and Solana** (`ethereum`,
|
|
44
|
+
`base`, `solana`). Every other chain the SDK knows is a **preview chain**: a program compiles for
|
|
45
|
+
it, and `sauce simulate` and the dry runs rehearse it there, but the `sauce` command and the MCP
|
|
46
|
+
server build and send no transaction on it. `sauce tx`, `sauce run`, `sauce pot --deploy`,
|
|
47
|
+
`sauce intent publish` and the intent steps sent there are refused before anything is read or
|
|
48
|
+
signed, and the refusal names the supported chains and the chain-support request for that chain.
|
|
49
|
+
An intent publishes only when every chain it involves is supported. `sauce-chains` marks each
|
|
50
|
+
chain supported or preview.
|
|
51
|
+
|
|
52
|
+
To ask for a chain, look among the
|
|
53
|
+
[existing chain-support requests](https://github.com/eco-incorp/sauce/issues?q=is%3Aissue+label%3Achain-support)
|
|
54
|
+
and add the use case to that chain's as a comment, or
|
|
55
|
+
[open one](https://github.com/eco-incorp/sauce/issues/new?template=chain-support.yml) with the
|
|
56
|
+
chain-support form: the chain and its id, what runs there, the protocols and tokens, and the
|
|
57
|
+
expected volume and timing. The refusal carries both links, prefilled for its chain.
|
|
58
|
+
|
|
59
|
+
## Writing a program
|
|
60
|
+
|
|
61
|
+
A program names what the chain it is compiled for supplies, with no import: token symbols such as
|
|
62
|
+
`USDC`, `Token(address)` for any other token, protocol namespaces such as `UniswapV3.Factory` and
|
|
63
|
+
`AaveV3.Pool`, chain names such as `Ethereum`, and `ctx` for the transaction's context. The
|
|
64
|
+
smallest complete program:
|
|
65
|
+
|
|
66
|
+
```sauce chain=base,ethereum
|
|
67
|
+
function main(recipient: Address, floor: Uint256) {
|
|
68
|
+
const held = USDC.balanceOf(ctx.self());
|
|
69
|
+
require(held >= floor, "not enough USDC in the Pot");
|
|
70
|
+
USDC.transfer(recipient, held);
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
It names no chain. `sauce run <file> --chain base` compiles it for Base, where `USDC` is Base's
|
|
75
|
+
USDC; `--chain ethereum` gives the same file Ethereum's. What changes per call, such as `recipient`
|
|
76
|
+
and `floor`, is a parameter of `main`, passed with the transaction (`--args`), so one compiled
|
|
77
|
+
program serves every call. That program is for an EVM chain: on Solana every account, a recipient
|
|
78
|
+
included, is an `Account` parameter attached with `--account`, never an `Address` argument
|
|
79
|
+
(`sauce-solana`).
|
|
80
|
+
|
|
81
|
+
On an EVM chain the executing contract, `ctx.self()`, is the **Pot**: it holds the tokens and
|
|
82
|
+
makes the calls. A Pot belongs to one owner, its address follows from the owner
|
|
83
|
+
(`sauce pot --owner <address>`), and only the owner can run a program on it. Token writes are
|
|
84
|
+
SafeERC20 however they are spelled, so USDT works. On Solana the Pot is the Kitchen's account for
|
|
85
|
+
the owner, which the program is given as an account; `ctx.self()` there is the program's id.
|
|
86
|
+
|
|
87
|
+
Two references hold what a program can name. The language (types, operators, statements, and the
|
|
88
|
+
`ctx`, `crypto`, `Math`, `abi`, `evm` and `svm` builtins) is
|
|
89
|
+
[../sauce-script/references/builtins.md](../sauce-script/references/builtins.md); the names a chain
|
|
90
|
+
supplies are indexed in [../sauce-globals/references/](../sauce-globals/references/tokens.md), and
|
|
91
|
+
`sauce globals --chain <chain>` lists them for one chain. Take every address from those or from
|
|
92
|
+
the developer; never invent one.
|
|
93
|
+
|
|
94
|
+
## From a file to a transaction
|
|
95
|
+
|
|
96
|
+
The `sauce` command comes with the package, which needs Node.js 24 or newer: install it in the
|
|
97
|
+
project with `npm i -D -E @eco-incorp/sauce` and run it with `npx sauce`. With the program above
|
|
98
|
+
saved as `payout.sauce.ts`:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
npx sauce globals --chain base # the names a program on Base can use
|
|
102
|
+
npx sauce compile payout.sauce.ts --chain base # check it compiles: the bytecode
|
|
103
|
+
npx sauce simulate payout.sauce.ts --chain base --owner <address> --config sauce.config.json \
|
|
104
|
+
--assume-balance USDC:1 --args <recipient> 1000000
|
|
105
|
+
npx sauce tx payout.sauce.ts --chain base --owner <address> --args <recipient> 1000000
|
|
106
|
+
npx sauce run payout.sauce.ts --chain base --config sauce.config.json --keystore <keystore> \
|
|
107
|
+
--args <recipient> 1000000
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Units differ by flag.** `--args` and defines take base units: `1000000` is 1 USDC (6
|
|
111
|
+
decimals). `--assume-balance` and `--fund` take whole tokens: `USDC:1` is 1 USDC, and
|
|
112
|
+
`USDC:1000000n`, ending in `n`, the same in base units.
|
|
113
|
+
|
|
114
|
+
Compiling for a chain produces the program's bytecode; running it is one transaction to the
|
|
115
|
+
owner's Pot, `cook(engine, program)` with `main`'s arguments appended to the program, paying the
|
|
116
|
+
Kitchen's fee. `sauce tx` prints that transaction unsigned, `{ chainId, to, data, value }`, for
|
|
117
|
+
any wallet or signer to send; `sauce run` signs and sends it itself, deploying the Pot first if it
|
|
118
|
+
is not there. Both work on a supported chain only; on a preview chain, compile and simulate.
|
|
119
|
+
`sauce-cli` covers each command. Endpoints come from a config file the developer passes, never
|
|
120
|
+
from the program or the environment. Without the CLI, the same steps are tools of the Sauce MCP
|
|
121
|
+
server (`npx -y @eco-incorp/sauce mcp`); `sauce-cli` maps each command to its tool.
|
|
122
|
+
|
|
123
|
+
## Pick the next skill
|
|
124
|
+
|
|
125
|
+
| Task | Skill |
|
|
126
|
+
| ---------------------------------------------------------------------------------------- | ------------------------ |
|
|
127
|
+
| The language: the two program forms, `main(...)` inputs and defines, compile errors | `sauce-script` |
|
|
128
|
+
| Names with no import: tokens, `Token(...)`, protocol namespaces, chains, `ctx` | `sauce-globals` |
|
|
129
|
+
| What is on a chain: support, tokens, every protocol with its addresses, intents | `sauce-chains` |
|
|
130
|
+
| Every protocol: how to choose one, its deployments, how a program calls it, its pitfalls | `sauce-protocols` |
|
|
131
|
+
| Any swap: `@sauce/router`, price limits, the Pot's Router, the guard every leg needs | `sauce-swaps` |
|
|
132
|
+
| One swap spread over several price-limited pools: a limit order | `sauce-distributed-swap` |
|
|
133
|
+
| Protocol operations as JSON data, not a program: actions documents | `sauce-actions` |
|
|
134
|
+
| Continuing on another chain: intents, cascades, rewards | `sauce-intents` |
|
|
135
|
+
| Solana programs: accounts, SPL, the Kitchen | `sauce-solana` |
|
|
136
|
+
| Compiling and running: the `sauce` commands, the Pot, funding, simulating, publishing | `sauce-cli` |
|
|
137
|
+
| Application code: compiling, arguments, cooks, actions and verification from TypeScript | `sauce-typescript` |
|
|
138
|
+
| Complete programs, each showing an idiom | `sauce-examples` |
|
|
139
|
+
|
|
140
|
+
## Rules for every program
|
|
141
|
+
|
|
142
|
+
1. **Nothing is left behind.** Measure outputs as balance deltas, move them out, return unspent
|
|
143
|
+
input, and approve exactly what the next call spends. An intent's body runs on a Pot every
|
|
144
|
+
intent to that chain shares, so there a leftover is anyone's.
|
|
145
|
+
2. **A swap leg must not strand input.** Swap exact input, enforce a minimum output with `require`,
|
|
146
|
+
and return what a partial fill leaves (`sauce-swaps`).
|
|
147
|
+
3. **Every check belongs in the program.** A failed `require` reverts the whole transaction; that
|
|
148
|
+
atomicity is the safety mechanism.
|
|
149
|
+
4. **An intent is an offer.** Never promise it will be filled.
|
|
150
|
+
5. **No endpoints or keys in code.** The package ships no RPC URL and reads no environment
|
|
151
|
+
variable: endpoints and signers are passed on the command line or from a config file.
|
|
152
|
+
6. **Transactions on supported chains only.** Build and send on Ethereum, Base or Solana. On a
|
|
153
|
+
preview chain, compile and simulate; when a command refuses one, offer the user the
|
|
154
|
+
chain-support request it names instead of looking for another way to send.
|
|
155
|
+
|
|
156
|
+
## Example
|
|
157
|
+
|
|
158
|
+
[../sauce-cli/examples/pay.sauce.ts](../sauce-cli/examples/pay.sauce.ts) pays a recipient in USDC
|
|
159
|
+
and USDT, and
|
|
160
|
+
[../sauce-distributed-swap/examples/distributed-swap.sauce.ts](../sauce-distributed-swap/examples/distributed-swap.sauce.ts)
|
|
161
|
+
is a complete swap. `sauce-examples` lists every example in every skill.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sauce-protocols
|
|
3
|
+
description: Every DeFi protocol a Sauce program can call, from the SDK's registry — an index by category with how to choose between them (a lending market versus another, a concentrated-liquidity pool versus a V2 pair or a stable pool, an aggregator, a bridge), a registry file per protocol (its deployments on every chain, how a program names each contract there, its ABI functions), and a document per protocol (what it is for, its pitfalls, a compiled example, its templates and notes). Covers every protocol as a registry namespace (deployed contracts, address-only contracts, interfaces called with an address), available(...) for a chain that may lack one, ABI imports for unrecorded contracts, factories and pool lookups, and checking a recorded address has code. Use when a program must call a protocol (PancakeSwap V3, Aerodrome Slipstream, Curve, Balancer, Camelot, Lido, …), when the user asks which protocols or pools exist on a chain or which to use, needs a factory or router address, or wants a protocol's pitfalls.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Protocols
|
|
7
|
+
|
|
8
|
+
Every protocol the SDK registers is in [references/index.md](references/index.md), grouped by
|
|
9
|
+
category, each with **how to choose between them**. Each protocol then has:
|
|
10
|
+
|
|
11
|
+
- `references/registry/<slug>.md`, generated from the registry: its deployments on every chain, how
|
|
12
|
+
a program names each contract there, and its ABI functions (for example
|
|
13
|
+
[references/registry/uniswap-v3.md](references/registry/uniswap-v3.md));
|
|
14
|
+
- `references/<slug>.md`, its document: what it is for, its pitfalls for a program, a compiled
|
|
15
|
+
example, its templates and notes (for example [references/aave-v3.md](references/aave-v3.md)).
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- A program must call a protocol: find how it is named on the program's chain.
|
|
20
|
+
- Choosing between protocols that do the same job: the category's "Choosing between them".
|
|
21
|
+
- You need a factory, router or pool address on a chain, or want a protocol's pitfalls first.
|
|
22
|
+
|
|
23
|
+
## Quick reference
|
|
24
|
+
|
|
25
|
+
A program reaches a catalogued protocol through its **registry namespace**, with no import: the
|
|
26
|
+
address and the ABI come from the registry for the chain the program is compiled for. A namespace
|
|
27
|
+
member is one of three kinds:
|
|
28
|
+
|
|
29
|
+
| Member | Example | In a program |
|
|
30
|
+
| ------------------- | -------------------------------------------------------- | ------------------------------------ |
|
|
31
|
+
| A deployed contract | `PancakeswapV3.Factory`, `AerodromeSlipstream.CLFactory` | its address; `.method(...)` calls it |
|
|
32
|
+
| An address only | `Camelot.V3Factory` (no ABI the registry has verified) | its address |
|
|
33
|
+
| An interface | `Erc4626.Vault` (a vault has no one fixed address) | `(address).method(...)` |
|
|
34
|
+
|
|
35
|
+
An interface is called with the address of a deployment, `Erc4626.Vault(vault).totalAssets()`
|
|
36
|
+
(`.at(vault)` is the same). `.at(address)` also reaches another deployment of a deployed contract's
|
|
37
|
+
ABI; a deployed contract's name is never called with an address. A contract the
|
|
38
|
+
registry does not record at all is called through its ABI, imported from
|
|
39
|
+
`./protocols/<slug>/<Export>.json` and bound with `.at(address)` to an address passed in as a
|
|
40
|
+
`main` input or a define.
|
|
41
|
+
|
|
42
|
+
A program that should also compile for a chain without the protocol asks `available(...)`, which is
|
|
43
|
+
decided when it is compiled; the branch it rules out is left out, names and all:
|
|
44
|
+
|
|
45
|
+
```sauce chain=base,arbitrum,optimism
|
|
46
|
+
function main(fee: Uint256) {
|
|
47
|
+
const uni = UniswapV3.Factory.getPool(WETH, USDC, fee);
|
|
48
|
+
let pancake = 0n;
|
|
49
|
+
if (available(PancakeswapV3.Factory)) {
|
|
50
|
+
pancake = PancakeswapV3.Factory.getPool(WETH, USDC, fee);
|
|
51
|
+
}
|
|
52
|
+
require(uni != 0n || pancake != 0n, "no WETH/USDC pool at that fee");
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
With that program in `pools.sauce.ts`, a run on Base passes nothing but the fee (in millionths:
|
|
57
|
+
`500` is the 0.05% tier):
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
npx sauce run pools.sauce.ts --chain base --config sauce.config.json --keystore <keystore> \
|
|
61
|
+
--args 500
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Written without `available(...)`, a member is required: the program does not compile for a chain
|
|
65
|
+
that lacks it.
|
|
66
|
+
|
|
67
|
+
## Decision guidance
|
|
68
|
+
|
|
69
|
+
| Question | Answer |
|
|
70
|
+
| ---------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
71
|
+
| Which protocol for a job | the category's "Choosing between them" in [references/index.md](references/index.md) |
|
|
72
|
+
| How to name a contract | the registry file's "In a program" column for your chain |
|
|
73
|
+
| A chain may lack it | `if (available(Namespace.Contract)) { … }` |
|
|
74
|
+
| A pool, not a fixed contract | look it up at run time through the factory (`getPool`, `getPair`), which returns `0` where there is none |
|
|
75
|
+
| A swap | through the Sauce Router wherever it services the pool (`sauce-swaps`), not the protocol's own router |
|
|
76
|
+
| Code on another chain | a Sauce intent (`sauce-intents`), not a bridge call alone |
|
|
77
|
+
|
|
78
|
+
## Workflow
|
|
79
|
+
|
|
80
|
+
1. Find the protocol in [references/index.md](references/index.md) and open its registry file:
|
|
81
|
+
check it is deployed on your chain and how a program names the contract there.
|
|
82
|
+
2. Read its document's pitfalls before writing the call.
|
|
83
|
+
3. Write the program, compile it for the chain (`sauce compile <file> --chain <slug>`), and hand the
|
|
84
|
+
cook to any signer as `sauce tx`'s unsigned JSON, `{ chainId, to, data, value }`, or send it with
|
|
85
|
+
`sauce run` (`sauce-cli`). For the initial release that is on Ethereum, Base or Solana: every
|
|
86
|
+
protocol on every chain compiles and simulates, but on a preview chain `sauce tx` and `sauce run`
|
|
87
|
+
are refused with the chain-support request for that chain (`sauce-chains`).
|
|
88
|
+
|
|
89
|
+
## Common gotchas
|
|
90
|
+
|
|
91
|
+
- **Recorded is not live.** A registry address is what the registry records, not proof of code on
|
|
92
|
+
the chain: confirm `eth_getCode` returns code before relying on it.
|
|
93
|
+
- **A document's templates are typed programs for the raw compiler**: their
|
|
94
|
+
`import { PoolABI as IPool } from "./abis"` is served by the template's caller. In a program for a
|
|
95
|
+
chain, use the namespace instead.
|
|
96
|
+
- **Some factories are addresses only** (Algebra forks such as Camelot V3 and QuickSwap V3): the
|
|
97
|
+
registry has no verified ABI with their pool lookup, so discover the pool off chain and pass its
|
|
98
|
+
address as a `main` input.
|
|
99
|
+
- **Solidity idioms in a document have SauceScript spellings**: `msg.sender` is `ctx.msgSender()`,
|
|
100
|
+
`address(this)` is `ctx.self()`, and `type(uint256).max` is `~0n`
|
|
101
|
+
([../sauce-script/references/builtins.md](../sauce-script/references/builtins.md)).
|
|
102
|
+
- **Approve exactly what the call spends**: the Pot keeps any allowance it grants.
|
|
103
|
+
|
|
104
|
+
## Verification checklist
|
|
105
|
+
|
|
106
|
+
- [ ] The protocol is deployed on the program's chain, and the address has code.
|
|
107
|
+
- [ ] Each contract is named as its registry file says for that chain, or behind `available(...)`.
|
|
108
|
+
- [ ] The document's pitfalls are handled: approvals, balance deltas, minimums.
|
|
109
|
+
- [ ] The program compiles with `--chain`.
|
|
110
|
+
- [ ] Its transaction goes to a supported chain (Ethereum, Base or Solana); a protocol on a preview
|
|
111
|
+
chain is compiled and simulated, and the chain requested.
|
|
112
|
+
|
|
113
|
+
## Example
|
|
114
|
+
|
|
115
|
+
[examples/protocols.sauce.ts](examples/protocols.sauce.ts) calls Aave and, where the chain has it,
|
|
116
|
+
PancakeSwap V3 through their namespaces; [examples/protocols.mts](examples/protocols.mts) compiles it
|
|
117
|
+
for Base, Arbitrum and Optimism (the last two preview chains, compiled only), loads a protocol
|
|
118
|
+
document, and compiles a protocol template.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// The registries a program author reads from TypeScript: which protocols exist and where, which
|
|
2
|
+
// contracts a program can call by name, the per-protocol documents, and how a protocol module's
|
|
3
|
+
// SauceScript template compiles. Compiles protocols.sauce.ts the way `sauce compile` does, for
|
|
4
|
+
// chains with and without PancakeSwap V3.
|
|
5
|
+
//
|
|
6
|
+
// node protocols.mts
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
contracts,
|
|
11
|
+
getProtocol,
|
|
12
|
+
getProtocolSkill,
|
|
13
|
+
getProtocolsByChain,
|
|
14
|
+
listProtocols,
|
|
15
|
+
listSkillSlugs,
|
|
16
|
+
routes,
|
|
17
|
+
} from "@eco-incorp/sauce";
|
|
18
|
+
import { compile } from "@eco-incorp/sauce/compiler";
|
|
19
|
+
import * as aaveV3 from "@eco-incorp/sauce/protocols/aave-v3";
|
|
20
|
+
|
|
21
|
+
function check(condition: unknown, message: string): asserts condition {
|
|
22
|
+
if (!condition) throw new Error(`check failed: ${message}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Catalogued on Base (metadata and deployments), a much larger set than the callable namespaces.
|
|
26
|
+
const onBase = getProtocolsByChain(8453);
|
|
27
|
+
check(getProtocol("pancakeswap-v3")?.slug === "pancakeswap-v3", "catalog lookup by slug");
|
|
28
|
+
check(contracts.on("base").AaveV3.Pool.available, "AaveV3.Pool is a namespace on Base");
|
|
29
|
+
|
|
30
|
+
// protocols.sauce.ts names PancakeSwap V3's factory by namespace, behind `available(...)`: the
|
|
31
|
+
// program carries the factory where the chain has one, and compiles without it elsewhere.
|
|
32
|
+
const source = readFileSync(new URL("./protocols.sauce.ts", import.meta.url), "utf8");
|
|
33
|
+
const sizes: string[] = [];
|
|
34
|
+
for (const [slug, hasPancake] of [
|
|
35
|
+
["base", true],
|
|
36
|
+
["arbitrum", true],
|
|
37
|
+
["optimism", false],
|
|
38
|
+
] as const) {
|
|
39
|
+
const factory = contracts.on(slug).PancakeswapV3.Factory;
|
|
40
|
+
check(factory.available === hasPancake, `PancakeswapV3.Factory on ${slug}: ${hasPancake}`);
|
|
41
|
+
const program = routes.compileSauceProgram(slug, source);
|
|
42
|
+
check(program.source.includes("__sauce_approve(USDC,"), "the approve is SafeERC20");
|
|
43
|
+
const bytecode = Buffer.from(program.bytecode).toString("hex");
|
|
44
|
+
check(
|
|
45
|
+
hasPancake ===
|
|
46
|
+
(factory.available && bytecode.includes(factory.address!.slice(2).toLowerCase())),
|
|
47
|
+
`the program uses the factory on ${slug} only where it exists`,
|
|
48
|
+
);
|
|
49
|
+
sizes.push(`${slug} ${program.bytecode.length} bytes`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// The per-protocol documents ship as this skill's references/, and `getProtocolSkill` returns the
|
|
53
|
+
// same text. Not every catalogued protocol has one.
|
|
54
|
+
const document = readFileSync(new URL("../references/pancakeswap-v3.md", import.meta.url), "utf8");
|
|
55
|
+
check(
|
|
56
|
+
getProtocolSkill("pancakeswap-v3") === document,
|
|
57
|
+
"references/ is what getProtocolSkill reads",
|
|
58
|
+
);
|
|
59
|
+
check(listSkillSlugs().length < listProtocols().length, "some protocols have no document");
|
|
60
|
+
|
|
61
|
+
// Templates are named exports; their `import { X as Y } from "./abis"` is a contract import, so
|
|
62
|
+
// the resolver serves `./abis` with the named ABI's JSON.
|
|
63
|
+
check(!("sauceFunctions" in aaveV3), "templates are exported by name");
|
|
64
|
+
const entry = new TextEncoder().encode(aaveV3.supply);
|
|
65
|
+
const abi = new TextEncoder().encode(JSON.stringify(aaveV3.PoolABI));
|
|
66
|
+
const template = compile({
|
|
67
|
+
target: "evm",
|
|
68
|
+
entry: "main.ts",
|
|
69
|
+
resolve: (path) => (path === "main.ts" ? entry : path === "./abis" ? abi : undefined),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
console.log(
|
|
73
|
+
`${listProtocols().length} protocols catalogued, ${onBase.length} on Base, ${listSkillSlugs().length} documents`,
|
|
74
|
+
);
|
|
75
|
+
console.log(
|
|
76
|
+
`protocols.sauce.ts: ${sizes.join(", ")}; aave-v3 supply template ${template.bytecode.length} bytes`,
|
|
77
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// A program reaches a catalogued protocol through its registry namespace: `AaveV3.Pool`,
|
|
2
|
+
// `PancakeswapV3.Factory`. The address and the ABI come from the registry for the chain the program
|
|
3
|
+
// is compiled for, with no import, and `available(...)` uses a contract only where that chain has
|
|
4
|
+
// it, so the file compiles for chains without PancakeSwap V3 too.
|
|
5
|
+
//
|
|
6
|
+
// sauce run protocols.sauce.ts --chain <chain> --config sauce.config.json --keystore <keystore> \
|
|
7
|
+
// --args <beneficiary> <amount>
|
|
8
|
+
//
|
|
9
|
+
// beneficiary: Address who the Aave V3 position is supplied for
|
|
10
|
+
// amount: Uint256 the Pot's USDC to supply, in its smallest units (6 decimals):
|
|
11
|
+
// 5000000000 is 5,000 USDC
|
|
12
|
+
//
|
|
13
|
+
// On Base, 5,000 USDC supplied for the beneficiary:
|
|
14
|
+
//
|
|
15
|
+
// sauce run protocols.sauce.ts --chain base --config sauce.config.json --keystore <keystore> \
|
|
16
|
+
// --args <beneficiary> 5000000000
|
|
17
|
+
function main(beneficiary: Address, amount: Uint256) {
|
|
18
|
+
// 1. Supply `amount` of the Pot's USDC to Aave V3 for `beneficiary`, approving exactly that.
|
|
19
|
+
USDC.approve(AaveV3.Pool, amount);
|
|
20
|
+
AaveV3.Pool.supply(USDC, amount, beneficiary, 0n);
|
|
21
|
+
|
|
22
|
+
// 2. Look a pool up through PancakeSwap V3's factory, where the chain has one.
|
|
23
|
+
if (available(PancakeswapV3.Factory)) {
|
|
24
|
+
const pool = PancakeswapV3.Factory.getPool(WETH, USDC, 500n);
|
|
25
|
+
require(pool != 0n, "no PancakeSwap V3 WETH/USDC 0.05% pool");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -2,11 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
Legacy version of Aave lending protocol. Still holds significant TVL on Ethereum, Polygon, and Avalanche.
|
|
4
4
|
|
|
5
|
+
## When to use it
|
|
6
|
+
|
|
7
|
+
- The previous Aave generation, where a chain still runs its market. Where a chain has both,
|
|
8
|
+
Aave V3 is the current market (`aave-v3`).
|
|
9
|
+
|
|
10
|
+
## Pitfalls for a program
|
|
11
|
+
|
|
12
|
+
- The supply call is `deposit`, not `supply`; approve the LendingPool first.
|
|
13
|
+
- aTokens are rebasing: measure balances as deltas.
|
|
14
|
+
- A frozen reserve refuses new deposits: check the reserve accepts them before relying on it.
|
|
15
|
+
- Borrowing and liquidation work as in Aave V3, by health factor.
|
|
16
|
+
|
|
17
|
+
## In a Sauce program
|
|
18
|
+
|
|
19
|
+
Deposit the Pot's USDC:
|
|
20
|
+
|
|
21
|
+
```sauce chain=ethereum
|
|
22
|
+
function main(amount: Uint256) {
|
|
23
|
+
const self = ctx.self();
|
|
24
|
+
USDC.approve(AaveV2.LendingPool, amount);
|
|
25
|
+
AaveV2.LendingPool.deposit(USDC, amount, self, 0n);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
5
29
|
## Category
|
|
6
30
|
|
|
7
|
-
lending | Chains
|
|
31
|
+
lending | Chains and addresses: [registry/aave-v2.md](registry/aave-v2.md)
|
|
32
|
+
|
|
33
|
+
## Typed templates for the raw compiler (not for `sauce compile`)
|
|
8
34
|
|
|
9
|
-
|
|
35
|
+
These import the protocol's ABI from `./abis`, the way the registry compiles them with the raw
|
|
36
|
+
compiler; `sauce compile` has no such module. In a program for a chain, name the contract by its
|
|
37
|
+
namespace, or import its ABI from `./protocols/<slug>/<Export>.json` as the registry file at the
|
|
38
|
+
top of this document shows, and write SauceScript's values (`~0n`, not `type(uint256).max`).
|
|
10
39
|
|
|
11
40
|
### deposit
|
|
12
41
|
|
|
@@ -98,22 +127,11 @@ function main(
|
|
|
98
127
|
- Requires ERC-20 approval to the LendingPool
|
|
99
128
|
- Returns the actual repaid amount
|
|
100
129
|
|
|
101
|
-
##
|
|
102
|
-
|
|
103
|
-
| Chain | Contract | Address |
|
|
104
|
-
| --------- | ----------- | -------------------------------------------- |
|
|
105
|
-
| Ethereum | lendingPool | `0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9` |
|
|
106
|
-
| Polygon | lendingPool | `0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf` |
|
|
107
|
-
| Avalanche | lendingPool | `0x4F01AeD16D97E3aB5ab2B501154DC9bb0F1A5A2C` |
|
|
108
|
-
|
|
109
|
-
## ABI Reference
|
|
110
|
-
|
|
111
|
-
### LendingPoolABI
|
|
130
|
+
## Deployments and ABI
|
|
112
131
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
- `repay(address asset, uint256 amount, uint256 rateMode, address onBehalfOf) returns (uint256)` - Repay borrowed asset
|
|
132
|
+
The registry's addresses per chain, how a program names each contract there (a namespace, or
|
|
133
|
+
an ABI import bound to the address), and the ABI functions are generated in
|
|
134
|
+
[registry/aave-v2.md](registry/aave-v2.md).
|
|
117
135
|
|
|
118
136
|
## Notes
|
|
119
137
|
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Aave V3
|
|
2
|
+
|
|
3
|
+
Non-custodial liquidity protocol for earning interest on deposits and borrowing assets. The most widely deployed lending protocol in DeFi.
|
|
4
|
+
|
|
5
|
+
## When to use it
|
|
6
|
+
|
|
7
|
+
- Earn interest on an asset the market lists, or borrow one against everything you supplied in
|
|
8
|
+
that market. One Pool per market holds every reserve.
|
|
9
|
+
- Choose it over Compound V3 when you need to borrow more than one asset against shared
|
|
10
|
+
collateral, and over Morpho Blue when you want one shared market rather than isolated ones.
|
|
11
|
+
|
|
12
|
+
## Pitfalls for a program
|
|
13
|
+
|
|
14
|
+
- `supply` pulls the asset with `transferFrom`: approve the Pool for exactly the amount first.
|
|
15
|
+
- The aToken minted to `onBehalfOf` is rebasing: its balance grows with interest, so measure it
|
|
16
|
+
as a delta, not as the amount supplied.
|
|
17
|
+
- A reserve can be frozen, paused or at its supply cap, and then `supply` reverts.
|
|
18
|
+
- Borrowing needs collateral and keeps the position's health factor (from
|
|
19
|
+
`getUserAccountData`, scaled by 1e18) above 1; below it, anyone may liquidate.
|
|
20
|
+
- `withdraw` with `~0n` withdraws everything; it reverts if that would leave a borrow
|
|
21
|
+
undercollateralized.
|
|
22
|
+
- `flashLoanSimple` calls back a receiver contract, which a Sauce program cannot be.
|
|
23
|
+
|
|
24
|
+
## In a Sauce program
|
|
25
|
+
|
|
26
|
+
Supply the Pot's USDC and check the position now has collateral:
|
|
27
|
+
|
|
28
|
+
```sauce chain=base,arbitrum
|
|
29
|
+
function main(amount: Uint256) {
|
|
30
|
+
const self = ctx.self();
|
|
31
|
+
USDC.approve(AaveV3.Pool, amount);
|
|
32
|
+
AaveV3.Pool.supply(USDC, amount, self, 0n);
|
|
33
|
+
const account = AaveV3.Pool.getUserAccountData(self);
|
|
34
|
+
require(account.totalCollateralBase > 0n, "nothing supplied");
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Category
|
|
39
|
+
|
|
40
|
+
lending | Chains and addresses: [registry/aave-v3.md](registry/aave-v3.md)
|
|
41
|
+
|
|
42
|
+
## Typed templates for the raw compiler (not for `sauce compile`)
|
|
43
|
+
|
|
44
|
+
These import the protocol's ABI from `./abis`, the way the registry compiles them with the raw
|
|
45
|
+
compiler; `sauce compile` has no such module. In a program for a chain, name the contract by its
|
|
46
|
+
namespace, or import its ABI from `./protocols/<slug>/<Export>.json` as the registry file at the
|
|
47
|
+
top of this document shows, and write SauceScript's values (`~0n`, not `type(uint256).max`).
|
|
48
|
+
|
|
49
|
+
### supply
|
|
50
|
+
|
|
51
|
+
Supply assets to earn interest. Mints aTokens to the supplier.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { PoolABI as IPool } from "./abis";
|
|
55
|
+
|
|
56
|
+
function main(poolAddress: Address, asset: Address, amount: Uint256, onBehalfOf: Address): Uint256 {
|
|
57
|
+
const pool = IPool.at(poolAddress);
|
|
58
|
+
pool.supply(asset, amount, onBehalfOf, 0);
|
|
59
|
+
return 1;
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- `poolAddress`: Pool contract for the target chain
|
|
64
|
+
- `asset`: ERC-20 token address to supply
|
|
65
|
+
- `amount`: Amount in token's native decimals. Use `type(uint256).max` for entire balance
|
|
66
|
+
- `onBehalfOf`: Address that receives aTokens (use msg.sender for self)
|
|
67
|
+
- Requires ERC-20 approval to the Pool before calling
|
|
68
|
+
|
|
69
|
+
### withdraw
|
|
70
|
+
|
|
71
|
+
Withdraw supplied assets by burning aTokens.
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import { PoolABI as IPool } from "./abis";
|
|
75
|
+
|
|
76
|
+
function main(poolAddress: Address, asset: Address, amount: Uint256, to: Address): Uint256 {
|
|
77
|
+
const pool = IPool.at(poolAddress);
|
|
78
|
+
return pool.withdraw(asset, amount, to);
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- `amount`: Use `type(uint256).max` to withdraw entire balance
|
|
83
|
+
- Returns the actual withdrawn amount
|
|
84
|
+
|
|
85
|
+
### borrow
|
|
86
|
+
|
|
87
|
+
Borrow assets against supplied collateral.
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
import { PoolABI as IPool } from "./abis";
|
|
91
|
+
|
|
92
|
+
function main(
|
|
93
|
+
poolAddress: Address,
|
|
94
|
+
asset: Address,
|
|
95
|
+
amount: Uint256,
|
|
96
|
+
interestRateMode: Uint256,
|
|
97
|
+
onBehalfOf: Address,
|
|
98
|
+
): Uint256 {
|
|
99
|
+
const pool = IPool.at(poolAddress);
|
|
100
|
+
pool.borrow(asset, amount, interestRateMode, 0, onBehalfOf);
|
|
101
|
+
return 1;
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- `interestRateMode`: 1 = stable (being phased out), 2 = variable. Use 2 for variable rate
|
|
106
|
+
- Must have sufficient collateral supplied first
|
|
107
|
+
|
|
108
|
+
### repay
|
|
109
|
+
|
|
110
|
+
Repay borrowed assets to reduce debt.
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
import { PoolABI as IPool } from "./abis";
|
|
114
|
+
|
|
115
|
+
function main(
|
|
116
|
+
poolAddress: Address,
|
|
117
|
+
asset: Address,
|
|
118
|
+
amount: Uint256,
|
|
119
|
+
interestRateMode: Uint256,
|
|
120
|
+
onBehalfOf: Address,
|
|
121
|
+
): Uint256 {
|
|
122
|
+
const pool = IPool.at(poolAddress);
|
|
123
|
+
return pool.repay(asset, amount, interestRateMode, onBehalfOf);
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- `interestRateMode`: Must match the debt type (1 = stable, 2 = variable)
|
|
128
|
+
- `amount`: Use `type(uint256).max` to repay entire debt
|
|
129
|
+
- Requires ERC-20 approval to the Pool
|
|
130
|
+
|
|
131
|
+
## Deployments and ABI
|
|
132
|
+
|
|
133
|
+
The registry's addresses per chain, how a program names each contract there (a namespace, or
|
|
134
|
+
an ABI import bound to the address), and the ABI functions are generated in
|
|
135
|
+
[registry/aave-v3.md](registry/aave-v3.md).
|
|
136
|
+
|
|
137
|
+
## Notes
|
|
138
|
+
|
|
139
|
+
- interestRateMode: 1 = stable (deprecated on most markets), 2 = variable
|
|
140
|
+
- referralCode is always 0 (referral program inactive)
|
|
141
|
+
- V3 introduced efficiency mode (eMode) for correlated assets, isolation mode for new assets, and siloed borrowing
|
|
142
|
+
- All supply/repay operations require prior ERC-20 approval to the Pool address
|
|
143
|
+
- healthFactor < 1e18 means position is liquidatable
|
|
144
|
+
- TVL: $40B+. Audited
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Aave V4
|
|
2
|
+
|
|
3
|
+
Hub-and-spoke lending. Liquidity sits in a Hub; users supply, borrow and repay through Spokes, and each Spoke addresses its assets by reserve id rather than by token address.
|
|
4
|
+
|
|
5
|
+
## Category
|
|
6
|
+
|
|
7
|
+
lending | Chains and addresses: [registry/aave-v4.md](registry/aave-v4.md)
|
|
8
|
+
|
|
9
|
+
## Typed templates for the raw compiler (not for `sauce compile`)
|
|
10
|
+
|
|
11
|
+
These import the protocol's ABI from `./abis`, the way the registry compiles them with the raw
|
|
12
|
+
compiler; `sauce compile` has no such module. In a program for a chain, name the contract by its
|
|
13
|
+
namespace, or import its ABI from `./protocols/<slug>/<Export>.json` as the registry file at the
|
|
14
|
+
top of this document shows, and write SauceScript's values (`~0n`, not `type(uint256).max`).
|
|
15
|
+
|
|
16
|
+
### supply
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { AaveV4SpokeABI as ISpoke } from "./abis";
|
|
20
|
+
|
|
21
|
+
function main(
|
|
22
|
+
spokeAddress: Address,
|
|
23
|
+
reserveId: Uint256,
|
|
24
|
+
amount: Uint256,
|
|
25
|
+
onBehalfOf: Address,
|
|
26
|
+
): Uint256 {
|
|
27
|
+
const spoke = ISpoke.at(spokeAddress);
|
|
28
|
+
spoke.supply(reserveId, amount, onBehalfOf);
|
|
29
|
+
return 1;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- `reserveId`: the Spoke's reserve id for the asset. Resolve it with `spoke.getReserveId(hub, hub.getAssetId(token))`
|
|
34
|
+
- The underlying token must be `approve`d to the Spoke first
|
|
35
|
+
|
|
36
|
+
`withdraw`, `borrow` and `repay` take the same `(reserveId, amount, onBehalfOf)` arguments.
|
|
37
|
+
|
|
38
|
+
## Deployments and ABI
|
|
39
|
+
|
|
40
|
+
The registry's addresses per chain, how a program names each contract there (a namespace, or
|
|
41
|
+
an ABI import bound to the address), and the ABI functions are generated in
|
|
42
|
+
[registry/aave-v4.md](registry/aave-v4.md).
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- Arc's market lists USDC, EURC, WETH and cirBTC. The Main Spoke carries all four; the Forex Spoke carries USDC and EURC
|
|
47
|
+
- A chain can carry several Hubs, and a Spoke draws on one or more of them: `getReserveId(hub, assetId)` needs the Hub the asset lives in. Base carries only an equities market (tokenized stocks and USDC) with no core hub
|
|
48
|
+
- Each chain also has a Treasury Spoke, which collects fees; it is not a market and is not registered
|
|
49
|
+
- Hub, Spokes and their implementations are upgradeable (EIP-1967) proxies
|
|
50
|
+
- Addresses come from bgd-labs/aave-address-book (`AaveV4Ethereum`, `AaveV4Base`, `AaveV4Avalanche`, `AaveV4Arc`)
|