LibEncodedDispatch
Establishes and implements a convention for encoding an interpreter dispatch. Handles encoding of several things required for efficient dispatch.
Functions
encode2
Builds an EncodedDispatch from its constituent parts.
function encode2(address expression, SourceIndexV2 sourceIndex, uint256 maxOutputs)
internal
pure
returns (EncodedDispatch);
Parameters
| Name | Type | Description |
|---|---|---|
expression | address | The onchain address of the expression to run. |
sourceIndex | SourceIndexV2 | The index of the source to run within the expression as an entrypoint. |
maxOutputs | uint256 | The maximum outputs the caller can meaningfully use. If the interpreter returns a larger stack than this it is merely wasting gas across the external call boundary. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | EncodedDispatch | The encoded dispatch. |
decode2
function decode2(EncodedDispatch dispatch) internal pure returns (address, SourceIndexV2, uint256);