rrelayer_core 0.7.0

Core types and functionality for rrelayer - a powerful blockchain transaction relay service
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::str::FromStr;

use alloy::primitives::U256;

/// Parses a string parameter into a U256 value.
pub fn from_param_u256(param: &str) -> Result<U256, &str> {
    match U256::from_str(param) {
        Ok(value) => Ok(value),
        Err(_) => Err("Failed to parse U256 from string"),
    }
}