From 1a8cf2ea24757ad22e7bda2450088626dc5f0ee8 Mon Sep 17 00:00:00 2001 From: its-everdred Date: Thu, 13 Nov 2025 18:35:42 -0800 Subject: [PATCH 1/3] Update lend config documentation --- app-developers/guides/configuring-actions.mdx | 56 +++++++++++++------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/app-developers/guides/configuring-actions.mdx b/app-developers/guides/configuring-actions.mdx index 26899b608..736bb6365 100644 --- a/app-developers/guides/configuring-actions.mdx +++ b/app-developers/guides/configuring-actions.mdx @@ -84,17 +84,16 @@ Actions SDK lets you choose which assets, markets, chains, protocols, and provid - Configure which assets you want to support: + Configure which assets you want to support across all lend providers: ```typescript title="actions.ts" // Additional config from previous steps... // Import popular assets import { USDC } from '@eth-optimism/actions-sdk/assets' + import type { Asset, AssetsConfig } from "@eth-optimism/actions-sdk"; // Or define custom assets - import type { Asset } from "@eth-optimism/actions-sdk"; - export const CustomToken: Asset = { address: { [mainnet.id]: '0x123...', @@ -108,6 +107,12 @@ Actions SDK lets you choose which assets, markets, chains, protocols, and provid }, type: 'erc20', } + + // Configure allowed/blocked assets (both optional) + const assetsConfig: AssetsConfig = { + allow: [USDC, CustomToken], // Optional - defaults to all supported assets + block: [], // Optional + } ``` @@ -127,37 +132,53 @@ Actions SDK lets you choose which assets, markets, chains, protocols, and provid ``` - - Configure which lend protocol you want to support: + + Configure which lend protocols you want to support. You can enable one or multiple providers: - + + ```typescript title="actions.ts" + // Additional config from previous steps... + + import type { LendConfig } from "@eth-optimism/actions-sdk"; + + const lendConfig: LendConfig = { + morpho: { + marketAllowlist: [GauntletUSDC], + marketBlocklist: [], // Optional + }, + }; + ``` + + ```typescript title="actions.ts" // Additional config from previous steps... import type { LendConfig } from "@eth-optimism/actions-sdk"; const lendConfig: LendConfig = { - type: "morpho", - assetAllowlist: [USDC, CustomToken], - assetBlocklist: [], - marketAllowlist: [GauntletUSDC], - marketBlocklist: [], + aave: { + marketAllowlist: [AaveWETH], + marketBlocklist: [], // Optional + }, }; ``` - + ```typescript title="actions.ts" // Additional config from previous steps... import type { LendConfig } from "@eth-optimism/actions-sdk"; const lendConfig: LendConfig = { - type: "aave", - assetAllowlist: [USDC, CustomToken], - assetBlocklist: [], - marketAllowlist: [], - marketBlocklist: [], + morpho: { + marketAllowlist: [GauntletUSDC], + marketBlocklist: [], + }, + aave: { + marketAllowlist: [AaveWETH], + marketBlocklist: [], + }, }; ``` @@ -206,6 +227,7 @@ Actions SDK lets you choose which assets, markets, chains, protocols, and provid export const actions = createActions({ wallet: walletConfig, lend: lendConfig, + assets: assetsConfig, // Optional chains, }); ``` From 55d3a463fd9eb8338914084bc2340d55142a2631 Mon Sep 17 00:00:00 2001 From: its-everdred Date: Fri, 14 Nov 2025 11:40:12 -0800 Subject: [PATCH 2/3] Update guide title to Actions SDK --- app-developers/guides/configuring-actions.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app-developers/guides/configuring-actions.mdx b/app-developers/guides/configuring-actions.mdx index 736bb6365..aae140579 100644 --- a/app-developers/guides/configuring-actions.mdx +++ b/app-developers/guides/configuring-actions.mdx @@ -1,5 +1,6 @@ --- -title: Configuring Actions +title: Configuring Actions SDK +sidebar: Configuring Actions SDK description: Learn how to configure Actions SDK for your application. --- From 3d4adede091ac077cc45a50c17bcd9356550b3ee Mon Sep 17 00:00:00 2001 From: its-everdred Date: Wed, 3 Dec 2025 14:57:40 -0800 Subject: [PATCH 3/3] Simplify lendConfig --- app-developers/guides/configuring-actions.mdx | 63 +++++-------------- 1 file changed, 15 insertions(+), 48 deletions(-) diff --git a/app-developers/guides/configuring-actions.mdx b/app-developers/guides/configuring-actions.mdx index aae140579..0fa67d38b 100644 --- a/app-developers/guides/configuring-actions.mdx +++ b/app-developers/guides/configuring-actions.mdx @@ -1,6 +1,5 @@ --- title: Configuring Actions SDK -sidebar: Configuring Actions SDK description: Learn how to configure Actions SDK for your application. --- @@ -136,54 +135,22 @@ Actions SDK lets you choose which assets, markets, chains, protocols, and provid Configure which lend protocols you want to support. You can enable one or multiple providers: - - - ```typescript title="actions.ts" - // Additional config from previous steps... - - import type { LendConfig } from "@eth-optimism/actions-sdk"; - - const lendConfig: LendConfig = { - morpho: { - marketAllowlist: [GauntletUSDC], - marketBlocklist: [], // Optional - }, - }; - ``` - - - ```typescript title="actions.ts" - // Additional config from previous steps... - - import type { LendConfig } from "@eth-optimism/actions-sdk"; - - const lendConfig: LendConfig = { - aave: { - marketAllowlist: [AaveWETH], - marketBlocklist: [], // Optional - }, - }; - ``` - - - ```typescript title="actions.ts" - // Additional config from previous steps... + ```typescript title="actions.ts" + // Additional config from previous steps... - import type { LendConfig } from "@eth-optimism/actions-sdk"; + import type { LendConfig } from "@eth-optimism/actions-sdk"; - const lendConfig: LendConfig = { - morpho: { - marketAllowlist: [GauntletUSDC], - marketBlocklist: [], - }, - aave: { - marketAllowlist: [AaveWETH], - marketBlocklist: [], - }, - }; - ``` - - + const lendConfig: LendConfig = { + morpho: { + marketAllowlist: [GauntletUSDC], + marketBlocklist: [], // Optional + }, + aave: { + marketAllowlist: [AaveWETH], + marketBlocklist: [], // Optional + }, + }; + ``` @@ -228,7 +195,7 @@ Actions SDK lets you choose which assets, markets, chains, protocols, and provid export const actions = createActions({ wallet: walletConfig, lend: lendConfig, - assets: assetsConfig, // Optional + assets: assetsConfig, chains, }); ```