import { BigNumberish, Overrides } 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 { ERC20Bytes, ApprovalEvent, ApprovalEventFilter, TransferEvent, TransferEventFilter } from "./ERC20Bytes.js"; export interface NameCallObject { } export type NameCallTrace = TypedCallTrace<[], NameCallObject>; export interface ApproveCallObject { spender: string; value: bigint; } export type ApproveCallTrace = TypedCallTrace<[ string, bigint ], ApproveCallObject>; export interface TotalSupplyCallObject { } export type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>; export interface TransferFromCallObject { from: string; to: string; value: bigint; } export type TransferFromCallTrace = TypedCallTrace<[ string, string, bigint ], TransferFromCallObject>; export interface DecimalsCallObject { } export type DecimalsCallTrace = TypedCallTrace<[], DecimalsCallObject>; export interface BalanceOfCallObject { who: string; } export type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>; export interface SymbolCallObject { } export type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>; export interface TransferCallObject { to: string; value: bigint; } export type TransferCallTrace = TypedCallTrace<[ string, bigint ], TransferCallObject>; export interface AllowanceCallObject { owner: string; spender: string; } export type AllowanceCallTrace = TypedCallTrace<[ string, string ], AllowanceCallObject>; export declare class ERC20BytesContractView extends ContractView { constructor(contract: ERC20Bytes); name(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; totalSupply(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; decimals(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; balanceOf(who: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; symbol(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; allowance(owner: string, spender: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; callStatic: { contract: ERC20Bytes; approve(spender: string, value: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; transfer(to: string, value: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; }; encodeCall: { name(callContext: EthCallContext): EthCallParam; approve(spender: string, value: BigNumberish, callContext: EthCallContext): EthCallParam; totalSupply(callContext: EthCallContext): EthCallParam; transferFrom(from: string, to: string, value: BigNumberish, callContext: EthCallContext): EthCallParam; decimals(callContext: EthCallContext): EthCallParam; balanceOf(who: string, callContext: EthCallContext): EthCallParam; symbol(callContext: EthCallContext): EthCallParam; transfer(to: string, value: BigNumberish, callContext: EthCallContext): EthCallParam; allowance(owner: string, spender: string, callContext: EthCallContext): EthCallParam; }; } export declare class ERC20BytesBoundContractView extends BoundContractView { name(overrides?: Overrides): Promise; totalSupply(overrides?: Overrides): Promise; decimals(overrides?: Overrides): Promise; balanceOf(who: string, overrides?: Overrides): Promise; symbol(overrides?: Overrides): Promise; allowance(owner: string, spender: string, overrides?: Overrides): Promise; callStatic: { view: ERC20BytesContractView; context: EthContext; approve(spender: string, value: BigNumberish, overrides?: Overrides): Promise; transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides): Promise; transfer(to: string, value: BigNumberish, overrides?: Overrides): Promise; }; encodeCall: { view: ERC20BytesContractView; context: EthContext; name(overrides?: Overrides): EthCallParam; approve(spender: string, value: BigNumberish, overrides?: Overrides): EthCallParam; totalSupply(overrides?: Overrides): EthCallParam; transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides): EthCallParam; decimals(overrides?: Overrides): EthCallParam; balanceOf(who: string, overrides?: Overrides): EthCallParam; symbol(overrides?: Overrides): EthCallParam; transfer(to: string, value: BigNumberish, overrides?: Overrides): EthCallParam; allowance(owner: string, spender: string, overrides?: Overrides): EthCallParam; }; } export type ERC20BytesContext = ContractContext; export declare class ERC20BytesProcessor extends BaseProcessor { onEventApproval(handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void, filter?: ApprovalEventFilter | ApprovalEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalEvent, ctx: ERC20BytesContext, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransfer(handler: (event: TransferEvent, ctx: ERC20BytesContext) => void, filter?: TransferEventFilter | TransferEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferEvent, ctx: ERC20BytesContext, preprocessStore: { [k: string]: any; }) => Promise): this; onCallName(handler: (call: NameCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: NameCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallApprove(handler: (call: ApproveCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: ApproveCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallTotalSupply(handler: (call: TotalSupplyCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TotalSupplyCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallTransferFrom(handler: (call: TransferFromCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TransferFromCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallDecimals(handler: (call: DecimalsCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: DecimalsCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallBalanceOf(handler: (call: BalanceOfCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: BalanceOfCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallSymbol(handler: (call: SymbolCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SymbolCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallTransfer(handler: (call: TransferCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TransferCallTrace, ctx: ERC20BytesContext) => Promise): this; onCallAllowance(handler: (call: AllowanceCallTrace, ctx: ERC20BytesContext) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: AllowanceCallTrace, ctx: ERC20BytesContext) => Promise): this; static filters: { Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter; }; protected CreateBoundContractView(): ERC20BytesBoundContractView; static bind(options: BindOptions): ERC20BytesProcessor; } export declare class ERC20BytesProcessorTemplate extends BaseProcessorTemplate { bindInternal(options: BindOptions): ERC20BytesProcessor; onEventApproval(handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void, filter?: ApprovalEventFilter | ApprovalEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalEvent, ctx: ERC20BytesContext, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransfer(handler: (event: TransferEvent, ctx: ERC20BytesContext) => void, filter?: TransferEventFilter | TransferEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferEvent, ctx: ERC20BytesContext, preprocessStore: { [k: string]: any; }) => Promise): this; } export declare function getERC20BytesContract(chainId: EthChainId, address: string): ERC20BytesContractView; export declare function getERC20BytesContractOnContext(context: EthContext, address: string): ERC20BytesBoundContractView; //# sourceMappingURL=erc20bytes-processor.d.ts.map