Skip to main content

decode_withdrawals

Function decode_withdrawals 

Source
pub fn decode_withdrawals<'a>(
    input: &'a [u8],
    limits: DecodeLimits,
) -> Result<UnvalidatedWithdrawals<'a>, WithdrawalDecodeError>
Expand description

Decodes an EIP-4895 withdrawals list under explicit limits.

This function is syntactic. It checks that the input is one canonical RLP list of withdrawal entries shaped [index, validator_index, address, amount], with canonical uint64 integers, a 20-byte address, and a nonzero Gwei amount. It does not compute or compare withdrawals_root.