import { AnchorProvider } from "@coral-xyz/anchor"; import { Wallet } from "@coral-xyz/anchor/dist/cjs/provider"; import { ConfirmOptions, Connection } from "@solana/web3.js"; import { AccountFetcher } from "../fetcher"; export abstract class BaseContext { readonly connection: Connection; readonly wallet: Wallet; readonly opts: ConfirmOptions; readonly provider: AnchorProvider; readonly fetcher: AccountFetcher; protected constructor( provider: AnchorProvider, wallet: Wallet, fetcher: AccountFetcher, opts: ConfirmOptions, ) { this.connection = provider.connection; this.wallet = wallet; this.opts = opts; this.provider = provider; this.fetcher = fetcher; } }