import { BigNumberish, Overrides, BytesLike } from "ethers"; import { HandlerOptions } from "@sentio/sdk"; import { BindOptions, BaseProcessor, BaseProcessorTemplate, BoundContractView, ContractContext, ContractView, EthChainId, TypedCallTrace, EthContext, EthFetchConfig, PreprocessResult } from "@sentio/sdk/eth"; import { EthCallParam, EthCallContext, PreparedData } from "@sentio/protos"; import { ERC1155, ApprovalForAllEvent, ApprovalForAllEventFilter, TransferBatchEvent, TransferBatchEventFilter, TransferSingleEvent, TransferSingleEventFilter, URIEvent, URIEventFilter } from "./ERC1155.js"; export interface BalanceOfCallObject { account: string; id: bigint; } export type BalanceOfCallTrace = TypedCallTrace<[ string, bigint ], BalanceOfCallObject>; export interface BalanceOfBatchCallObject { accounts: string[]; ids: bigint[]; } export type BalanceOfBatchCallTrace = TypedCallTrace<[ string[], bigint[] ], BalanceOfBatchCallObject>; export interface IsApprovedForAllCallObject { account: string; operator: string; } export type IsApprovedForAllCallTrace = TypedCallTrace<[ string, string ], IsApprovedForAllCallObject>; export interface SafeBatchTransferFromCallObject { from: string; to: string; ids: bigint[]; amounts: bigint[]; data: string; } export type SafeBatchTransferFromCallTrace = TypedCallTrace<[ string, string, bigint[], bigint[], string ], SafeBatchTransferFromCallObject>; export interface SafeTransferFromCallObject { from: string; to: string; id: bigint; amount: bigint; data: string; } export type SafeTransferFromCallTrace = TypedCallTrace<[ string, string, bigint, bigint, string ], SafeTransferFromCallObject>; export interface SetApprovalForAllCallObject { operator: string; approved: boolean; } export type SetApprovalForAllCallTrace = TypedCallTrace<[ string, boolean ], SetApprovalForAllCallObject>; export interface SupportsInterfaceCallObject { interfaceId: string; } export type SupportsInterfaceCallTrace = TypedCallTrace<[ string ], SupportsInterfaceCallObject>; export interface UriCallObject { id: bigint; } export type UriCallTrace = TypedCallTrace<[bigint], UriCallObject>; export declare class ERC1155ContractView extends ContractView { constructor(contract: ERC1155); balanceOf(account: string, id: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; balanceOfBatch(accounts: string[], ids: BigNumberish[], overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; isApprovedForAll(account: string, operator: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; supportsInterface(interfaceId: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; uri(id: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; callStatic: { contract: ERC1155; safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; }; encodeCall: { balanceOf(account: string, id: BigNumberish, callContext: EthCallContext): EthCallParam; balanceOfBatch(accounts: string[], ids: BigNumberish[], callContext: EthCallContext): EthCallParam; isApprovedForAll(account: string, operator: string, callContext: EthCallContext): EthCallParam; safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, callContext: EthCallContext): EthCallParam; safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, callContext: EthCallContext): EthCallParam; setApprovalForAll(operator: string, approved: boolean, callContext: EthCallContext): EthCallParam; supportsInterface(interfaceId: BytesLike, callContext: EthCallContext): EthCallParam; uri(id: BigNumberish, callContext: EthCallContext): EthCallParam; }; } export declare class ERC1155BoundContractView extends BoundContractView { balanceOf(account: string, id: BigNumberish, overrides?: Overrides): Promise; balanceOfBatch(accounts: string[], ids: BigNumberish[], overrides?: Overrides): Promise; isApprovedForAll(account: string, operator: string, overrides?: Overrides): Promise; supportsInterface(interfaceId: BytesLike, overrides?: Overrides): Promise; uri(id: BigNumberish, overrides?: Overrides): Promise; callStatic: { view: ERC1155ContractView; context: EthContext; safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, overrides?: Overrides): Promise; safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, overrides?: Overrides): Promise; setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides): Promise; }; encodeCall: { view: ERC1155ContractView; context: EthContext; balanceOf(account: string, id: BigNumberish, overrides?: Overrides): EthCallParam; balanceOfBatch(accounts: string[], ids: BigNumberish[], overrides?: Overrides): EthCallParam; isApprovedForAll(account: string, operator: string, overrides?: Overrides): EthCallParam; safeBatchTransferFrom(from: string, to: string, ids: BigNumberish[], amounts: BigNumberish[], data: BytesLike, overrides?: Overrides): EthCallParam; safeTransferFrom(from: string, to: string, id: BigNumberish, amount: BigNumberish, data: BytesLike, overrides?: Overrides): EthCallParam; setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides): EthCallParam; supportsInterface(interfaceId: BytesLike, overrides?: Overrides): EthCallParam; uri(id: BigNumberish, overrides?: Overrides): EthCallParam; }; } export type ERC1155Context = ContractContext; export declare class ERC1155Processor extends BaseProcessor { onEventApprovalForAll(handler: (event: ApprovalForAllEvent, ctx: ERC1155Context) => void, filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalForAllEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransferBatch(handler: (event: TransferBatchEvent, ctx: ERC1155Context) => void, filter?: TransferBatchEventFilter | TransferBatchEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferBatchEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransferSingle(handler: (event: TransferSingleEvent, ctx: ERC1155Context) => void, filter?: TransferSingleEventFilter | TransferSingleEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferSingleEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventURI(handler: (event: URIEvent, ctx: ERC1155Context) => void, filter?: URIEventFilter | URIEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: URIEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; onCallBalanceOf(handler: (call: BalanceOfCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: BalanceOfCallTrace, ctx: ERC1155Context) => Promise): this; onCallBalanceOfBatch(handler: (call: BalanceOfBatchCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: BalanceOfBatchCallTrace, ctx: ERC1155Context) => Promise): this; onCallIsApprovedForAll(handler: (call: IsApprovedForAllCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: IsApprovedForAllCallTrace, ctx: ERC1155Context) => Promise): this; onCallSafeBatchTransferFrom(handler: (call: SafeBatchTransferFromCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SafeBatchTransferFromCallTrace, ctx: ERC1155Context) => Promise): this; onCallSafeTransferFrom(handler: (call: SafeTransferFromCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SafeTransferFromCallTrace, ctx: ERC1155Context) => Promise): this; onCallSetApprovalForAll(handler: (call: SetApprovalForAllCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SetApprovalForAllCallTrace, ctx: ERC1155Context) => Promise): this; onCallSupportsInterface(handler: (call: SupportsInterfaceCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SupportsInterfaceCallTrace, ctx: ERC1155Context) => Promise): this; onCallUri(handler: (call: UriCallTrace, ctx: ERC1155Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: UriCallTrace, ctx: ERC1155Context) => Promise): this; static filters: { ApprovalForAll(account?: string | null, operator?: string | null, approved?: null): ApprovalForAllEventFilter; TransferBatch(operator?: string | null, from?: string | null, to?: string | null, ids?: null, values?: null): TransferBatchEventFilter; TransferSingle(operator?: string | null, from?: string | null, to?: string | null, id?: null, value?: null): TransferSingleEventFilter; URI(value?: null, id?: BigNumberish | null): URIEventFilter; }; protected CreateBoundContractView(): ERC1155BoundContractView; static bind(options: BindOptions): ERC1155Processor; } export declare class ERC1155ProcessorTemplate extends BaseProcessorTemplate { bindInternal(options: BindOptions): ERC1155Processor; onEventApprovalForAll(handler: (event: ApprovalForAllEvent, ctx: ERC1155Context) => void, filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalForAllEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransferBatch(handler: (event: TransferBatchEvent, ctx: ERC1155Context) => void, filter?: TransferBatchEventFilter | TransferBatchEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferBatchEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransferSingle(handler: (event: TransferSingleEvent, ctx: ERC1155Context) => void, filter?: TransferSingleEventFilter | TransferSingleEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferSingleEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventURI(handler: (event: URIEvent, ctx: ERC1155Context) => void, filter?: URIEventFilter | URIEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: URIEvent, ctx: ERC1155Context, preprocessStore: { [k: string]: any; }) => Promise): this; } export declare function getERC1155Contract(chainId: EthChainId, address: string): ERC1155ContractView; export declare function getERC1155ContractOnContext(context: EthContext, address: string): ERC1155BoundContractView; //# sourceMappingURL=erc1155-processor.d.ts.map