diff --git a/app-developers/guides/configuring-actions.mdx b/app-developers/guides/configuring-actions.mdx
index 26899b608..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.
---
@@ -84,17 +85,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 +108,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 +133,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 +228,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,
});
```