ERC20Processor

Class in @sentio/sdk/eth/builtin › erc20

Defined in @sentio/sdk/eth/builtin › erc20

Extends

Constructors

Constructor

new ERC20Processor(config: BindOptions): ERC20Processor;

Parameters

ParameterType
configBindOptions

Returns

ERC20Processor

Inherited from

BaseProcessor.constructor

Properties

PropertyModifierTypeInherited from
blockHandlerspublicBlockHandler[]BaseProcessor.blockHandlers
configpublicBindInternalOptionsBaseProcessor.config
eventHandlerspublicEventsHandler[]BaseProcessor.eventHandlers
traceHandlerspublicTraceHandler[]BaseProcessor.traceHandlers
filtersstaticobject-
filters.ApprovalpublicDeferredTopicFilter-
filters.OwnershipTransferredpublicDeferredTopicFilter-
filters.TransferpublicDeferredTopicFilter-

Methods

getChainId()

getChainId(): EthChainId;

Returns

EthChainId

Inherited from

BaseProcessor.getChainId


onBlockInterval()

onBlockInterval(
   handler: (block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoid, 
   blockInterval?: number, 
   backfillBlockInterval?: number, 
   handlerOptions?: HandlerOptions<EthFetchConfig, RichBlock>, 
   preprocessHandler?: (block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>
): this;

Parameters

ParameterTypeDefault value
handler(block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoidundefined
blockIntervalnumber250
backfillBlockIntervalnumber1000
handlerOptions?HandlerOptions<EthFetchConfig, RichBlock>undefined
preprocessHandler?(block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>defaultPreprocessHandler

Returns

this

Inherited from

BaseProcessor.onBlockInterval


onCallAllowance()

onCallAllowance(
   handler: (call: AllowanceCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, AllowanceCallTrace>, 
   preprocessHandler?: (call: AllowanceCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: AllowanceCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, AllowanceCallTrace>
preprocessHandler?(call: AllowanceCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallApprove()

onCallApprove(
   handler: (call: ApproveCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, ApproveCallTrace>, 
   preprocessHandler?: (call: ApproveCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: ApproveCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, ApproveCallTrace>
preprocessHandler?(call: ApproveCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallBalanceOf()

onCallBalanceOf(
   handler: (call: BalanceOfCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, BalanceOfCallTrace>, 
   preprocessHandler?: (call: BalanceOfCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: BalanceOfCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, BalanceOfCallTrace>
preprocessHandler?(call: BalanceOfCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallBurn()

onCallBurn(
   handler: (call: BurnCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, BurnCallTrace>, 
   preprocessHandler?: (call: BurnCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: BurnCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, BurnCallTrace>
preprocessHandler?(call: BurnCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallBurnFrom()

onCallBurnFrom(
   handler: (call: BurnFromCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, BurnFromCallTrace>, 
   preprocessHandler?: (call: BurnFromCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: BurnFromCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, BurnFromCallTrace>
preprocessHandler?(call: BurnFromCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallDecimals()

onCallDecimals(
   handler: (call: DecimalsCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, DecimalsCallTrace>, 
   preprocessHandler?: (call: DecimalsCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: DecimalsCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, DecimalsCallTrace>
preprocessHandler?(call: DecimalsCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallDecreaseAllowance()

onCallDecreaseAllowance(
   handler: (call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, DecreaseAllowanceCallTrace>, 
   preprocessHandler?: (call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, DecreaseAllowanceCallTrace>
preprocessHandler?(call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallIncreaseAllowance()

onCallIncreaseAllowance(
   handler: (call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, IncreaseAllowanceCallTrace>, 
   preprocessHandler?: (call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, IncreaseAllowanceCallTrace>
preprocessHandler?(call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallLocker()

onCallLocker(
   handler: (call: LockerCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, LockerCallTrace>, 
   preprocessHandler?: (call: LockerCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: LockerCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, LockerCallTrace>
preprocessHandler?(call: LockerCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallName()

onCallName(
   handler: (call: NameCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, NameCallTrace>, 
   preprocessHandler?: (call: NameCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: NameCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, NameCallTrace>
preprocessHandler?(call: NameCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallOwner()

onCallOwner(
   handler: (call: OwnerCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, OwnerCallTrace>, 
   preprocessHandler?: (call: OwnerCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: OwnerCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, OwnerCallTrace>
preprocessHandler?(call: OwnerCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallRenounceOwnership()

onCallRenounceOwnership(
   handler: (call: RenounceOwnershipCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, RenounceOwnershipCallTrace>, 
   preprocessHandler?: (call: RenounceOwnershipCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: RenounceOwnershipCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, RenounceOwnershipCallTrace>
preprocessHandler?(call: RenounceOwnershipCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallSetLocker()

onCallSetLocker(
   handler: (call: SetLockerCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, SetLockerCallTrace>, 
   preprocessHandler?: (call: SetLockerCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: SetLockerCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, SetLockerCallTrace>
preprocessHandler?(call: SetLockerCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallSymbol()

onCallSymbol(
   handler: (call: SymbolCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, SymbolCallTrace>, 
   preprocessHandler?: (call: SymbolCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: SymbolCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, SymbolCallTrace>
preprocessHandler?(call: SymbolCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallTotalSupply()

onCallTotalSupply(
   handler: (call: TotalSupplyCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, TotalSupplyCallTrace>, 
   preprocessHandler?: (call: TotalSupplyCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: TotalSupplyCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, TotalSupplyCallTrace>
preprocessHandler?(call: TotalSupplyCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallTransfer()

onCallTransfer(
   handler: (call: TransferCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, TransferCallTrace>, 
   preprocessHandler?: (call: TransferCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: TransferCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, TransferCallTrace>
preprocessHandler?(call: TransferCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallTransferFrom()

onCallTransferFrom(
   handler: (call: TransferFromCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, TransferFromCallTrace>, 
   preprocessHandler?: (call: TransferFromCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: TransferFromCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, TransferFromCallTrace>
preprocessHandler?(call: TransferFromCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onCallTransferOwnership()

onCallTransferOwnership(
   handler: (call: TransferOwnershipCallTrace, ctx: ERC20Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, TransferOwnershipCallTrace>, 
   preprocessHandler?: (call: TransferOwnershipCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(call: TransferOwnershipCallTrace, ctx: ERC20Context) => void
handlerOptions?HandlerOptions<EthFetchConfig, TransferOwnershipCallTrace>
preprocessHandler?(call: TransferOwnershipCallTrace, ctx: ERC20Context) => Promise<PreprocessResult>

Returns

this


onEvent()

onEvent<T extends TypedEvent<any, any> = TypedEvent<any, any>>(
   handler: (event: T, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoid, 
   handlerOptions?: HandlerOptions<EthFetchConfig, T>, 
   preprocessHandler?: (event: T, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>
): this;

Type Parameters

Type ParameterDefault type
T extends TypedEvent<any, any>TypedEvent<any, any>

Parameters

ParameterTypeDefault value
handler(event: T, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoidundefined
handlerOptions?HandlerOptions<EthFetchConfig, T>undefined
preprocessHandler?(event: T, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>defaultPreprocessHandler

Returns

this

Inherited from

BaseProcessor.onEvent


onEventApproval()

onEventApproval(
   handler: (event: ApprovalEvent, ctx: ERC20Context) => void, 
   filter?: DeferredTopicFilter | DeferredTopicFilter[], 
   handlerOptions?: HandlerOptions<EthFetchConfig, ApprovalEvent>, 
   preprocessHandler?: (event: ApprovalEvent, ctx: ERC20Context, preprocessStore: object) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(event: ApprovalEvent, ctx: ERC20Context) => void
filter?DeferredTopicFilter | DeferredTopicFilter[]
handlerOptions?HandlerOptions<EthFetchConfig, ApprovalEvent>
preprocessHandler?(event: ApprovalEvent, ctx: ERC20Context, preprocessStore: object) => Promise<PreprocessResult>

Returns

this


onEventOwnershipTransferred()

onEventOwnershipTransferred(
   handler: (event: OwnershipTransferredEvent, ctx: ERC20Context) => void, 
   filter?: DeferredTopicFilter | DeferredTopicFilter[], 
   handlerOptions?: HandlerOptions<EthFetchConfig, OwnershipTransferredEvent>, 
   preprocessHandler?: (event: OwnershipTransferredEvent, ctx: ERC20Context, preprocessStore: object) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(event: OwnershipTransferredEvent, ctx: ERC20Context) => void
filter?DeferredTopicFilter | DeferredTopicFilter[]
handlerOptions?HandlerOptions<EthFetchConfig, OwnershipTransferredEvent>
preprocessHandler?(event: OwnershipTransferredEvent, ctx: ERC20Context, preprocessStore: object) => Promise<PreprocessResult>

Returns

this


onEventTransfer()

onEventTransfer(
   handler: (event: TransferEvent, ctx: ERC20Context) => void, 
   filter?: DeferredTopicFilter | DeferredTopicFilter[], 
   handlerOptions?: HandlerOptions<EthFetchConfig, TransferEvent>, 
   preprocessHandler?: (event: TransferEvent, ctx: ERC20Context, preprocessStore: object) => Promise<PreprocessResult>
): this;

Parameters

ParameterType
handler(event: TransferEvent, ctx: ERC20Context) => void
filter?DeferredTopicFilter | DeferredTopicFilter[]
handlerOptions?HandlerOptions<EthFetchConfig, TransferEvent>
preprocessHandler?(event: TransferEvent, ctx: ERC20Context, preprocessStore: object) => Promise<PreprocessResult>

Returns

this


onInterval()

onInterval(
   handler: (block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoid, 
   timeInterval: 
  | HandleInterval
  | undefined, 
   blockInterval: 
  | HandleInterval
  | undefined, 
   handlerOptions?: HandlerOptions<EthFetchConfig, RichBlock>, 
   preprocessHandler?: (block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>, 
   handlerName?: string
): this;

Parameters

ParameterTypeDefault value
handler(block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoidundefined
timeInterval| HandleInterval | undefinedundefined
blockInterval| HandleInterval | undefinedundefined
handlerOptions?HandlerOptions<EthFetchConfig, RichBlock>undefined
preprocessHandler?(block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>defaultPreprocessHandler
handlerName?string...

Returns

this

Inherited from

BaseProcessor.onInterval


onTimeInterval()

onTimeInterval(
   handler: (block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoid, 
   timeIntervalInMinutes?: number, 
   backfillTimeIntervalInMinutes?: number, 
   handlerOptions?: HandlerOptions<EthFetchConfig, RichBlock>, 
   preprocessHandler?: (block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>
): this;

Parameters

ParameterTypeDefault value
handler(block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoidundefined
timeIntervalInMinutesnumber60
backfillTimeIntervalInMinutesnumber240
handlerOptions?HandlerOptions<EthFetchConfig, RichBlock>undefined
preprocessHandler?(block: RichBlock, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>defaultPreprocessHandler

Returns

this

Inherited from

BaseProcessor.onTimeInterval


onTrace()

onTrace(
   handler: (event: TypedCallTrace, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoid, 
   handlerOptions?: HandlerOptions<EthFetchConfig, TypedCallTrace<any, any>>, 
   preprocessHandler?: (trace: TypedCallTrace, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>
): this;

Parameters

ParameterTypeDefault value
handler(event: TypedCallTrace, ctx: ContractContext<ERC20, ERC20BoundContractView>) => PromiseOrVoidundefined
handlerOptions?HandlerOptions<EthFetchConfig, TypedCallTrace<any, any>>undefined
preprocessHandler?(trace: TypedCallTrace, ctx: ContractContext<ERC20, ERC20BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>defaultPreprocessHandler

Returns

this

Inherited from

BaseProcessor.onTrace


bind()

static bind(options: BindOptions): ERC20Processor;

For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

Parameters

ParameterType
optionsBindOptions

Returns

ERC20Processor

On this page