

# Class: AbstractArtifactAdapter


##   Methods

### `Abstract` collectContractsDataAsync

▸ **collectContractsDataAsync**(): *`Promise<ContractData[]>`*

*Defined in [sol-tracing-utils/src/artifact_adapters/abstract_artifact_adapter.ts:4](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/sol-tracing-utils/src/artifact_adapters/abstract_artifact_adapter.ts#L4)*

**Returns:** *`Promise<ContractData[]>`*

<hr />

# Class: SolCompilerArtifactAdapter


##   Constructors



\+ **new SolCompilerArtifactAdapter**(`artifactsPath?`: undefined | string, `sourcesPath?`: undefined | string): *[SolCompilerArtifactAdapter](#class-solcompilerartifactadapter)*

*Defined in [sol-tracing-utils/src/artifact_adapters/sol_compiler_artifact_adapter.ts:18](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/sol-tracing-utils/src/artifact_adapters/sol_compiler_artifact_adapter.ts#L18)*

Instantiates a SolCompilerArtifactAdapter

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`artifactsPath?` | undefined \| string | Path to your artifacts directory |
`sourcesPath?` | undefined \| string | Path to your contract sources directory  |

**Returns:** *[SolCompilerArtifactAdapter](#class-solcompilerartifactadapter)*

## Methods

###  collectContractsDataAsync

▸ **collectContractsDataAsync**(): *`Promise<ContractData[]>`*

*Overrides [AbstractArtifactAdapter](_sol_tracing_utils_src_artifact_adapters_abstract_artifact_adapter_.abstractartifactadapter.md).[collectContractsDataAsync](#abstract-collectcontractsdataasync)*

*Defined in [sol-tracing-utils/src/artifact_adapters/sol_compiler_artifact_adapter.ts:44](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/sol-tracing-utils/src/artifact_adapters/sol_compiler_artifact_adapter.ts#L44)*

**Returns:** *`Promise<ContractData[]>`*

<hr />

# Class: TruffleArtifactAdapter


##   Constructors



\+ **new TruffleArtifactAdapter**(`projectRoot`: string, `solcVersion`: string): *[TruffleArtifactAdapter](#class-truffleartifactadapter)*

*Defined in [sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts:29](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts#L29)*

Instantiates a TruffleArtifactAdapter

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`projectRoot` | string | Path to the truffle project's root directory |
`solcVersion` | string | Solidity version with which to compile all the contracts  |

**Returns:** *[TruffleArtifactAdapter](#class-truffleartifactadapter)*

## Methods

###  collectContractsDataAsync

▸ **collectContractsDataAsync**(): *`Promise<ContractData[]>`*

*Overrides [AbstractArtifactAdapter](_sol_tracing_utils_src_artifact_adapters_abstract_artifact_adapter_.abstractartifactadapter.md).[collectContractsDataAsync](#abstract-collectcontractsdataasync)*

*Defined in [sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts:40](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts#L40)*

**Returns:** *`Promise<ContractData[]>`*

<hr />




















##  Type aliases

###  Callback

Ƭ **Callback**: *function*

*Defined in [subproviders/src/types.ts:131](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/subproviders/src/types.ts#L131)*

#### Type declaration:

▸ (): *void*

___



###  ErrorCallback

Ƭ **ErrorCallback**: *function*

*Defined in [subproviders/src/types.ts:130](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/subproviders/src/types.ts#L130)*

#### Type declaration:

▸ (`err`: `Error` | null, `data?`: any): *void*

**Parameters:**

Name | Type |
------ | ------ |
`err` | `Error` \| null |
`data?` | any |

___



###  NextCallback

Ƭ **NextCallback**: *function*

*Defined in [subproviders/src/types.ts:133](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/subproviders/src/types.ts#L133)*

#### Type declaration:

▸ (`callback?`: [OnNextCompleted](#onnextcompleted)): *void*

**Parameters:**

Name | Type |
------ | ------ |
`callback?` | [OnNextCompleted](#onnextcompleted) |

___

###  OnNextCompleted

Ƭ **OnNextCompleted**: *function*

*Defined in [subproviders/src/types.ts:132](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/subproviders/src/types.ts#L132)*

#### Type declaration:

▸ (`err`: `Error` | null, `result`: any, `cb`: [Callback](#callback)): *void*

**Parameters:**

Name | Type |
------ | ------ |
`err` | `Error` \| null |
`result` | any |
`cb` | [Callback](#callback) |

<hr />























































# Interface: JSONRPCRequestPayload


##   Properties

###  id

• **id**: *number*

*Defined in [ethereum-types/src/index.ts:331](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L331)*

___

###  jsonrpc

• **jsonrpc**: *string*

*Defined in [ethereum-types/src/index.ts:332](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L332)*

___

###  method

• **method**: *string*

*Defined in [ethereum-types/src/index.ts:330](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L330)*

___

###  params

• **params**: *any[]*

*Defined in [ethereum-types/src/index.ts:329](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L329)*

<hr />

# Interface: JSONRPCResponseError


##   Properties

###  code

• **code**: *number*

*Defined in [ethereum-types/src/index.ts:337](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L337)*

___

###  message

• **message**: *string*

*Defined in [ethereum-types/src/index.ts:336](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L336)*

<hr />

# Interface: JSONRPCResponsePayload


##   Properties

### `Optional` error

• **error**? : *[JSONRPCResponseError](#class-jsonrpcresponseerror)*

*Defined in [ethereum-types/src/index.ts:344](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L344)*

___

###  id

• **id**: *number*

*Defined in [ethereum-types/src/index.ts:342](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L342)*

___

###  jsonrpc

• **jsonrpc**: *string*

*Defined in [ethereum-types/src/index.ts:343](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L343)*

___

###  result

• **result**: *any*

*Defined in [ethereum-types/src/index.ts:341](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L341)*

<hr />

































# Class: RevertTraceSubprovider

This class implements the [web3-provider-engine](https://github.com/MetaMask/provider-engine) subprovider interface.
It is used to report call stack traces whenever a revert occurs.


##   Constructors



\+ **new RevertTraceSubprovider**(`artifactAdapter`: `AbstractArtifactAdapter`, `defaultFromAddress`: string, `isVerbose`: boolean): *[RevertTraceSubprovider](#class-reverttracesubprovider)*

*Overrides void*

*Defined in [sol-trace/src/revert_trace_subprovider.ts:27](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/sol-trace/src/revert_trace_subprovider.ts#L27)*

Instantiates a RevertTraceSubprovider instance

**Parameters:**

Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`artifactAdapter` | `AbstractArtifactAdapter` | - | Adapter for used artifacts format (0x, truffle, giveth, etc.) |
`defaultFromAddress` | string | - | default from address to use when sending transactions |
`isVerbose` | boolean | true | If true, we will log any unknown transactions. Otherwise we will ignore them  |

**Returns:** *[RevertTraceSubprovider](#class-reverttracesubprovider)*

## Methods

###  emitPayloadAsync

▸ **emitPayloadAsync**(`payload`: `Partial<JSONRPCRequestPayloadWithMethod>`): *`Promise<JSONRPCResponsePayload>`*



Defined in subproviders/lib/src/subproviders/subprovider.d.ts:25

Emits a JSON RPC payload that will then be handled by the ProviderEngine instance
this subprovider is a part of. The payload will cascade down the subprovider middleware
stack until finding the responsible entity for handling the request.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`payload` | `Partial<JSONRPCRequestPayloadWithMethod>` | JSON RPC payload |

**Returns:** *`Promise<JSONRPCResponsePayload>`*

JSON RPC response payload

___

###  handleRequest

▸ **handleRequest**(`payload`: `JSONRPCRequestPayload`, `next`: [NextCallback](#nextcallback), `_end`: [ErrorCallback](#errorcallback)): *`Promise<void>`*



*Overrides void*

Defined in sol-tracing-utils/lib/src/trace_collection_subprovider.d.ts:42

This method conforms to the web3-provider-engine interface.
It is called internally by the ProviderEngine when it is this subproviders
turn to handle a JSON RPC request.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`payload` | `JSONRPCRequestPayload` | JSON RPC payload |
`next` | [NextCallback](#nextcallback) | Callback to call if this subprovider decides not to handle the request |
`_end` | [ErrorCallback](#errorcallback) | Callback to call if subprovider handled the request and wants to pass back the request.  |

**Returns:** *`Promise<void>`*

___

###  setEngine

▸ **setEngine**(`engine`: `Web3ProviderEngine`): *void*



*Overrides void*

Defined in sol-tracing-utils/lib/src/trace_collection_subprovider.d.ts:49

Set's the subprovider's engine to the ProviderEngine it is added to.
This is only called within the ProviderEngine source code, do not call
directly.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`engine` | `Web3ProviderEngine` | The ProviderEngine this subprovider is added to  |

**Returns:** *void*

___

###  start

▸ **start**(): *void*



Defined in sol-tracing-utils/lib/src/trace_collection_subprovider.d.ts:29

Starts trace collection

**Returns:** *void*

___

###  stop

▸ **stop**(): *void*



Defined in sol-tracing-utils/lib/src/trace_collection_subprovider.d.ts:33

Stops trace collection

**Returns:** *void*

<hr />

























 





 

 







 















# Interface: JSONRPCRequestPayloadWithMethod


##   Properties

###  id

• **id**: *number*



Defined in ethereum-types/lib/index.d.ts:268

___

###  jsonrpc

• **jsonrpc**: *string*



Defined in ethereum-types/lib/index.d.ts:269

___

###  method

• **method**: *string*

*Overrides void*

*Defined in [subproviders/src/types.ts:136](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/subproviders/src/types.ts#L136)*

___

###  params

• **params**: *any[]*



Defined in ethereum-types/lib/index.d.ts:266

<hr />


































##  Type aliases












##  Type aliases











































<hr /> 



<hr /> 



<hr /> 



<hr /> 

