File: src/Xcm/v5/WeightLimit/WeightLimitCodec.sol
WeightLimitCodec
Kind: library
ABI Surface
Errors
error InvalidWeightLimitLength()error InvalidWeightLimitVariant(uint8 variant)
Function Surface
function encode(struct WeightLimit wl) internal pure returns (bytes)- Encodes a
WeightLimitstruct into SCALE bytes.
- Encodes a
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)- Returns the number of bytes that a
WeightLimitwould occupy when SCALE-encoded.
- Returns the number of bytes that a
function decode(bytes data) internal pure returns (struct WeightLimit, uint256)- Decodes a
WeightLimitfrom SCALE bytes starting at the beginning.
- Decodes a
function decodeAt(bytes data, uint256 offset) internal pure returns (struct WeightLimit, uint256)- Decodes a
WeightLimitfrom SCALE bytes starting at a given offset.
- Decodes a
function asLimited(struct WeightLimit wl) internal pure returns (struct LimitedParams)- Decodes the
Weightfrom aLimitedweight limit.
- Decodes the
function \_assertVariant(struct WeightLimit wl, enum WeightLimitVariant expected) internal pure