Skip to content

Commit 7be712e

Browse files
committed
remove extraneous deps
1 parent 7af10f1 commit 7be712e

File tree

6 files changed

+6
-101
lines changed

6 files changed

+6
-101
lines changed

packages/plugin-aptos/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"types": "dist/index.d.ts",
77
"dependencies": {
88
"@ai16z/eliza": "workspace:*",
9-
"@ai16z/plugin-trustdb": "workspace:*",
109
"@aptos-labs/ts-sdk": "^1.26.0",
1110
"bignumber": "1.1.0",
1211
"bignumber.js": "9.1.2",

packages/plugin-evm/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"types": "dist/index.d.ts",
77
"dependencies": {
88
"@ai16z/eliza": "workspace:*",
9-
"@ai16z/plugin-trustdb": "workspace:*",
109
"@lifi/data-types": "5.15.5",
1110
"@lifi/sdk": "3.4.1",
1211
"@lifi/types": "16.3.0",

packages/plugin-flow/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"types": "dist/index.d.ts",
77
"dependencies": {
88
"@ai16z/eliza": "workspace:*",
9-
"@ai16z/plugin-trustdb": "workspace:*",
109
"@onflow/config": "1.5.1",
1110
"@onflow/fcl": "1.13.1",
1211
"@onflow/typedefs": "1.4.0",

packages/plugin-near/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"types": "dist/index.d.ts",
77
"dependencies": {
88
"@ai16z/eliza": "workspace:*",
9-
"@ai16z/plugin-trustdb": "workspace:*",
109
"@ref-finance/ref-sdk": "^1.4.6",
1110
"tsup": "8.3.5",
1211
"near-api-js": "5.0.1",

packages/plugin-solana/src/actions/swap.ts

+6-85
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
import { Connection, PublicKey, VersionedTransaction } from "@solana/web3.js";
2-
import BigNumber from "bignumber.js";
3-
import { v4 as uuidv4 } from "uuid";
4-
import { TrustScoreDatabase } from "@ai16z/plugin-trustdb";
51
import {
62
ActionExample,
3+
composeContext,
4+
generateObjectDeprecated,
75
HandlerCallback,
86
IAgentRuntime,
97
Memory,
108
ModelClass,
9+
settings,
1110
State,
1211
type Action,
13-
composeContext,
14-
generateObjectDeprecated,
15-
settings,
1612
} from "@ai16z/eliza";
17-
import { TokenProvider } from "../providers/token.ts";
18-
import { TrustScoreManager } from "../providers/trustScoreProvider.ts";
13+
import { Connection, PublicKey, VersionedTransaction } from "@solana/web3.js";
14+
import BigNumber from "bignumber.js";
15+
import { getWalletKey } from "../keypairUtils.ts";
1916
import { walletProvider, WalletProvider } from "../providers/wallet.ts";
2017
import { getTokenDecimals } from "./swapUtils.ts";
21-
import { getWalletKey } from "../keypairUtils.ts";
2218

2319
async function swapToken(
2420
connection: Connection,
@@ -362,81 +358,6 @@ export const executeSwap: Action = {
362358
);
363359
}
364360

365-
if (type === "buy") {
366-
const tokenProvider = new TokenProvider(
367-
response.outputTokenCA,
368-
provider,
369-
runtime.cacheManager
370-
);
371-
const module = await import("better-sqlite3");
372-
const Database = module.default;
373-
const trustScoreDb = new TrustScoreDatabase(
374-
new Database(":memory:")
375-
);
376-
// add or get recommender
377-
const uuid = uuidv4();
378-
const recommender = await trustScoreDb.getOrCreateRecommender({
379-
id: uuid,
380-
address: walletPublicKey.toString(),
381-
solanaPubkey: walletPublicKey.toString(),
382-
});
383-
384-
const trustScoreDatabase = new TrustScoreManager(
385-
runtime,
386-
tokenProvider,
387-
trustScoreDb
388-
);
389-
// save the trade
390-
const tradeData = {
391-
buy_amount: response.amount,
392-
is_simulation: false,
393-
};
394-
await trustScoreDatabase.createTradePerformance(
395-
runtime,
396-
response.outputTokenCA,
397-
recommender.id,
398-
tradeData
399-
);
400-
} else if (type === "sell") {
401-
const tokenProvider = new TokenProvider(
402-
response.inputTokenCA,
403-
provider,
404-
runtime.cacheManager
405-
);
406-
const module = await import("better-sqlite3");
407-
const Database = module.default;
408-
const trustScoreDb = new TrustScoreDatabase(
409-
new Database(":memory:")
410-
);
411-
// add or get recommender
412-
const uuid = uuidv4();
413-
const recommender = await trustScoreDb.getOrCreateRecommender({
414-
id: uuid,
415-
address: walletPublicKey.toString(),
416-
solanaPubkey: walletPublicKey.toString(),
417-
});
418-
419-
const trustScoreDatabase = new TrustScoreManager(
420-
runtime,
421-
tokenProvider,
422-
trustScoreDb
423-
);
424-
// save the trade
425-
const sellDetails = {
426-
sell_amount: response.amount,
427-
sell_recommender_id: recommender.id,
428-
};
429-
const sellTimeStamp = new Date().getTime().toString();
430-
await trustScoreDatabase.updateSellDetails(
431-
runtime,
432-
response.inputTokenCA,
433-
recommender.id,
434-
sellTimeStamp,
435-
sellDetails,
436-
false
437-
);
438-
}
439-
440361
console.log("Swap completed successfully!");
441362
console.log(`Transaction ID: ${txid}`);
442363

pnpm-lock.yaml

-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)