LzOptionsBuilder
Title: LzOptionsBuilder
Library for building and encoding various LayerZero V2 message options. Forked and simplified from layerzerolabs/oapp-evm/contracts/oapp/libs/OptionsBuilder.sol
Constants
TYPE_3
uint16 internal constant TYPE_3 = 3;Functions
newOptions
function newOptions() internal pure returns (bytes memory);Returns
| Name | Type | Description |
|---|---|---|
| <none> | bytes |
addExecutorLzReceiveOption
function addExecutorLzReceiveOption(bytes memory _options, uint128 _gas) internal pure returns (bytes memory);Parameters
| Name | Type | Description |
|---|---|---|
| _options | bytes | |
| _gas | uint128 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bytes |
addExecutorLzComposeOption
function addExecutorLzComposeOption(bytes memory _options, uint16 _index, uint128 _gas)
internal
pure
returns (bytes memory);Parameters
| Name | Type | Description |
|---|---|---|
| _options | bytes | |
| _index | uint16 | |
| _gas | uint128 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bytes |
addExecutorOption
function addExecutorOption(bytes memory _options, uint8 _optionType, bytes memory _option)
internal
pure
returns (bytes memory);Parameters
| Name | Type | Description |
|---|---|---|
| _options | bytes | |
| _optionType | uint8 | |
| _option | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bytes |