LibMeta
Need a place to put data that can be handled offchain like ABIs that IS NOT etherscan.
Functions
isRainMetaV1
Returns true if the metadata bytes are prefixed by the Rain meta magic number. DOES NOT attempt to validate the body of the metadata as offchain tooling will be required for this.
function isRainMetaV1(bytes memory meta_) internal pure returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
meta_ | bytes | The data that may be rain metadata. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | True if meta_ is metadata, false otherwise. |
checkMetaUnhashed
Reverts if the provided meta_ is NOT metadata according to
isRainMetaV1.
function checkMetaUnhashed(bytes memory meta_) internal pure;
Parameters
| Name | Type | Description |
|---|---|---|
meta_ | bytes | The metadata bytes to check. |
checkMetaHashed
Reverts if the provided meta_ is NOT metadata according to
isRainMetaV1 OR it does not match the expected hash of its data.
function checkMetaHashed(bytes32 expectedHash_, bytes memory meta_) internal pure;
Parameters
| Name | Type | Description |
|---|---|---|
expectedHash_ | bytes32 | |
meta_ | bytes | The metadata to check. |