The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hyperlane-monorepo/solidity/contracts/libs/hooks/OPStackHookMetadata.sol

18 lines
341 B

// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
/**
* Format of metadata:
*
* [0:32] Msg value to be sent to L2
*/
library OPStackHookMetadata {
function msgValue(bytes calldata _metadata)
internal
pure
returns (uint256)
{
return uint256(bytes32(_metadata[0:32]));
}
}