pub fn decode(token: Token) -> anyhow::Result<Self> {
        let tokens = token.into_tuple().context("not a tuple")?;
        anyhow::ensure!(tokens.len() == 16);
        let mut t = tokens.into_iter();
        let mut next = || t.next().unwrap();
        Ok(Self {
            tx_type: next().into_uint().context("tx_type")?,
            from: next().into_uint().context("from")?,
            to: next().into_uint().context("to")?,
            gas_limit: next().into_uint().context("gas_limit")?,
            gas_per_pubdata_byte_limit: next().into_uint().context("gas_per_pubdata_byte_limit")?,
            max_fee_per_gas: next().into_uint().context("max_fee_per_gas")?,
            max_priority_fee_per_gas: next().into_uint().context("max_priority_fee_per_gas")?,
            paymaster: next().into_uint().context("paymaster")?,
            nonce: next().into_uint().context("nonce")?,
            value: next().into_uint().context("value")?,
            reserved: next()
                .into_fixed_array()
                .context("reserved")?
                .into_iter()
                .enumerate()
                .map(|(i, t)| t.into_uint().context(i))
                .collect::<Result<Vec<_>, _>>()
                .context("reserved")?
                .try_into()
                .ok()
                .context("reserved")?,
            data: next().into_bytes().context("data")?,
            signature: next().into_bytes().context("signature")?,
            factory_deps: next()
                .into_array()
                .context("factory_deps")?
                .into_iter()
                .enumerate()
                .map(|(i, t)| t.into_uint().context(i))
                .collect::<Result<_, _>>()
                .context("factory_deps")?,
            paymaster_input: next().into_bytes().context("paymaster_input")?,
            reserved_dynamic: next().into_bytes().context("reserved_dynamic")?,
        })
    }
Decodes L1->L2 transaction from a RLP token.
Returns an error if token doesn't match the `schema()`.
core/lib/types/src/abi.rs