import { Effect } from "effect"; import type { Address, BlockTag, GetValue, Hash } from "viem"; import { ContractReader, ContractWriter } from "../contract/index.js"; import type { Abi, ContractFunctionArgs, ContractFunctionReturnType, ReadFunctionName, SimulateResult, TxOverrides, WriteFunctionName } from "../types/index.js"; type ReadArgs> = ContractFunctionArgs; type ReadCallOptions = { readonly account?: Address | undefined; readonly blockNumber?: bigint | undefined; readonly blockTag?: BlockTag | undefined; }; type ReadArgsWithOptionsParam> = readonly [] extends ReadArgs ? [args?: ReadArgs, options?: ReadCallOptions | undefined] : [args: ReadArgs, options?: ReadCallOptions | undefined]; type WriteArgs> = ContractFunctionArgs; type WriteArgsField> = readonly [] extends WriteArgs ? { readonly args?: WriteArgs | undefined; } : { readonly args: WriteArgs; }; type WriteOverrides> = { readonly account: Address; readonly overrides?: TxOverrides | undefined; readonly gas?: bigint | undefined; } & WriteArgsField & GetValue; export type TypedContract = { readonly address: Address; readonly abi: TAbi; readonly read: >(chainId: number, functionName: TFunctionName, ...args: ReadArgsWithOptionsParam) => Effect.Effect, Error, ContractReader>; readonly simulate: >(chainId: number, functionName: TFunctionName, args: WriteOverrides) => Effect.Effect; readonly estimateGas: >(chainId: number, functionName: TFunctionName, args: WriteOverrides) => Effect.Effect; readonly write: >(chainId: number, functionName: TFunctionName, args: WriteOverrides) => Effect.Effect; }; export declare function typedContract(abi: TAbi, address: Address): TypedContract; export {}; //# sourceMappingURL=typed-contract.d.ts.map