This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Connection, PublicKey, clusterApiUrl } from '@solana/web3.js'; | |
(async () => { | |
const conn = new Connection( | |
process.env.RPC_URL ?? clusterApiUrl('mainnet-beta'), | |
'confirmed' | |
); | |
// From https://orca-so.gitbook.io/orca-developer-portal/whirlpools/interacting-with-the-protocol/orca-whirlpools-parameters | |
const whirlpoolProgramId = new PublicKey('whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/ban-ts-comment */ | |
// @ts-nocheck | |
import duckdb from "duckdb"; | |
import assert from "node:assert"; | |
import { tableFromIPC, RecordBatchReader, Table, Int32, makeData, Vector } from "apache-arrow"; | |
const RANGE_SIZE = 1_000; | |
const SQL = `select * from range(0,${RANGE_SIZE}) tbl(i)`; | |
const expectedTable = new Table({ |
OlderNewer