From 0edc90b81907c257b9a26297c70770713a75938d Mon Sep 17 00:00:00 2001 From: 9547 <29431502+9547@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:43:39 +0800 Subject: [PATCH] feat(plugin-starknet): migrate generateObjectDeprecated to generateObject --- packages/plugin-starknet/src/actions/subdomain.ts | 4 ++-- packages/plugin-starknet/src/actions/swap.ts | 4 ++-- packages/plugin-starknet/src/actions/transfer.ts | 4 ++-- packages/plugin-starknet/src/actions/unruggable.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/plugin-starknet/src/actions/subdomain.ts b/packages/plugin-starknet/src/actions/subdomain.ts index 829b642b3b..a608997370 100644 --- a/packages/plugin-starknet/src/actions/subdomain.ts +++ b/packages/plugin-starknet/src/actions/subdomain.ts @@ -9,7 +9,7 @@ import { State, type Action, composeContext, - generateObjectDeprecated, + generateObject, Content, elizaLogger, } from "@elizaos/core"; @@ -107,7 +107,7 @@ export default { }); // Generate transfer content - const content = await generateObjectDeprecated({ + const content = await generateObject({ runtime, context: transferContext, modelClass: ModelClass.MEDIUM, diff --git a/packages/plugin-starknet/src/actions/swap.ts b/packages/plugin-starknet/src/actions/swap.ts index 86e77e00e5..2dc64a802c 100644 --- a/packages/plugin-starknet/src/actions/swap.ts +++ b/packages/plugin-starknet/src/actions/swap.ts @@ -3,7 +3,7 @@ import { ActionExample, composeContext, elizaLogger, - generateObjectDeprecated, + generateObject, HandlerCallback, IAgentRuntime, Memory, @@ -105,7 +105,7 @@ export const executeSwap: Action = { template: swapTemplate, }); - const response = await generateObjectDeprecated({ + const response = await generateObject({ runtime, context: swapContext, modelClass: ModelClass.MEDIUM, diff --git a/packages/plugin-starknet/src/actions/transfer.ts b/packages/plugin-starknet/src/actions/transfer.ts index 59d438d2a1..9e6f59940a 100644 --- a/packages/plugin-starknet/src/actions/transfer.ts +++ b/packages/plugin-starknet/src/actions/transfer.ts @@ -7,7 +7,7 @@ import { composeContext, Content, elizaLogger, - generateObjectDeprecated, + generateObject, HandlerCallback, IAgentRuntime, Memory, @@ -136,7 +136,7 @@ export default { }); // Generate transfer content - const content = await generateObjectDeprecated({ + const content = await generateObject({ runtime, context: transferContext, modelClass: ModelClass.MEDIUM, diff --git a/packages/plugin-starknet/src/actions/unruggable.ts b/packages/plugin-starknet/src/actions/unruggable.ts index c5920fc8aa..dd3619d46c 100644 --- a/packages/plugin-starknet/src/actions/unruggable.ts +++ b/packages/plugin-starknet/src/actions/unruggable.ts @@ -3,7 +3,7 @@ import { ActionExample, composeContext, elizaLogger, - generateObjectDeprecated, + generateObject, HandlerCallback, IAgentRuntime, Memory, @@ -110,7 +110,7 @@ export const deployToken: Action = { template: deployTemplate, }); - const response = await generateObjectDeprecated({ + const response = await generateObject({ runtime, context: deployContext, modelClass: ModelClass.MEDIUM,