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 { ERC721, ApprovalEvent, ApprovalEventFilter, ApprovalForAllEvent, ApprovalForAllEventFilter, TransferEvent, TransferEventFilter } from "./ERC721.js"; export interface ApproveCallObject { to: string; tokenId: bigint; } export type ApproveCallTrace = TypedCallTrace<[ string, bigint ], ApproveCallObject>; export interface TotalSupplyCallObject { } export type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>; export interface BalanceOfCallObject { owner: string; } export type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>; export interface GetApprovedCallObject { tokenId: bigint; } export type GetApprovedCallTrace = TypedCallTrace<[ bigint ], GetApprovedCallObject>; export interface IsApprovedForAllCallObject { owner: string; operator: string; } export type IsApprovedForAllCallTrace = TypedCallTrace<[ string, string ], IsApprovedForAllCallObject>; export interface NameCallObject { } export type NameCallTrace = TypedCallTrace<[], NameCallObject>; export interface OwnerOfCallObject { tokenId: bigint; } export type OwnerOfCallTrace = TypedCallTrace<[bigint], OwnerOfCallObject>; export interface SafeTransferFrom_address_address_uint256CallObject { from: string; to: string; tokenId: bigint; } export type SafeTransferFrom_address_address_uint256CallTrace = TypedCallTrace<[ string, string, bigint ], SafeTransferFrom_address_address_uint256CallObject>; export interface SafeTransferFrom_address_address_uint256_bytesCallObject { from: string; to: string; tokenId: bigint; data: string; } export type SafeTransferFrom_address_address_uint256_bytesCallTrace = TypedCallTrace<[ string, string, bigint, string ], SafeTransferFrom_address_address_uint256_bytesCallObject>; 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 SymbolCallObject { } export type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>; export interface TokenURICallObject { tokenId: bigint; } export type TokenURICallTrace = TypedCallTrace<[bigint], TokenURICallObject>; export interface TransferFromCallObject { from: string; to: string; tokenId: bigint; } export type TransferFromCallTrace = TypedCallTrace<[ string, string, bigint ], TransferFromCallObject>; export declare class ERC721ContractView extends ContractView { constructor(contract: ERC721); totalSupply(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; balanceOf(owner: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; getApproved(tokenId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; isApprovedForAll(owner: string, operator: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; name(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; ownerOf(tokenId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; supportsInterface(interfaceId: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; symbol(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; tokenURI(tokenId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; callStatic: { contract: ERC721; approve(to: string, tokenId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; safeTransferFrom_address_address_uint256(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; safeTransferFrom_address_address_uint256_bytes(from: string, to: string, tokenId: BigNumberish, data: BytesLike, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; setApprovalForAll(operator: string, _approved: boolean, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; }; encodeCall: { approve(to: string, tokenId: BigNumberish, callContext: EthCallContext): EthCallParam; totalSupply(callContext: EthCallContext): EthCallParam; balanceOf(owner: string, callContext: EthCallContext): EthCallParam; getApproved(tokenId: BigNumberish, callContext: EthCallContext): EthCallParam; isApprovedForAll(owner: string, operator: string, callContext: EthCallContext): EthCallParam; name(callContext: EthCallContext): EthCallParam; ownerOf(tokenId: BigNumberish, callContext: EthCallContext): EthCallParam; safeTransferFrom_address_address_uint256(from: string, to: string, tokenId: BigNumberish, callContext: EthCallContext): EthCallParam; safeTransferFrom_address_address_uint256_bytes(from: string, to: string, tokenId: BigNumberish, data: BytesLike, callContext: EthCallContext): EthCallParam; setApprovalForAll(operator: string, _approved: boolean, callContext: EthCallContext): EthCallParam; supportsInterface(interfaceId: BytesLike, callContext: EthCallContext): EthCallParam; symbol(callContext: EthCallContext): EthCallParam; tokenURI(tokenId: BigNumberish, callContext: EthCallContext): EthCallParam; transferFrom(from: string, to: string, tokenId: BigNumberish, callContext: EthCallContext): EthCallParam; }; } export declare class ERC721BoundContractView extends BoundContractView { totalSupply(overrides?: Overrides): Promise; balanceOf(owner: string, overrides?: Overrides): Promise; getApproved(tokenId: BigNumberish, overrides?: Overrides): Promise; isApprovedForAll(owner: string, operator: string, overrides?: Overrides): Promise; name(overrides?: Overrides): Promise; ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise; supportsInterface(interfaceId: BytesLike, overrides?: Overrides): Promise; symbol(overrides?: Overrides): Promise; tokenURI(tokenId: BigNumberish, overrides?: Overrides): Promise; callStatic: { view: ERC721ContractView; context: EthContext; approve(to: string, tokenId: BigNumberish, overrides?: Overrides): Promise; safeTransferFrom_address_address_uint256(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides): Promise; safeTransferFrom_address_address_uint256_bytes(from: string, to: string, tokenId: BigNumberish, data: BytesLike, overrides?: Overrides): Promise; setApprovalForAll(operator: string, _approved: boolean, overrides?: Overrides): Promise; transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides): Promise; }; encodeCall: { view: ERC721ContractView; context: EthContext; approve(to: string, tokenId: BigNumberish, overrides?: Overrides): EthCallParam; totalSupply(overrides?: Overrides): EthCallParam; balanceOf(owner: string, overrides?: Overrides): EthCallParam; getApproved(tokenId: BigNumberish, overrides?: Overrides): EthCallParam; isApprovedForAll(owner: string, operator: string, overrides?: Overrides): EthCallParam; name(overrides?: Overrides): EthCallParam; ownerOf(tokenId: BigNumberish, overrides?: Overrides): EthCallParam; safeTransferFrom_address_address_uint256(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides): EthCallParam; safeTransferFrom_address_address_uint256_bytes(from: string, to: string, tokenId: BigNumberish, data: BytesLike, overrides?: Overrides): EthCallParam; setApprovalForAll(operator: string, _approved: boolean, overrides?: Overrides): EthCallParam; supportsInterface(interfaceId: BytesLike, overrides?: Overrides): EthCallParam; symbol(overrides?: Overrides): EthCallParam; tokenURI(tokenId: BigNumberish, overrides?: Overrides): EthCallParam; transferFrom(from: string, to: string, tokenId: BigNumberish, overrides?: Overrides): EthCallParam; }; } export type ERC721Context = ContractContext; export declare class ERC721Processor extends BaseProcessor { onEventApproval(handler: (event: ApprovalEvent, ctx: ERC721Context) => void, filter?: ApprovalEventFilter | ApprovalEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalEvent, ctx: ERC721Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventApprovalForAll(handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void, filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalForAllEvent, ctx: ERC721Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransfer(handler: (event: TransferEvent, ctx: ERC721Context) => void, filter?: TransferEventFilter | TransferEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferEvent, ctx: ERC721Context, preprocessStore: { [k: string]: any; }) => Promise): this; onCallApprove(handler: (call: ApproveCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: ApproveCallTrace, ctx: ERC721Context) => Promise): this; onCallTotalSupply(handler: (call: TotalSupplyCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TotalSupplyCallTrace, ctx: ERC721Context) => Promise): this; onCallBalanceOf(handler: (call: BalanceOfCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: BalanceOfCallTrace, ctx: ERC721Context) => Promise): this; onCallGetApproved(handler: (call: GetApprovedCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: GetApprovedCallTrace, ctx: ERC721Context) => Promise): this; onCallIsApprovedForAll(handler: (call: IsApprovedForAllCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: IsApprovedForAllCallTrace, ctx: ERC721Context) => Promise): this; onCallName(handler: (call: NameCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: NameCallTrace, ctx: ERC721Context) => Promise): this; onCallOwnerOf(handler: (call: OwnerOfCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: OwnerOfCallTrace, ctx: ERC721Context) => Promise): this; onCallSafeTransferFrom_address_address_uint256(handler: (call: SafeTransferFrom_address_address_uint256CallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SafeTransferFrom_address_address_uint256CallTrace, ctx: ERC721Context) => Promise): this; onCallSafeTransferFrom_address_address_uint256_bytes(handler: (call: SafeTransferFrom_address_address_uint256_bytesCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SafeTransferFrom_address_address_uint256_bytesCallTrace, ctx: ERC721Context) => Promise): this; onCallSetApprovalForAll(handler: (call: SetApprovalForAllCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SetApprovalForAllCallTrace, ctx: ERC721Context) => Promise): this; onCallSupportsInterface(handler: (call: SupportsInterfaceCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SupportsInterfaceCallTrace, ctx: ERC721Context) => Promise): this; onCallSymbol(handler: (call: SymbolCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SymbolCallTrace, ctx: ERC721Context) => Promise): this; onCallTokenURI(handler: (call: TokenURICallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TokenURICallTrace, ctx: ERC721Context) => Promise): this; onCallTransferFrom(handler: (call: TransferFromCallTrace, ctx: ERC721Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TransferFromCallTrace, ctx: ERC721Context) => Promise): this; static filters: { Approval(owner?: string | null, approved?: string | null, tokenId?: BigNumberish | null): ApprovalEventFilter; ApprovalForAll(owner?: string | null, operator?: string | null, approved?: null): ApprovalForAllEventFilter; Transfer(from?: string | null, to?: string | null, tokenId?: BigNumberish | null): TransferEventFilter; }; protected CreateBoundContractView(): ERC721BoundContractView; static bind(options: BindOptions): ERC721Processor; } export declare class ERC721ProcessorTemplate extends BaseProcessorTemplate { bindInternal(options: BindOptions): ERC721Processor; onEventApproval(handler: (event: ApprovalEvent, ctx: ERC721Context) => void, filter?: ApprovalEventFilter | ApprovalEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalEvent, ctx: ERC721Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventApprovalForAll(handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void, filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalForAllEvent, ctx: ERC721Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransfer(handler: (event: TransferEvent, ctx: ERC721Context) => void, filter?: TransferEventFilter | TransferEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferEvent, ctx: ERC721Context, preprocessStore: { [k: string]: any; }) => Promise): this; } export declare function getERC721Contract(chainId: EthChainId, address: string): ERC721ContractView; export declare function getERC721ContractOnContext(context: EthContext, address: string): ERC721BoundContractView; //# sourceMappingURL=erc721-processor.d.ts.map