ERC1155Processor

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

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

Extends

Constructors

Constructor

new ERC1155Processor(config: BindOptions): ERC1155Processor;

Parameters

ParameterType
configBindOptions

Returns

ERC1155Processor

Inherited from

BaseProcessor.constructor

Properties

PropertyModifierTypeInherited from
blockHandlerspublicBlockHandler[]BaseProcessor.blockHandlers
configpublicBindInternalOptionsBaseProcessor.config
eventHandlerspublicEventsHandler[]BaseProcessor.eventHandlers
traceHandlerspublicTraceHandler[]BaseProcessor.traceHandlers
filtersstaticobject-
filters.ApprovalForAllpublicDeferredTopicFilter-
filters.TransferBatchpublicDeferredTopicFilter-
filters.TransferSinglepublicDeferredTopicFilter-
filters.URIpublicDeferredTopicFilter-

Methods

getChainId()

getChainId(): EthChainId;

Returns

EthChainId

Inherited from

BaseProcessor.getChainId


onBlockInterval()

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

Parameters

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

Returns

this

Inherited from

BaseProcessor.onBlockInterval


onCallBalanceOf()

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

Parameters

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

Returns

this


onCallBalanceOfBatch()

onCallBalanceOfBatch(
   handler: (call: BalanceOfBatchCallTrace, ctx: ERC1155Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, BalanceOfBatchCallTrace>, 
   preprocessHandler?: (call: BalanceOfBatchCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;

Parameters

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

Returns

this


onCallIsApprovedForAll()

onCallIsApprovedForAll(
   handler: (call: IsApprovedForAllCallTrace, ctx: ERC1155Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, IsApprovedForAllCallTrace>, 
   preprocessHandler?: (call: IsApprovedForAllCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;

Parameters

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

Returns

this


onCallSafeBatchTransferFrom()

onCallSafeBatchTransferFrom(
   handler: (call: SafeBatchTransferFromCallTrace, ctx: ERC1155Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, SafeBatchTransferFromCallTrace>, 
   preprocessHandler?: (call: SafeBatchTransferFromCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;

Parameters

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

Returns

this


onCallSafeTransferFrom()

onCallSafeTransferFrom(
   handler: (call: SafeTransferFromCallTrace, ctx: ERC1155Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, SafeTransferFromCallTrace>, 
   preprocessHandler?: (call: SafeTransferFromCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;

Parameters

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

Returns

this


onCallSetApprovalForAll()

onCallSetApprovalForAll(
   handler: (call: SetApprovalForAllCallTrace, ctx: ERC1155Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, SetApprovalForAllCallTrace>, 
   preprocessHandler?: (call: SetApprovalForAllCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;

Parameters

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

Returns

this


onCallSupportsInterface()

onCallSupportsInterface(
   handler: (call: SupportsInterfaceCallTrace, ctx: ERC1155Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, SupportsInterfaceCallTrace>, 
   preprocessHandler?: (call: SupportsInterfaceCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;

Parameters

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

Returns

this


onCallUri()

onCallUri(
   handler: (call: UriCallTrace, ctx: ERC1155Context) => void, 
   handlerOptions?: HandlerOptions<EthFetchConfig, UriCallTrace>, 
   preprocessHandler?: (call: UriCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;

Parameters

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

Returns

this


onEvent()

onEvent<T extends TypedEvent<any, any> = TypedEvent<any, any>>(
   handler: (event: T, ctx: ContractContext<ERC1155, ERC1155BoundContractView>) => PromiseOrVoid, 
   handlerOptions?: HandlerOptions<EthFetchConfig, T>, 
   preprocessHandler?: (event: T, ctx: ContractContext<ERC1155, ERC1155BoundContractView>, 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<ERC1155, ERC1155BoundContractView>) => PromiseOrVoidundefined
handlerOptions?HandlerOptions<EthFetchConfig, T>undefined
preprocessHandler?(event: T, ctx: ContractContext<ERC1155, ERC1155BoundContractView>, preprocessStore: object) => Promise<PreprocessResult>defaultPreprocessHandler

Returns

this

Inherited from

BaseProcessor.onEvent


onEventApprovalForAll()

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

Parameters

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

Returns

this


onEventTransferBatch()

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

Parameters

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

Returns

this


onEventTransferSingle()

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

Parameters

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

Returns

this


onEventURI()

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

Parameters

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

Returns

this


onInterval()

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

Parameters

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

Returns

this

Inherited from

BaseProcessor.onInterval


onTimeInterval()

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

Parameters

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

Returns

this

Inherited from

BaseProcessor.onTimeInterval


onTrace()

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

Parameters

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

Returns

this

Inherited from

BaseProcessor.onTrace


bind()

static bind(options: BindOptions): ERC1155Processor;

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

ERC1155Processor

On this page