Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
cygaar committed Dec 24, 2024
1 parent ddafd1c commit 146b3f3
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 37 deletions.
4 changes: 4 additions & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import { suiPlugin } from "@elizaos/plugin-sui";
import { TEEMode, teePlugin } from "@elizaos/plugin-tee";
import { tonPlugin } from "@elizaos/plugin-ton";
import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era";
import { abstractPlugin } from "@elizaos/plugin-abstract";
import Database from "better-sqlite3";
import fs from "fs";
import path from "path";
Expand Down Expand Up @@ -562,6 +563,9 @@ export async function createAgent(
? webhookPlugin
: null,
getSecret(character, "EVM_PROVIDER_URL") ? goatPlugin : null,
getSecret(character, "ABSTRACT_PRIVATE_KEY")
? abstractPlugin
: null,
getSecret(character, "FLOW_ADDRESS") &&
getSecret(character, "FLOW_PRIVATE_KEY")
? flowPlugin
Expand Down
7 changes: 3 additions & 4 deletions packages/plugin-abstract/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "@ai16z/plugin-abstract",
"version": "0.1.6-alpha.4",
"name": "@elizaos/plugin-abstract",
"version": "0.1.7-alpha.1",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"dependencies": {
"@ai16z/eliza": "workspace:*",
"@ai16z/plugin-trustdb": "workspace:*",
"@elizaos/core": "workspace:*",
"tsup": "^8.3.5",
"web3": "^4.15.0",
"viem": "2.21.53"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-abstract/src/actions/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
elizaLogger,
composeContext,
generateObject,
} from "@ai16z/eliza";
} from "@elizaos/core";
import { validateAbstractConfig } from "../environment";

import { Address, createWalletClient, http, parseEther } from "viem";
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-abstract/src/environment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IAgentRuntime } from "@ai16z/eliza";
import { IAgentRuntime } from "@elizaos/core";
import { z } from "zod";

export const abstractEnvSchema = z.object({
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-abstract/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Plugin } from "@ai16z/eliza";
import { Plugin } from "@elizaos/core";

import transfer from "./actions/transfer.ts";

Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-evm/src/templates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Respond with a JSON markdown block containing only the extracted values:
\`\`\`json
{
"token": string | null,
"fromChain": "ethereum" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null,
"toChain": "ethereum" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null,
"fromChain": "ethereum" | "abstract" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null,
"toChain": "ethereum" | "abstract" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null,
"amount": string | null,
"toAddress": string | null
}
Expand All @@ -67,7 +67,7 @@ Respond with a JSON markdown block containing only the extracted values. Use nul
"inputToken": string | null,
"outputToken": string | null,
"amount": string | null,
"chain": "ethereum" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null,
"chain": "ethereum" | "abstract" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null,
"slippage": number | null
}
\`\`\`
Expand Down
5 changes: 4 additions & 1 deletion packages/plugin-evm/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import type {
} from "viem";
import * as viemChains from "viem/chains";

const _SupportedChainList = Object.keys(viemChains) as Array<keyof typeof viemChains>;
const _SupportedChainList = Object.keys(viemChains) as Array<
keyof typeof viemChains
>;
export type SupportedChain = (typeof _SupportedChainList)[number];

// Transaction types
Expand Down Expand Up @@ -88,6 +90,7 @@ export interface BridgeParams {
export interface EvmPluginConfig {
rpcUrl?: {
ethereum?: string;
abstract?: string;
base?: string;
sepolia?: string;
bsc?: string;
Expand Down
49 changes: 23 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 146b3f3

Please sign in to comment.