Skip to content

Commit 7ad5f44

Browse files
committedNov 1, 2024
Fix ts errors
1 parent 93fe5e0 commit 7ad5f44

File tree

6 files changed

+45
-47
lines changed

6 files changed

+45
-47
lines changed
 

‎core/src/actions/pumpfun.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AnchorProvider } from "@coral-xyz/anchor";
2-
import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet";
2+
import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet.js";
33
import { Connection, Keypair, PublicKey } from "@solana/web3.js";
44
import {
55
CreateTokenMetadata,

‎core/src/actions/swapUtils.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1+
import { getAssociatedTokenAddress } from "@solana/spl-token";
12
import {
2-
PublicKey,
3-
Keypair,
3+
BlockhashWithExpiryBlockHeight,
44
Connection,
5-
VersionedTransaction,
6-
LAMPORTS_PER_SOL,
5+
Keypair,
6+
PublicKey,
77
RpcResponseAndContext,
8-
TokenAmount,
98
SimulatedTransactionResponse,
10-
Blockhash,
11-
BlockhashWithExpiryBlockHeight,
9+
TokenAmount,
10+
VersionedTransaction
1211
} from "@solana/web3.js";
13-
import { getAssociatedTokenAddress } from "@solana/spl-token";
14-
import settings from "../core/settings";
12+
import settings from "../core/settings.ts";
1513

1614
const solAddress = settings.SOL_ADDRESS;
1715
const SLIPPAGE = settings.SLIPPAGE;
18-
const connection = new Connection(settings.RPC_URL!);
16+
const connection = new Connection(settings.RPC_URL || "https://api.mainnet-beta.solana.com");
1917
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
2018

2119
export async function delayedCall<T>(

‎core/src/clients/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import DirectClient from "./direct";
1+
import DirectClient from "./direct/index.ts";
22

33
export {
44
TwitterGenerationClient,
55
TwitterInteractionClient,
66
TwitterSearchClient,
7-
} from "./twitter";
8-
export { TelegramClient } from "./telegram";
9-
export { DiscordClient } from "./discord";
7+
} from "./twitter/index.ts";
8+
export { TelegramClient } from "./telegram/index.ts";
9+
export { DiscordClient } from "./discord/index.ts";
1010
export { DirectClient };

‎core/src/providers/token.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Connection } from "@solana/web3.js";
22
// import fetch from "cross-fetch";
3-
import { IAgentRuntime, Memory, Provider, State } from "../core/types";
4-
import settings from "../core/settings";
3+
import { IAgentRuntime, Memory, Provider, State } from "../core/types.ts";
4+
import settings from "../core/settings.ts";
55
import BigNumber from "bignumber.js";
66
import {
77
ProcessedTokenData,
@@ -10,7 +10,7 @@ import {
1010
DexScreenerData,
1111
// DexScreenerPair,
1212
HolderData,
13-
} from "../types/token";
13+
} from "../types/token.ts";
1414
import NodeCache from "node-cache";
1515
import * as fs from "fs";
1616
import * as path from "path";

‎core/src/providers/trustScoreProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
TokenPerformance,
1717
TradePerformance,
1818
} from "../adapters/trustScoreDatabase";
19-
import settings from "../core/settings";
19+
import settings from "../core/settings.ts";
2020

2121
const Wallet = settings.MAIN_WALLET_ADDRESS;
2222
interface TradeData {

‎core/tsconfig.json

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
{
2-
"compilerOptions": {
3-
"target": "es2022",
4-
"module": "es2022",
5-
"lib": ["es2023", "dom"],
6-
"types": ["node"],
7-
"moduleResolution": "bundler",
8-
"outDir": "./dist",
9-
"rootDir": "./src",
10-
"strict": false,
11-
"esModuleInterop": true,
12-
"skipLibCheck": true,
13-
"forceConsistentCasingInFileNames": false,
14-
"allowImportingTsExtensions": true,
15-
"declaration": true,
16-
"emitDeclarationOnly": true,
17-
"resolveJsonModule": true,
18-
"noImplicitAny": false,
19-
"allowJs": true,
20-
"checkJs": false,
21-
"noEmitOnError": false,
22-
"moduleDetection": "force",
23-
"allowArbitraryExtensions": true,
24-
"typeRoots": ["./node_modules/@types", "./types"]
25-
},
26-
"include": ["src/**/*"],
27-
"exclude": ["node_modules", "dist", "src/**/*.d.ts", "types/**/*.test.ts"]
28-
}
1+
{
2+
"compilerOptions": {
3+
"target": "es2022",
4+
"module": "es2022",
5+
"lib": ["es2023", "dom"],
6+
"types": ["node"],
7+
"moduleResolution": "bundler",
8+
"outDir": "./dist",
9+
"rootDir": "./src",
10+
"strict": false,
11+
"esModuleInterop": true,
12+
"skipLibCheck": true,
13+
"forceConsistentCasingInFileNames": false,
14+
"allowImportingTsExtensions": true,
15+
"declaration": true,
16+
"emitDeclarationOnly": true,
17+
"resolveJsonModule": true,
18+
"noImplicitAny": false,
19+
"allowJs": true,
20+
"checkJs": false,
21+
"noEmitOnError": false,
22+
"moduleDetection": "force",
23+
"allowArbitraryExtensions": true,
24+
"typeRoots": ["./node_modules/@types", "./types"]
25+
},
26+
"include": ["src/**/*",],
27+
"exclude": ["node_modules", "dist", "src/**/*.d.ts", "types/**/*.test.ts"]
28+
}

0 commit comments

Comments
 (0)