UNPKG

orca-clmm-agent

Version:

Orca Whirlpool clmm library for automated position management

18 lines (17 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const solana_1 = require("./solana"); const kit_1 = require("@solana/kit"); // Simple unit test using a mocked transaction detail object const rpc = (0, kit_1.createSolanaRpc)((0, kit_1.mainnet)("https://api.mainnet-beta.solana.com")); describe("getCreatedAssociatedTokenAccounts", () => { it("detects created associated token accounts", async () => { const txHash = "3JLbErP3dZZKx766gqXx5p8GCStN6gSBP9rThBK3uoaTtwa1d5J6FotQEfZqg5udaiKETn7NFwBUbKN9y9AFeqgr"; const details = await (0, solana_1.getTransactionDetails)(rpc, txHash); const result = (0, solana_1.getCreatedAssociatedTokenAccounts)(details); expect(result.length).toBe(0); // expect(result[0].ata.toString()).toBe("4xZSBb1T876DQGCZRrCRchV1Nxmx1GYRdQsoCiGJRm59"); // expect(result[0].owner?.toString()).toBe("3oygBmi6XwSvMPvZz6YjQrQ8Euud1s6Lg6rJ4er3Jw9p"); // expect(result[0].mint.toString()).toBe("So11111111111111111111111111111111111111112"); // wSOL }); });