import { describe, it } from "mocha";

import { PublicKey } from "@solana/web3.js";

import { SOLMASH_WHITELIST_PROGRAM_ID } from "../../src";
import { getConnection } from "../shared";

describe("get whitelist users", () => {
	const connection = getConnection();

	it("fetch auction info", async () => {
		const response = await connection.getProgramAccounts(
			new PublicKey(SOLMASH_WHITELIST_PROGRAM_ID.mainnet),
			{ filters: [{ dataSize: 12 }] },
		);

		console.log("whitelist users: ", response.length);

		// fs.writeFileSync(
		// 	path.resolve(__dirname, "whitelisted.json"),
		// 	JSON.stringify(response.map((r) => r.pubkey.toString())),
		// );
	});
});
