ERC1155Processor
Class in @sentio/sdk/eth/builtin › erc1155
Defined in @sentio/sdk/eth/builtin › erc1155
Extends
Constructors
Constructor
new ERC1155Processor(config: BindOptions): ERC1155Processor;Parameters
| Parameter | Type |
|---|---|
config | BindOptions |
Returns
ERC1155Processor
Inherited from
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
blockHandlers | public | BlockHandler[] | BaseProcessor.blockHandlers |
config | public | BindInternalOptions | BaseProcessor.config |
eventHandlers | public | EventsHandler[] | BaseProcessor.eventHandlers |
traceHandlers | public | TraceHandler[] | BaseProcessor.traceHandlers |
filters | static | object | - |
filters.ApprovalForAll | public | DeferredTopicFilter | - |
filters.TransferBatch | public | DeferredTopicFilter | - |
filters.TransferSingle | public | DeferredTopicFilter | - |
filters.URI | public | DeferredTopicFilter | - |
Methods
getChainId()
getChainId(): EthChainId;Returns
EthChainId
Inherited from
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
| Parameter | Type | Default value |
|---|---|---|
handler | (block: RichBlock, ctx: ContractContext<ERC1155, ERC1155BoundContractView>) => PromiseOrVoid | undefined |
blockInterval | number | 250 |
backfillBlockInterval | number | 1000 |
handlerOptions? | HandlerOptions<EthFetchConfig, RichBlock> | undefined |
preprocessHandler? | (block: RichBlock, ctx: ContractContext<ERC1155, ERC1155BoundContractView>, preprocessStore: object) => Promise<PreprocessResult> | defaultPreprocessHandler |
Returns
this
Inherited from
onCallBalanceOf()
onCallBalanceOf(
handler: (call: BalanceOfCallTrace, ctx: ERC1155Context) => void,
handlerOptions?: HandlerOptions<EthFetchConfig, BalanceOfCallTrace>,
preprocessHandler?: (call: BalanceOfCallTrace, ctx: ERC1155Context) => Promise<PreprocessResult>
): this;Parameters
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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 Parameter | Default type |
|---|---|
T extends TypedEvent<any, any> | TypedEvent<any, any> |
Parameters
| Parameter | Type | Default value |
|---|---|---|
handler | (event: T, ctx: ContractContext<ERC1155, ERC1155BoundContractView>) => PromiseOrVoid | undefined |
handlerOptions? | HandlerOptions<EthFetchConfig, T> | undefined |
preprocessHandler? | (event: T, ctx: ContractContext<ERC1155, ERC1155BoundContractView>, preprocessStore: object) => Promise<PreprocessResult> | defaultPreprocessHandler |
Returns
this
Inherited from
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type |
|---|---|
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
| Parameter | Type | Default value |
|---|---|---|
handler | (block: RichBlock, ctx: ContractContext<ERC1155, ERC1155BoundContractView>) => PromiseOrVoid | undefined |
timeInterval | | HandleInterval | undefined | undefined |
blockInterval | | HandleInterval | undefined | undefined |
handlerOptions? | HandlerOptions<EthFetchConfig, RichBlock> | undefined |
preprocessHandler? | (block: RichBlock, ctx: ContractContext<ERC1155, ERC1155BoundContractView>, preprocessStore: object) => Promise<PreprocessResult> | defaultPreprocessHandler |
handlerName? | string | ... |
Returns
this
Inherited from
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
| Parameter | Type | Default value |
|---|---|---|
handler | (block: RichBlock, ctx: ContractContext<ERC1155, ERC1155BoundContractView>) => PromiseOrVoid | undefined |
timeIntervalInMinutes | number | 60 |
backfillTimeIntervalInMinutes | number | 240 |
handlerOptions? | HandlerOptions<EthFetchConfig, RichBlock> | undefined |
preprocessHandler? | (block: RichBlock, ctx: ContractContext<ERC1155, ERC1155BoundContractView>, preprocessStore: object) => Promise<PreprocessResult> | defaultPreprocessHandler |
Returns
this
Inherited from
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
| Parameter | Type | Default value |
|---|---|---|
handler | (event: TypedCallTrace, ctx: ContractContext<ERC1155, ERC1155BoundContractView>) => PromiseOrVoid | undefined |
handlerOptions? | HandlerOptions<EthFetchConfig, TypedCallTrace<any, any>> | undefined |
preprocessHandler? | (trace: TypedCallTrace, ctx: ContractContext<ERC1155, ERC1155BoundContractView>, preprocessStore: object) => Promise<PreprocessResult> | defaultPreprocessHandler |
Returns
this
Inherited from
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
| Parameter | Type |
|---|---|
options | BindOptions |
Returns
ERC1155Processor