/**
Generated by the following Solidity interface...
```solidity
interface InputBox {
error InputTooLarge(address appContract, uint256 inputLength, uint256 maxInputLength);
event InputAdded(address indexed appContract, uint256 indexed index, bytes input);
function addInput(address appContract, bytes memory payload) external returns (bytes32);
function getDeploymentBlockNumber() external view returns (uint256);
function getInputHash(address appContract, uint256 index) external view returns (bytes32);
function getNumberOfInputs(address appContract) external view returns (uint256);
}
```
...which was generated by the following JSON ABI:
```json
[
{
"type": "function",
"name": "addInput",
"inputs": [
{
"name": "appContract",
"type": "address",
"internalType": "address"
},
{
"name": "payload",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getDeploymentBlockNumber",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getInputHash",
"inputs": [
{
"name": "appContract",
"type": "address",
"internalType": "address"
},
{
"name": "index",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getNumberOfInputs",
"inputs": [
{
"name": "appContract",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "InputAdded",
"inputs": [
{
"name": "appContract",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "index",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "input",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
}
],
"anonymous": false
},
{
"type": "error",
"name": "InputTooLarge",
"inputs": [
{
"name": "appContract",
"type": "address",
"internalType": "address"
},
{
"name": "inputLength",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "maxInputLength",
"type": "uint256",
"internalType": "uint256"
}
]
}
]
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod InputBox {
use super::*;
use alloy::sol_types as alloy_sol_types;
/// The creation / init bytecode of the contract.
///
/// ```text
///0x60a08060405234602157436080526103439081610026823960805181605f0152f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c9081631789cd63146101055750806361a93c87146100ce578063677087c9146100865763b3a1acd814610048575f80fd5b34610082575f3660031901126100825760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b5f80fd5b34610082576040366003190112610082576001600160a01b036100a76102ce565b165f525f60205260206100bf60243560405f206102e4565b90549060031b1c604051908152f35b34610082576020366003190112610082576001600160a01b036100ef6102ce565b165f525f602052602060405f2054604051908152f35b346100825760403660031901126100825761011e6102ce565b6024359067ffffffffffffffff821161008257366023830112156100825781600401359067ffffffffffffffff82116100825736602483850101116100825760018060a01b0316805f525f60205260405f209361014481865494806024602084019863415bf36360e01b8a5246828601528760448601523360648601524360848601524260a48601524460c48601528860e48601526101006101048601528261012486015201848401375f838284010152601f801991011681010301601f1981018252601f8019910116810181811067ffffffffffffffff82111761029d5760405280516201000081116102b1575080518420936801000000000000000084101561029d5760407fc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f9892610259866020996001820181556102e4565b81549060031b9089821b915f19901b19161790558151928391898352518091818b8501528484015e5f828201840152601f01601f19168101030190a3604051908152f35b634e487b7160e01b5f52604160045260245ffd5b826304f90dc560e51b5f526004526024526201000060445260645ffd5b600435906001600160a01b038216820361008257565b80548210156102f9575f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffdfea2646970667358221220740e707924e66901499926e120c4cd36be0acfdb674fa0a53a2a8e759c6771cb64736f6c634300081e0033
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\xA0\x80`@R4`!WC`\x80Ra\x03C\x90\x81a\0&\x829`\x80Q\x81`_\x01R\xF3[_\x80\xFD\xFE`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x17\x89\xCDc\x14a\x01\x05WP\x80ca\xA9<\x87\x14a\0\xCEW\x80cgp\x87\xC9\x14a\0\x86Wc\xB3\xA1\xAC\xD8\x14a\0HW_\x80\xFD[4a\0\x82W_6`\x03\x19\x01\x12a\0\x82W` `@Q\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xF3[_\x80\xFD[4a\0\x82W`@6`\x03\x19\x01\x12a\0\x82W`\x01`\x01`\xA0\x1B\x03a\0\xA7a\x02\xCEV[\x16_R_` R` a\0\xBF`$5`@_ a\x02\xE4V[\x90T\x90`\x03\x1B\x1C`@Q\x90\x81R\xF3[4a\0\x82W` 6`\x03\x19\x01\x12a\0\x82W`\x01`\x01`\xA0\x1B\x03a\0\xEFa\x02\xCEV[\x16_R_` R` `@_ T`@Q\x90\x81R\xF3[4a\0\x82W`@6`\x03\x19\x01\x12a\0\x82Wa\x01\x1Ea\x02\xCEV[`$5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\0\x82W6`#\x83\x01\x12\x15a\0\x82W\x81`\x04\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\0\x82W6`$\x83\x85\x01\x01\x11a\0\x82W`\x01\x80`\xA0\x1B\x03\x16\x80_R_` R`@_ \x93a\x01D\x81\x86T\x94\x80`$` \x84\x01\x98cA[\xF3c`\xE0\x1B\x8ARF\x82\x86\x01R\x87`D\x86\x01R3`d\x86\x01RC`\x84\x86\x01RB`\xA4\x86\x01RD`\xC4\x86\x01R\x88`\xE4\x86\x01Ra\x01\0a\x01\x04\x86\x01R\x82a\x01$\x86\x01R\x01\x84\x84\x017_\x83\x82\x84\x01\x01R`\x1F\x80\x19\x91\x01\x16\x81\x01\x03\x01`\x1F\x19\x81\x01\x82R`\x1F\x80\x19\x91\x01\x16\x81\x01\x81\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x02\x9DW`@R\x80Qb\x01\0\0\x81\x11a\x02\xB1WP\x80Q\x84 \x93h\x01\0\0\0\0\0\0\0\0\x84\x10\x15a\x02\x9DW`@\x7F\xC0]3q!\xA6\xE8`\\n\xC0\xB7*\xA2\x9CB\x10\xFF\xE6\xE5\xB9\xCE\xFD\xD6\xA7\x05\x81\x88\xA8\xF6o\x98\x92a\x02Y\x86` \x99`\x01\x82\x01\x81Ua\x02\xE4V[\x81T\x90`\x03\x1B\x90\x89\x82\x1B\x91_\x19\x90\x1B\x19\x16\x17\x90U\x81Q\x92\x83\x91\x89\x83RQ\x80\x91\x81\x8B\x85\x01R\x84\x84\x01^_\x82\x82\x01\x84\x01R`\x1F\x01`\x1F\x19\x16\x81\x01\x03\x01\x90\xA3`@Q\x90\x81R\xF3[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x82c\x04\xF9\r\xC5`\xE5\x1B_R`\x04R`$Rb\x01\0\0`DR`d_\xFD[`\x045\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\x82WV[\x80T\x82\x10\x15a\x02\xF9W_R` _ \x01\x90_\x90V[cNH{q`\xE0\x1B_R`2`\x04R`$_\xFD\xFE\xA2dipfsX\"\x12 t\x0Epy$\xE6i\x01I\x99&\xE1 \xC4\xCD6\xBE\n\xCF\xDBgO\xA0\xA5:*\x8Eu\x9Cgq\xCBdsolcC\0\x08\x1E\x003",
);
/// The runtime bytecode of the contract, as deployed on the network.
///
/// ```text
///0x6080806040526004361015610012575f80fd5b5f3560e01c9081631789cd63146101055750806361a93c87146100ce578063677087c9146100865763b3a1acd814610048575f80fd5b34610082575f3660031901126100825760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b5f80fd5b34610082576040366003190112610082576001600160a01b036100a76102ce565b165f525f60205260206100bf60243560405f206102e4565b90549060031b1c604051908152f35b34610082576020366003190112610082576001600160a01b036100ef6102ce565b165f525f602052602060405f2054604051908152f35b346100825760403660031901126100825761011e6102ce565b6024359067ffffffffffffffff821161008257366023830112156100825781600401359067ffffffffffffffff82116100825736602483850101116100825760018060a01b0316805f525f60205260405f209361014481865494806024602084019863415bf36360e01b8a5246828601528760448601523360648601524360848601524260a48601524460c48601528860e48601526101006101048601528261012486015201848401375f838284010152601f801991011681010301601f1981018252601f8019910116810181811067ffffffffffffffff82111761029d5760405280516201000081116102b1575080518420936801000000000000000084101561029d5760407fc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f9892610259866020996001820181556102e4565b81549060031b9089821b915f19901b19161790558151928391898352518091818b8501528484015e5f828201840152601f01601f19168101030190a3604051908152f35b634e487b7160e01b5f52604160045260245ffd5b826304f90dc560e51b5f526004526024526201000060445260645ffd5b600435906001600160a01b038216820361008257565b80548210156102f9575f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffdfea2646970667358221220740e707924e66901499926e120c4cd36be0acfdb674fa0a53a2a8e759c6771cb64736f6c634300081e0033
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x17\x89\xCDc\x14a\x01\x05WP\x80ca\xA9<\x87\x14a\0\xCEW\x80cgp\x87\xC9\x14a\0\x86Wc\xB3\xA1\xAC\xD8\x14a\0HW_\x80\xFD[4a\0\x82W_6`\x03\x19\x01\x12a\0\x82W` `@Q\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R\xF3[_\x80\xFD[4a\0\x82W`@6`\x03\x19\x01\x12a\0\x82W`\x01`\x01`\xA0\x1B\x03a\0\xA7a\x02\xCEV[\x16_R_` R` a\0\xBF`$5`@_ a\x02\xE4V[\x90T\x90`\x03\x1B\x1C`@Q\x90\x81R\xF3[4a\0\x82W` 6`\x03\x19\x01\x12a\0\x82W`\x01`\x01`\xA0\x1B\x03a\0\xEFa\x02\xCEV[\x16_R_` R` `@_ T`@Q\x90\x81R\xF3[4a\0\x82W`@6`\x03\x19\x01\x12a\0\x82Wa\x01\x1Ea\x02\xCEV[`$5\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\0\x82W6`#\x83\x01\x12\x15a\0\x82W\x81`\x04\x015\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11a\0\x82W6`$\x83\x85\x01\x01\x11a\0\x82W`\x01\x80`\xA0\x1B\x03\x16\x80_R_` R`@_ \x93a\x01D\x81\x86T\x94\x80`$` \x84\x01\x98cA[\xF3c`\xE0\x1B\x8ARF\x82\x86\x01R\x87`D\x86\x01R3`d\x86\x01RC`\x84\x86\x01RB`\xA4\x86\x01RD`\xC4\x86\x01R\x88`\xE4\x86\x01Ra\x01\0a\x01\x04\x86\x01R\x82a\x01$\x86\x01R\x01\x84\x84\x017_\x83\x82\x84\x01\x01R`\x1F\x80\x19\x91\x01\x16\x81\x01\x03\x01`\x1F\x19\x81\x01\x82R`\x1F\x80\x19\x91\x01\x16\x81\x01\x81\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x02\x9DW`@R\x80Qb\x01\0\0\x81\x11a\x02\xB1WP\x80Q\x84 \x93h\x01\0\0\0\0\0\0\0\0\x84\x10\x15a\x02\x9DW`@\x7F\xC0]3q!\xA6\xE8`\\n\xC0\xB7*\xA2\x9CB\x10\xFF\xE6\xE5\xB9\xCE\xFD\xD6\xA7\x05\x81\x88\xA8\xF6o\x98\x92a\x02Y\x86` \x99`\x01\x82\x01\x81Ua\x02\xE4V[\x81T\x90`\x03\x1B\x90\x89\x82\x1B\x91_\x19\x90\x1B\x19\x16\x17\x90U\x81Q\x92\x83\x91\x89\x83RQ\x80\x91\x81\x8B\x85\x01R\x84\x84\x01^_\x82\x82\x01\x84\x01R`\x1F\x01`\x1F\x19\x16\x81\x01\x03\x01\x90\xA3`@Q\x90\x81R\xF3[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x82c\x04\xF9\r\xC5`\xE5\x1B_R`\x04R`$Rb\x01\0\0`DR`d_\xFD[`\x045\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\x82WV[\x80T\x82\x10\x15a\x02\xF9W_R` _ \x01\x90_\x90V[cNH{q`\xE0\x1B_R`2`\x04R`$_\xFD\xFE\xA2dipfsX\"\x12 t\x0Epy$\xE6i\x01I\x99&\xE1 \xC4\xCD6\xBE\n\xCF\xDBgO\xA0\xA5:*\x8Eu\x9Cgq\xCBdsolcC\0\x08\x1E\x003",
);
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `InputTooLarge(address,uint256,uint256)` and selector `0x9f21b8a0`.
```solidity
error InputTooLarge(address appContract, uint256 inputLength, uint256 maxInputLength);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct InputTooLarge {
#[allow(missing_docs)]
pub appContract: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub inputLength: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub maxInputLength: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<InputTooLarge> for UnderlyingRustTuple<'_> {
fn from(value: InputTooLarge) -> Self {
(value.appContract, value.inputLength, value.maxInputLength)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for InputTooLarge {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
appContract: tuple.0,
inputLength: tuple.1,
maxInputLength: tuple.2,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for InputTooLarge {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "InputTooLarge(address,uint256,uint256)";
const SELECTOR: [u8; 4] = [159u8, 33u8, 184u8, 160u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.appContract,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.inputLength),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.maxInputLength),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Event with signature `InputAdded(address,uint256,bytes)` and selector `0xc05d337121a6e8605c6ec0b72aa29c4210ffe6e5b9cefdd6a7058188a8f66f98`.
```solidity
event InputAdded(address indexed appContract, uint256 indexed index, bytes input);
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct InputAdded {
#[allow(missing_docs)]
pub appContract: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub index: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub input: alloy::sol_types::private::Bytes,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for InputAdded {
type DataTuple<'a> = (alloy::sol_types::sol_data::Bytes,);
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
const SIGNATURE: &'static str = "InputAdded(address,uint256,bytes)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
192u8, 93u8, 51u8, 113u8, 33u8, 166u8, 232u8, 96u8, 92u8, 110u8, 192u8,
183u8, 42u8, 162u8, 156u8, 66u8, 16u8, 255u8, 230u8, 229u8, 185u8, 206u8,
253u8, 214u8, 167u8, 5u8, 129u8, 136u8, 168u8, 246u8, 111u8, 152u8,
]);
const ANONYMOUS: bool = false;
#[allow(unused_variables)]
#[inline]
fn new(
topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
) -> Self {
Self {
appContract: topics.1,
index: topics.2,
input: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(
alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
),
);
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.input,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.appContract.clone(),
self.index.clone(),
)
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(
Self::SIGNATURE_HASH,
);
out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.appContract,
);
out[2usize] = <alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::EventTopic>::encode_topic(&self.index);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for InputAdded {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&InputAdded> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &InputAdded) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `addInput(address,bytes)` and selector `0x1789cd63`.
```solidity
function addInput(address appContract, bytes memory payload) external returns (bytes32);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct addInputCall {
#[allow(missing_docs)]
pub appContract: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub payload: alloy::sol_types::private::Bytes,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`addInput(address,bytes)`](addInputCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct addInputReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::FixedBytes<32>,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Bytes,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Bytes,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<addInputCall> for UnderlyingRustTuple<'_> {
fn from(value: addInputCall) -> Self {
(value.appContract, value.payload)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for addInputCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
appContract: tuple.0,
payload: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<addInputReturn> for UnderlyingRustTuple<'_> {
fn from(value: addInputReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for addInputReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for addInputCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Bytes,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::FixedBytes<32>;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "addInput(address,bytes)";
const SELECTOR: [u8; 4] = [23u8, 137u8, 205u8, 99u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.appContract,
),
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.payload,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: addInputReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: addInputReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `getDeploymentBlockNumber()` and selector `0xb3a1acd8`.
```solidity
function getDeploymentBlockNumber() external view returns (uint256);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getDeploymentBlockNumberCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`getDeploymentBlockNumber()`](getDeploymentBlockNumberCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getDeploymentBlockNumberReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getDeploymentBlockNumberCall>
for UnderlyingRustTuple<'_> {
fn from(value: getDeploymentBlockNumberCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getDeploymentBlockNumberCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getDeploymentBlockNumberReturn>
for UnderlyingRustTuple<'_> {
fn from(value: getDeploymentBlockNumberReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getDeploymentBlockNumberReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getDeploymentBlockNumberCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::primitives::aliases::U256;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getDeploymentBlockNumber()";
const SELECTOR: [u8; 4] = [179u8, 161u8, 172u8, 216u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getDeploymentBlockNumberReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getDeploymentBlockNumberReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `getInputHash(address,uint256)` and selector `0x677087c9`.
```solidity
function getInputHash(address appContract, uint256 index) external view returns (bytes32);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getInputHashCall {
#[allow(missing_docs)]
pub appContract: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub index: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`getInputHash(address,uint256)`](getInputHashCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getInputHashReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::FixedBytes<32>,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getInputHashCall> for UnderlyingRustTuple<'_> {
fn from(value: getInputHashCall) -> Self {
(value.appContract, value.index)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getInputHashCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
appContract: tuple.0,
index: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getInputHashReturn> for UnderlyingRustTuple<'_> {
fn from(value: getInputHashReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getInputHashReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getInputHashCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::FixedBytes<32>;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getInputHash(address,uint256)";
const SELECTOR: [u8; 4] = [103u8, 112u8, 135u8, 201u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.appContract,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.index),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getInputHashReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getInputHashReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `getNumberOfInputs(address)` and selector `0x61a93c87`.
```solidity
function getNumberOfInputs(address appContract) external view returns (uint256);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getNumberOfInputsCall {
#[allow(missing_docs)]
pub appContract: alloy::sol_types::private::Address,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`getNumberOfInputs(address)`](getNumberOfInputsCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getNumberOfInputsReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getNumberOfInputsCall>
for UnderlyingRustTuple<'_> {
fn from(value: getNumberOfInputsCall) -> Self {
(value.appContract,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getNumberOfInputsCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { appContract: tuple.0 }
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<getNumberOfInputsReturn>
for UnderlyingRustTuple<'_> {
fn from(value: getNumberOfInputsReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for getNumberOfInputsReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getNumberOfInputsCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::primitives::aliases::U256;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getNumberOfInputs(address)";
const SELECTOR: [u8; 4] = [97u8, 169u8, 60u8, 135u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.appContract,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(ret),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(|r| {
let r: getNumberOfInputsReturn = r.into();
r._0
})
}
#[inline]
fn abi_decode_returns_validate(
data: &[u8],
) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(|r| {
let r: getNumberOfInputsReturn = r.into();
r._0
})
}
}
};
///Container for all the [`InputBox`](self) function calls.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum InputBoxCalls {
#[allow(missing_docs)]
addInput(addInputCall),
#[allow(missing_docs)]
getDeploymentBlockNumber(getDeploymentBlockNumberCall),
#[allow(missing_docs)]
getInputHash(getInputHashCall),
#[allow(missing_docs)]
getNumberOfInputs(getNumberOfInputsCall),
}
impl InputBoxCalls {
/// All the selectors of this enum.
///
/// Note that the selectors might not be in the same order as the variants.
/// No guarantees are made about the order of the selectors.
///
/// Prefer using `SolInterface` methods instead.
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[23u8, 137u8, 205u8, 99u8],
[97u8, 169u8, 60u8, 135u8],
[103u8, 112u8, 135u8, 201u8],
[179u8, 161u8, 172u8, 216u8],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(addInput),
::core::stringify!(getNumberOfInputs),
::core::stringify!(getInputHash),
::core::stringify!(getDeploymentBlockNumber),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<addInputCall as alloy_sol_types::SolCall>::SIGNATURE,
<getNumberOfInputsCall as alloy_sol_types::SolCall>::SIGNATURE,
<getInputHashCall as alloy_sol_types::SolCall>::SIGNATURE,
<getDeploymentBlockNumberCall as alloy_sol_types::SolCall>::SIGNATURE,
];
/// Returns the signature for the given selector, if known.
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
/// Returns the enum variant name for the given selector, if known.
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for InputBoxCalls {
const NAME: &'static str = "InputBoxCalls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 4usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::addInput(_) => <addInputCall as alloy_sol_types::SolCall>::SELECTOR,
Self::getDeploymentBlockNumber(_) => {
<getDeploymentBlockNumberCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getInputHash(_) => {
<getInputHashCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getNumberOfInputs(_) => {
<getNumberOfInputsCall as alloy_sol_types::SolCall>::SELECTOR
}
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<InputBoxCalls>] = &[
{
fn addInput(data: &[u8]) -> alloy_sol_types::Result<InputBoxCalls> {
<addInputCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(InputBoxCalls::addInput)
}
addInput
},
{
fn getNumberOfInputs(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxCalls> {
<getNumberOfInputsCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(InputBoxCalls::getNumberOfInputs)
}
getNumberOfInputs
},
{
fn getInputHash(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxCalls> {
<getInputHashCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(InputBoxCalls::getInputHash)
}
getInputHash
},
{
fn getDeploymentBlockNumber(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxCalls> {
<getDeploymentBlockNumberCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(InputBoxCalls::getDeploymentBlockNumber)
}
getDeploymentBlockNumber
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_SHIMS[idx](data)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_VALIDATE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<InputBoxCalls>] = &[
{
fn addInput(data: &[u8]) -> alloy_sol_types::Result<InputBoxCalls> {
<addInputCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(InputBoxCalls::addInput)
}
addInput
},
{
fn getNumberOfInputs(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxCalls> {
<getNumberOfInputsCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(InputBoxCalls::getNumberOfInputs)
}
getNumberOfInputs
},
{
fn getInputHash(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxCalls> {
<getInputHashCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(InputBoxCalls::getInputHash)
}
getInputHash
},
{
fn getDeploymentBlockNumber(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxCalls> {
<getDeploymentBlockNumberCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(InputBoxCalls::getDeploymentBlockNumber)
}
getDeploymentBlockNumber
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_VALIDATE_SHIMS[idx](data)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::addInput(inner) => {
<addInputCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::getDeploymentBlockNumber(inner) => {
<getDeploymentBlockNumberCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getInputHash(inner) => {
<getInputHashCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getNumberOfInputs(inner) => {
<getNumberOfInputsCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::addInput(inner) => {
<addInputCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getDeploymentBlockNumber(inner) => {
<getDeploymentBlockNumberCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getInputHash(inner) => {
<getInputHashCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getNumberOfInputs(inner) => {
<getNumberOfInputsCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
}
}
}
///Container for all the [`InputBox`](self) custom errors.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum InputBoxErrors {
#[allow(missing_docs)]
InputTooLarge(InputTooLarge),
}
impl InputBoxErrors {
/// All the selectors of this enum.
///
/// Note that the selectors might not be in the same order as the variants.
/// No guarantees are made about the order of the selectors.
///
/// Prefer using `SolInterface` methods instead.
pub const SELECTORS: &'static [[u8; 4usize]] = &[[159u8, 33u8, 184u8, 160u8]];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(InputTooLarge),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<InputTooLarge as alloy_sol_types::SolError>::SIGNATURE,
];
/// Returns the signature for the given selector, if known.
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
/// Returns the enum variant name for the given selector, if known.
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for InputBoxErrors {
const NAME: &'static str = "InputBoxErrors";
const MIN_DATA_LENGTH: usize = 96usize;
const COUNT: usize = 1usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::InputTooLarge(_) => {
<InputTooLarge as alloy_sol_types::SolError>::SELECTOR
}
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<InputBoxErrors>] = &[
{
fn InputTooLarge(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxErrors> {
<InputTooLarge as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(InputBoxErrors::InputTooLarge)
}
InputTooLarge
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_SHIMS[idx](data)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_VALIDATE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<InputBoxErrors>] = &[
{
fn InputTooLarge(
data: &[u8],
) -> alloy_sol_types::Result<InputBoxErrors> {
<InputTooLarge as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(InputBoxErrors::InputTooLarge)
}
InputTooLarge
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(
alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
),
);
};
DECODE_VALIDATE_SHIMS[idx](data)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::InputTooLarge(inner) => {
<InputTooLarge as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::InputTooLarge(inner) => {
<InputTooLarge as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
}
}
}
///Container for all the [`InputBox`](self) events.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum InputBoxEvents {
#[allow(missing_docs)]
InputAdded(InputAdded),
}
impl InputBoxEvents {
/// All the selectors of this enum.
///
/// Note that the selectors might not be in the same order as the variants.
/// No guarantees are made about the order of the selectors.
///
/// Prefer using `SolInterface` methods instead.
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
192u8, 93u8, 51u8, 113u8, 33u8, 166u8, 232u8, 96u8, 92u8, 110u8, 192u8,
183u8, 42u8, 162u8, 156u8, 66u8, 16u8, 255u8, 230u8, 229u8, 185u8, 206u8,
253u8, 214u8, 167u8, 5u8, 129u8, 136u8, 168u8, 246u8, 111u8, 152u8,
],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(InputAdded),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<InputAdded as alloy_sol_types::SolEvent>::SIGNATURE,
];
/// Returns the signature for the given selector, if known.
#[inline]
pub fn signature_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
/// Returns the enum variant name for the given selector, if known.
#[inline]
pub fn name_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for InputBoxEvents {
const NAME: &'static str = "InputBoxEvents";
const COUNT: usize = 1usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<InputAdded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<InputAdded as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::InputAdded)
}
_ => {
alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
name: <Self as alloy_sol_types::SolEventInterface>::NAME,
log: alloy_sol_types::private::Box::new(
alloy_sol_types::private::LogData::new_unchecked(
topics.to_vec(),
data.to_vec().into(),
),
),
})
}
}
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for InputBoxEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::InputAdded(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::InputAdded(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
/**Creates a new wrapper around an on-chain [`InputBox`](self) contract instance.
See the [wrapper's documentation](`InputBoxInstance`) for more details.*/
#[inline]
pub const fn new<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
__provider: P,
) -> InputBoxInstance<P, N> {
InputBoxInstance::<P, N>::new(address, __provider)
}
/**Deploys this contract using the given `provider` and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
#[inline]
pub fn deploy<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
__provider: P,
) -> impl ::core::future::Future<
Output = alloy_contract::Result<InputBoxInstance<P, N>>,
> {
InputBoxInstance::<P, N>::deploy(__provider)
}
/**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
and constructor arguments, if any.
This is a simple wrapper around creating a `RawCallBuilder` with the data set to
the bytecode concatenated with the constructor's ABI-encoded arguments.*/
#[inline]
pub fn deploy_builder<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
InputBoxInstance::<P, N>::deploy_builder(__provider)
}
/**A [`InputBox`](self) instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`InputBox`](self) contract located at a given `address`, using a given
provider `P`.
If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
documentation on how to provide it), the `deploy` and `deploy_builder` methods can
be used to deploy a new instance of the contract.
See the [module-level documentation](self) for all the available methods.*/
#[derive(Clone)]
pub struct InputBoxInstance<P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network: ::core::marker::PhantomData<N>,
}
#[automatically_derived]
impl<P, N> ::core::fmt::Debug for InputBoxInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("InputBoxInstance").field(&self.address).finish()
}
}
/// Instantiation and getters/setters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> InputBoxInstance<P, N> {
/**Creates a new wrapper around an on-chain [`InputBox`](self) contract instance.
See the [wrapper's documentation](`InputBoxInstance`) for more details.*/
#[inline]
pub const fn new(
address: alloy_sol_types::private::Address,
__provider: P,
) -> Self {
Self {
address,
provider: __provider,
_network: ::core::marker::PhantomData,
}
}
/**Deploys this contract using the given `provider` and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
#[inline]
pub async fn deploy(
__provider: P,
) -> alloy_contract::Result<InputBoxInstance<P, N>> {
let call_builder = Self::deploy_builder(__provider);
let contract_address = call_builder.deploy().await?;
Ok(Self::new(contract_address, call_builder.provider))
}
/**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
and constructor arguments, if any.
This is a simple wrapper around creating a `RawCallBuilder` with the data set to
the bytecode concatenated with the constructor's ABI-encoded arguments.*/
#[inline]
pub fn deploy_builder(__provider: P) -> alloy_contract::RawCallBuilder<P, N> {
alloy_contract::RawCallBuilder::new_raw_deploy(
__provider,
::core::clone::Clone::clone(&BYTECODE),
)
}
/// Returns a reference to the address.
#[inline]
pub const fn address(&self) -> &alloy_sol_types::private::Address {
&self.address
}
/// Sets the address.
#[inline]
pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
self.address = address;
}
/// Sets the address and returns `self`.
pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
self.set_address(address);
self
}
/// Returns a reference to the provider.
#[inline]
pub const fn provider(&self) -> &P {
&self.provider
}
}
impl<P: ::core::clone::Clone, N> InputBoxInstance<&P, N> {
/// Clones the provider and returns a new instance with the cloned provider.
#[inline]
pub fn with_cloned_provider(self) -> InputBoxInstance<P, N> {
InputBoxInstance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network: ::core::marker::PhantomData,
}
}
}
/// Function calls.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> InputBoxInstance<P, N> {
/// Creates a new call builder using this contract instance's provider and address.
///
/// Note that the call can be any function call, not just those defined in this
/// contract. Prefer using the other methods for building type-safe contract calls.
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<&P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
///Creates a new call builder for the [`addInput`] function.
pub fn addInput(
&self,
appContract: alloy::sol_types::private::Address,
payload: alloy::sol_types::private::Bytes,
) -> alloy_contract::SolCallBuilder<&P, addInputCall, N> {
self.call_builder(
&addInputCall {
appContract,
payload,
},
)
}
///Creates a new call builder for the [`getDeploymentBlockNumber`] function.
pub fn getDeploymentBlockNumber(
&self,
) -> alloy_contract::SolCallBuilder<&P, getDeploymentBlockNumberCall, N> {
self.call_builder(&getDeploymentBlockNumberCall)
}
///Creates a new call builder for the [`getInputHash`] function.
pub fn getInputHash(
&self,
appContract: alloy::sol_types::private::Address,
index: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, getInputHashCall, N> {
self.call_builder(
&getInputHashCall {
appContract,
index,
},
)
}
///Creates a new call builder for the [`getNumberOfInputs`] function.
pub fn getNumberOfInputs(
&self,
appContract: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<&P, getNumberOfInputsCall, N> {
self.call_builder(
&getNumberOfInputsCall {
appContract,
},
)
}
}
/// Event filters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> InputBoxInstance<P, N> {
/// Creates a new event filter using this contract instance's provider and address.
///
/// Note that the type can be any event, not just those defined in this contract.
/// Prefer using the other methods for building type-safe event filters.
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<&P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
///Creates a new event filter for the [`InputAdded`] event.
pub fn InputAdded_filter(&self) -> alloy_contract::Event<&P, InputAdded, N> {
self.event_filter::<InputAdded>()
}
}
}