Skip to main content

ethrex_l2_common/
calldata.rs

1use ethrex_common::{Address, Bytes, U256};
2use serde::{Deserialize, Serialize};
3
4/// Struct representing the possible solidity types for function arguments
5/// - `Uint` -> `uint256`
6/// - `Address` -> `address`
7/// - `Bool` -> `bool`
8/// - `Bytes` -> `bytes`
9/// - `String` -> `string`
10/// - `Array` -> `T[]`
11/// - `Tuple` -> `(X_1, ..., X_k)`
12/// - `FixedArray` -> `T[k]`
13/// - `FixedBytes` -> `bytesN`
14#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
15pub enum Value {
16    Address(Address),
17    Uint(U256),
18    Int(U256),
19    Bool(bool),
20    Bytes(Bytes),
21    String(String),
22    Array(Vec<Value>),
23    Tuple(Vec<Value>),
24    FixedArray(Vec<Value>),
25    FixedBytes(Bytes),
26}