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 { ERC20, ApprovalEvent, ApprovalEventFilter, OwnershipTransferredEvent, OwnershipTransferredEventFilter, TransferEvent, TransferEventFilter } from "./ERC20.js"; export interface AllowanceCallObject { owner: string; spender: string; } export type AllowanceCallTrace = TypedCallTrace<[ string, string ], AllowanceCallObject>; export interface ApproveCallObject { spender: string; amount: bigint; } export type ApproveCallTrace = TypedCallTrace<[ string, bigint ], ApproveCallObject>; export interface BalanceOfCallObject { account: string; } export type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>; export interface BurnCallObject { amount: bigint; } export type BurnCallTrace = TypedCallTrace<[bigint], BurnCallObject>; export interface BurnFromCallObject { account: string; amount: bigint; } export type BurnFromCallTrace = TypedCallTrace<[ string, bigint ], BurnFromCallObject>; export interface DecimalsCallObject { } export type DecimalsCallTrace = TypedCallTrace<[], DecimalsCallObject>; export interface DecreaseAllowanceCallObject { spender: string; subtractedValue: bigint; } export type DecreaseAllowanceCallTrace = TypedCallTrace<[ string, bigint ], DecreaseAllowanceCallObject>; export interface IncreaseAllowanceCallObject { spender: string; addedValue: bigint; } export type IncreaseAllowanceCallTrace = TypedCallTrace<[ string, bigint ], IncreaseAllowanceCallObject>; export interface LockerCallObject { } export type LockerCallTrace = TypedCallTrace<[], LockerCallObject>; export interface NameCallObject { } export type NameCallTrace = TypedCallTrace<[], NameCallObject>; export interface OwnerCallObject { } export type OwnerCallTrace = TypedCallTrace<[], OwnerCallObject>; export interface RenounceOwnershipCallObject { } export type RenounceOwnershipCallTrace = TypedCallTrace<[ ], RenounceOwnershipCallObject>; export interface SetLockerCallObject { _locker: string; } export type SetLockerCallTrace = TypedCallTrace<[string], SetLockerCallObject>; export interface SymbolCallObject { } export type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>; export interface TotalSupplyCallObject { } export type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>; export interface TransferCallObject { recipient: string; amount: bigint; } export type TransferCallTrace = TypedCallTrace<[ string, bigint ], TransferCallObject>; export interface TransferFromCallObject { sender: string; recipient: string; amount: bigint; } export type TransferFromCallTrace = TypedCallTrace<[ string, string, bigint ], TransferFromCallObject>; export interface TransferOwnershipCallObject { newOwner: string; } export type TransferOwnershipCallTrace = TypedCallTrace<[ string ], TransferOwnershipCallObject>; export declare class ERC20ContractView extends ContractView { constructor(contract: ERC20); allowance(owner: string, spender: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; balanceOf(account: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; decimals(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; locker(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; name(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; owner(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; symbol(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; totalSupply(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; callStatic: { contract: ERC20; approve(spender: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; burn(amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; burnFrom(account: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; renounceOwnership(overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; setLocker(_locker: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; transfer(recipient: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; transferFrom(sender: string, recipient: string, amount: BigNumberish, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; transferOwnership(newOwner: string, overrides?: Overrides, preparedData?: PreparedData, ethCallContext?: EthCallContext): Promise; }; encodeCall: { allowance(owner: string, spender: string, callContext: EthCallContext): EthCallParam; approve(spender: string, amount: BigNumberish, callContext: EthCallContext): EthCallParam; balanceOf(account: string, callContext: EthCallContext): EthCallParam; burn(amount: BigNumberish, callContext: EthCallContext): EthCallParam; burnFrom(account: string, amount: BigNumberish, callContext: EthCallContext): EthCallParam; decimals(callContext: EthCallContext): EthCallParam; decreaseAllowance(spender: string, subtractedValue: BigNumberish, callContext: EthCallContext): EthCallParam; increaseAllowance(spender: string, addedValue: BigNumberish, callContext: EthCallContext): EthCallParam; locker(callContext: EthCallContext): EthCallParam; name(callContext: EthCallContext): EthCallParam; owner(callContext: EthCallContext): EthCallParam; renounceOwnership(callContext: EthCallContext): EthCallParam; setLocker(_locker: string, callContext: EthCallContext): EthCallParam; symbol(callContext: EthCallContext): EthCallParam; totalSupply(callContext: EthCallContext): EthCallParam; transfer(recipient: string, amount: BigNumberish, callContext: EthCallContext): EthCallParam; transferFrom(sender: string, recipient: string, amount: BigNumberish, callContext: EthCallContext): EthCallParam; transferOwnership(newOwner: string, callContext: EthCallContext): EthCallParam; }; } export declare class ERC20BoundContractView extends BoundContractView { allowance(owner: string, spender: string, overrides?: Overrides): Promise; balanceOf(account: string, overrides?: Overrides): Promise; decimals(overrides?: Overrides): Promise; locker(overrides?: Overrides): Promise; name(overrides?: Overrides): Promise; owner(overrides?: Overrides): Promise; symbol(overrides?: Overrides): Promise; totalSupply(overrides?: Overrides): Promise; callStatic: { view: ERC20ContractView; context: EthContext; approve(spender: string, amount: BigNumberish, overrides?: Overrides): Promise; burn(amount: BigNumberish, overrides?: Overrides): Promise; burnFrom(account: string, amount: BigNumberish, overrides?: Overrides): Promise; decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides): Promise; increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides): Promise; renounceOwnership(overrides?: Overrides): Promise; setLocker(_locker: string, overrides?: Overrides): Promise; transfer(recipient: string, amount: BigNumberish, overrides?: Overrides): Promise; transferFrom(sender: string, recipient: string, amount: BigNumberish, overrides?: Overrides): Promise; transferOwnership(newOwner: string, overrides?: Overrides): Promise; }; encodeCall: { view: ERC20ContractView; context: EthContext; allowance(owner: string, spender: string, overrides?: Overrides): EthCallParam; approve(spender: string, amount: BigNumberish, overrides?: Overrides): EthCallParam; balanceOf(account: string, overrides?: Overrides): EthCallParam; burn(amount: BigNumberish, overrides?: Overrides): EthCallParam; burnFrom(account: string, amount: BigNumberish, overrides?: Overrides): EthCallParam; decimals(overrides?: Overrides): EthCallParam; decreaseAllowance(spender: string, subtractedValue: BigNumberish, overrides?: Overrides): EthCallParam; increaseAllowance(spender: string, addedValue: BigNumberish, overrides?: Overrides): EthCallParam; locker(overrides?: Overrides): EthCallParam; name(overrides?: Overrides): EthCallParam; owner(overrides?: Overrides): EthCallParam; renounceOwnership(overrides?: Overrides): EthCallParam; setLocker(_locker: string, overrides?: Overrides): EthCallParam; symbol(overrides?: Overrides): EthCallParam; totalSupply(overrides?: Overrides): EthCallParam; transfer(recipient: string, amount: BigNumberish, overrides?: Overrides): EthCallParam; transferFrom(sender: string, recipient: string, amount: BigNumberish, overrides?: Overrides): EthCallParam; transferOwnership(newOwner: string, overrides?: Overrides): EthCallParam; }; } export type ERC20Context = ContractContext; export declare class ERC20Processor extends BaseProcessor { onEventApproval(handler: (event: ApprovalEvent, ctx: ERC20Context) => void, filter?: ApprovalEventFilter | ApprovalEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalEvent, ctx: ERC20Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventOwnershipTransferred(handler: (event: OwnershipTransferredEvent, ctx: ERC20Context) => void, filter?: OwnershipTransferredEventFilter | OwnershipTransferredEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: OwnershipTransferredEvent, ctx: ERC20Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransfer(handler: (event: TransferEvent, ctx: ERC20Context) => void, filter?: TransferEventFilter | TransferEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferEvent, ctx: ERC20Context, preprocessStore: { [k: string]: any; }) => Promise): this; onCallAllowance(handler: (call: AllowanceCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: AllowanceCallTrace, ctx: ERC20Context) => Promise): this; onCallApprove(handler: (call: ApproveCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: ApproveCallTrace, ctx: ERC20Context) => Promise): this; onCallBalanceOf(handler: (call: BalanceOfCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: BalanceOfCallTrace, ctx: ERC20Context) => Promise): this; onCallBurn(handler: (call: BurnCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: BurnCallTrace, ctx: ERC20Context) => Promise): this; onCallBurnFrom(handler: (call: BurnFromCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: BurnFromCallTrace, ctx: ERC20Context) => Promise): this; onCallDecimals(handler: (call: DecimalsCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: DecimalsCallTrace, ctx: ERC20Context) => Promise): this; onCallDecreaseAllowance(handler: (call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => Promise): this; onCallIncreaseAllowance(handler: (call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => Promise): this; onCallLocker(handler: (call: LockerCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: LockerCallTrace, ctx: ERC20Context) => Promise): this; onCallName(handler: (call: NameCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: NameCallTrace, ctx: ERC20Context) => Promise): this; onCallOwner(handler: (call: OwnerCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: OwnerCallTrace, ctx: ERC20Context) => Promise): this; onCallRenounceOwnership(handler: (call: RenounceOwnershipCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: RenounceOwnershipCallTrace, ctx: ERC20Context) => Promise): this; onCallSetLocker(handler: (call: SetLockerCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SetLockerCallTrace, ctx: ERC20Context) => Promise): this; onCallSymbol(handler: (call: SymbolCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: SymbolCallTrace, ctx: ERC20Context) => Promise): this; onCallTotalSupply(handler: (call: TotalSupplyCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TotalSupplyCallTrace, ctx: ERC20Context) => Promise): this; onCallTransfer(handler: (call: TransferCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TransferCallTrace, ctx: ERC20Context) => Promise): this; onCallTransferFrom(handler: (call: TransferFromCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TransferFromCallTrace, ctx: ERC20Context) => Promise): this; onCallTransferOwnership(handler: (call: TransferOwnershipCallTrace, ctx: ERC20Context) => void, handlerOptions?: HandlerOptions, preprocessHandler?: (call: TransferOwnershipCallTrace, ctx: ERC20Context) => Promise): this; static filters: { Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter; Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter; }; protected CreateBoundContractView(): ERC20BoundContractView; static bind(options: BindOptions): ERC20Processor; } export declare class ERC20ProcessorTemplate extends BaseProcessorTemplate { bindInternal(options: BindOptions): ERC20Processor; onEventApproval(handler: (event: ApprovalEvent, ctx: ERC20Context) => void, filter?: ApprovalEventFilter | ApprovalEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: ApprovalEvent, ctx: ERC20Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventOwnershipTransferred(handler: (event: OwnershipTransferredEvent, ctx: ERC20Context) => void, filter?: OwnershipTransferredEventFilter | OwnershipTransferredEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: OwnershipTransferredEvent, ctx: ERC20Context, preprocessStore: { [k: string]: any; }) => Promise): this; onEventTransfer(handler: (event: TransferEvent, ctx: ERC20Context) => void, filter?: TransferEventFilter | TransferEventFilter[], handlerOptions?: HandlerOptions, preprocessHandler?: (event: TransferEvent, ctx: ERC20Context, preprocessStore: { [k: string]: any; }) => Promise): this; } export declare function getERC20Contract(chainId: EthChainId, address: string): ERC20ContractView; export declare function getERC20ContractOnContext(context: EthContext, address: string): ERC20BoundContractView; //# sourceMappingURL=erc20-processor.d.ts.map