/**
Generated by the following Solidity interface...
```solidity
interface ERC1155SinglePortal {
constructor(address inputBox);
function depositSingleERC1155Token(address token, address appContract, uint256 tokenId, uint256 value, bytes memory baseLayerData, bytes memory execLayerData) external;
function getInputBox() external view returns (address);
}
```
...which was generated by the following JSON ABI:
```json
[
{
"type": "constructor",
"inputs": [
{
"name": "inputBox",
"type": "address",
"internalType": "contract IInputBox"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "depositSingleERC1155Token",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "contract IERC1155"
},
{
"name": "appContract",
"type": "address",
"internalType": "address"
},
{
"name": "tokenId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "baseLayerData",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "execLayerData",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getInputBox",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IInputBox"
}
],
"stateMutability": "view"
}
]
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod ERC1155SinglePortal {
use super::*;
use alloy::sol_types as alloy_sol_types;
/// The creation / init bytecode of the contract.
///
/// ```text
///0x60a034606d57601f61042738819003918201601f19168301916001600160401b03831184841017607157808492602094604052833981010312606d57516001600160a01b0381168103606d576080526040516103a1908161008682396080518181816101f001526102b80152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f905f3560e01c908162aace9a146102a6575063dec07dca14610033575f80fd5b346102a25760c03660031901126102a2576004356001600160a01b0381168082036102a2576024356001600160a01b038116908190036102a2576044356064359260843567ffffffffffffffff81116102a2576100949036906004016102e7565b9160a43567ffffffffffffffff81116102a2576100b59036906004016102e7565b9091803b156102a2575f6040518092637921219560e11b82523360048301528960248301528860448301528a606483015260a060848301528183816100fe60a482018c8c61034b565b03925af180156102975761025e575b5093602096959361013f61015f6101ae9561015160889660649a6040519586948f86019860408a52606087019161034b565b848103601f190160408601529161034b565b03601f198101835282610315565b6040519788938a85019b6bffffffffffffffffffffffff199060601b168c523360601b6034860152604885015260688401525180918484015e810189838201520301601f198101855284610315565b6040519485938492631789cd6360e01b84526004840152604060248401525180918160448501528484015e8181018301879052601f01601f19168101030181857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561025357610228575080f35b602090813d831161024c575b61023e8183610315565b810103126102495780f35b80fd5b503d610234565b6040513d84823e3d90fd5b6064959199509361013f61015f6101ae956101516088966102835f60209e9d9b610315565b5f9e969a509650509550505093959661010d565b6040513d5f823e3d90fd5b5f80fd5b346102a2575f3660031901126102a2577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9181601f840112156102a25782359167ffffffffffffffff83116102a257602083818601950101116102a257565b90601f8019910116810190811067ffffffffffffffff82111761033757604052565b634e487b7160e01b5f52604160045260245ffd5b908060209392818452848401375f828201840152601f01601f191601019056fea2646970667358221220000bcca33477b4a6b7ffa52c8672ded0c094f65b3936e4777fb133c246466d7764736f6c634300081e0033
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\xA04`mW`\x1Fa\x04'8\x81\x90\x03\x91\x82\x01`\x1F\x19\x16\x83\x01\x91`\x01`\x01`@\x1B\x03\x83\x11\x84\x84\x10\x17`qW\x80\x84\x92` \x94`@R\x839\x81\x01\x03\x12`mWQ`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x03`mW`\x80R`@Qa\x03\xA1\x90\x81a\0\x86\x829`\x80Q\x81\x81\x81a\x01\xF0\x01Ra\x02\xB8\x01R\xF3[_\x80\xFD[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD\xFE`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_\x90_5`\xE0\x1C\x90\x81b\xAA\xCE\x9A\x14a\x02\xA6WPc\xDE\xC0}\xCA\x14a\x003W_\x80\xFD[4a\x02\xA2W`\xC06`\x03\x19\x01\x12a\x02\xA2W`\x045`\x01`\x01`\xA0\x1B\x03\x81\x16\x80\x82\x03a\x02\xA2W`$5`\x01`\x01`\xA0\x1B\x03\x81\x16\x90\x81\x90\x03a\x02\xA2W`D5`d5\x92`\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x02\xA2Wa\0\x94\x906\x90`\x04\x01a\x02\xE7V[\x91`\xA45g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x02\xA2Wa\0\xB5\x906\x90`\x04\x01a\x02\xE7V[\x90\x91\x80;\x15a\x02\xA2W_`@Q\x80\x92cy!!\x95`\xE1\x1B\x82R3`\x04\x83\x01R\x89`$\x83\x01R\x88`D\x83\x01R\x8A`d\x83\x01R`\xA0`\x84\x83\x01R\x81\x83\x81a\0\xFE`\xA4\x82\x01\x8C\x8Ca\x03KV[\x03\x92Z\xF1\x80\x15a\x02\x97Wa\x02^W[P\x93` \x96\x95\x93a\x01?a\x01_a\x01\xAE\x95a\x01Q`\x88\x96`d\x9A`@Q\x95\x86\x94\x8F\x86\x01\x98`@\x8AR``\x87\x01\x91a\x03KV[\x84\x81\x03`\x1F\x19\x01`@\x86\x01R\x91a\x03KV[\x03`\x1F\x19\x81\x01\x83R\x82a\x03\x15V[`@Q\x97\x88\x93\x8A\x85\x01\x9Bk\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x90``\x1B\x16\x8CR3``\x1B`4\x86\x01R`H\x85\x01R`h\x84\x01RQ\x80\x91\x84\x84\x01^\x81\x01\x89\x83\x82\x01R\x03\x01`\x1F\x19\x81\x01\x85R\x84a\x03\x15V[`@Q\x94\x85\x93\x84\x92c\x17\x89\xCDc`\xE0\x1B\x84R`\x04\x84\x01R`@`$\x84\x01RQ\x80\x91\x81`D\x85\x01R\x84\x84\x01^\x81\x81\x01\x83\x01\x87\x90R`\x1F\x01`\x1F\x19\x16\x81\x01\x03\x01\x81\x85\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`\x01`\x01`\xA0\x1B\x03\x16Z\xF1\x80\x15a\x02SWa\x02(WP\x80\xF3[` \x90\x81=\x83\x11a\x02LW[a\x02>\x81\x83a\x03\x15V[\x81\x01\x03\x12a\x02IW\x80\xF3[\x80\xFD[P=a\x024V[`@Q=\x84\x82>=\x90\xFD[`d\x95\x91\x99P\x93a\x01?a\x01_a\x01\xAE\x95a\x01Q`\x88\x96a\x02\x83_` \x9E\x9D\x9Ba\x03\x15V[_\x9E\x96\x9AP\x96PP\x95PPP\x93\x95\x96a\x01\rV[`@Q=_\x82>=\x90\xFD[_\x80\xFD[4a\x02\xA2W_6`\x03\x19\x01\x12a\x02\xA2W\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`\x01`\x01`\xA0\x1B\x03\x16\x81R` \x90\xF3[\x91\x81`\x1F\x84\x01\x12\x15a\x02\xA2W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x02\xA2W` \x83\x81\x86\x01\x95\x01\x01\x11a\x02\xA2WV[\x90`\x1F\x80\x19\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x037W`@RV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x90\x80` \x93\x92\x81\x84R\x84\x84\x017_\x82\x82\x01\x84\x01R`\x1F\x01`\x1F\x19\x16\x01\x01\x90V\xFE\xA2dipfsX\"\x12 \0\x0B\xCC\xA34w\xB4\xA6\xB7\xFF\xA5,\x86r\xDE\xD0\xC0\x94\xF6[96\xE4w\x7F\xB13\xC2FFmwdsolcC\0\x08\x1E\x003",
);
/// The runtime bytecode of the contract, as deployed on the network.
///
/// ```text
///0x6080806040526004361015610012575f80fd5b5f905f3560e01c908162aace9a146102a6575063dec07dca14610033575f80fd5b346102a25760c03660031901126102a2576004356001600160a01b0381168082036102a2576024356001600160a01b038116908190036102a2576044356064359260843567ffffffffffffffff81116102a2576100949036906004016102e7565b9160a43567ffffffffffffffff81116102a2576100b59036906004016102e7565b9091803b156102a2575f6040518092637921219560e11b82523360048301528960248301528860448301528a606483015260a060848301528183816100fe60a482018c8c61034b565b03925af180156102975761025e575b5093602096959361013f61015f6101ae9561015160889660649a6040519586948f86019860408a52606087019161034b565b848103601f190160408601529161034b565b03601f198101835282610315565b6040519788938a85019b6bffffffffffffffffffffffff199060601b168c523360601b6034860152604885015260688401525180918484015e810189838201520301601f198101855284610315565b6040519485938492631789cd6360e01b84526004840152604060248401525180918160448501528484015e8181018301879052601f01601f19168101030181857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561025357610228575080f35b602090813d831161024c575b61023e8183610315565b810103126102495780f35b80fd5b503d610234565b6040513d84823e3d90fd5b6064959199509361013f61015f6101ae956101516088966102835f60209e9d9b610315565b5f9e969a509650509550505093959661010d565b6040513d5f823e3d90fd5b5f80fd5b346102a2575f3660031901126102a2577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b9181601f840112156102a25782359167ffffffffffffffff83116102a257602083818601950101116102a257565b90601f8019910116810190811067ffffffffffffffff82111761033757604052565b634e487b7160e01b5f52604160045260245ffd5b908060209392818452848401375f828201840152601f01601f191601019056fea2646970667358221220000bcca33477b4a6b7ffa52c8672ded0c094f65b3936e4777fb133c246466d7764736f6c634300081e0033
/// ```
#[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[_\x90_5`\xE0\x1C\x90\x81b\xAA\xCE\x9A\x14a\x02\xA6WPc\xDE\xC0}\xCA\x14a\x003W_\x80\xFD[4a\x02\xA2W`\xC06`\x03\x19\x01\x12a\x02\xA2W`\x045`\x01`\x01`\xA0\x1B\x03\x81\x16\x80\x82\x03a\x02\xA2W`$5`\x01`\x01`\xA0\x1B\x03\x81\x16\x90\x81\x90\x03a\x02\xA2W`D5`d5\x92`\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x02\xA2Wa\0\x94\x906\x90`\x04\x01a\x02\xE7V[\x91`\xA45g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11a\x02\xA2Wa\0\xB5\x906\x90`\x04\x01a\x02\xE7V[\x90\x91\x80;\x15a\x02\xA2W_`@Q\x80\x92cy!!\x95`\xE1\x1B\x82R3`\x04\x83\x01R\x89`$\x83\x01R\x88`D\x83\x01R\x8A`d\x83\x01R`\xA0`\x84\x83\x01R\x81\x83\x81a\0\xFE`\xA4\x82\x01\x8C\x8Ca\x03KV[\x03\x92Z\xF1\x80\x15a\x02\x97Wa\x02^W[P\x93` \x96\x95\x93a\x01?a\x01_a\x01\xAE\x95a\x01Q`\x88\x96`d\x9A`@Q\x95\x86\x94\x8F\x86\x01\x98`@\x8AR``\x87\x01\x91a\x03KV[\x84\x81\x03`\x1F\x19\x01`@\x86\x01R\x91a\x03KV[\x03`\x1F\x19\x81\x01\x83R\x82a\x03\x15V[`@Q\x97\x88\x93\x8A\x85\x01\x9Bk\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x90``\x1B\x16\x8CR3``\x1B`4\x86\x01R`H\x85\x01R`h\x84\x01RQ\x80\x91\x84\x84\x01^\x81\x01\x89\x83\x82\x01R\x03\x01`\x1F\x19\x81\x01\x85R\x84a\x03\x15V[`@Q\x94\x85\x93\x84\x92c\x17\x89\xCDc`\xE0\x1B\x84R`\x04\x84\x01R`@`$\x84\x01RQ\x80\x91\x81`D\x85\x01R\x84\x84\x01^\x81\x81\x01\x83\x01\x87\x90R`\x1F\x01`\x1F\x19\x16\x81\x01\x03\x01\x81\x85\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`\x01`\x01`\xA0\x1B\x03\x16Z\xF1\x80\x15a\x02SWa\x02(WP\x80\xF3[` \x90\x81=\x83\x11a\x02LW[a\x02>\x81\x83a\x03\x15V[\x81\x01\x03\x12a\x02IW\x80\xF3[\x80\xFD[P=a\x024V[`@Q=\x84\x82>=\x90\xFD[`d\x95\x91\x99P\x93a\x01?a\x01_a\x01\xAE\x95a\x01Q`\x88\x96a\x02\x83_` \x9E\x9D\x9Ba\x03\x15V[_\x9E\x96\x9AP\x96PP\x95PPP\x93\x95\x96a\x01\rV[`@Q=_\x82>=\x90\xFD[_\x80\xFD[4a\x02\xA2W_6`\x03\x19\x01\x12a\x02\xA2W\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`\x01`\x01`\xA0\x1B\x03\x16\x81R` \x90\xF3[\x91\x81`\x1F\x84\x01\x12\x15a\x02\xA2W\x825\x91g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x11a\x02\xA2W` \x83\x81\x86\x01\x95\x01\x01\x11a\x02\xA2WV[\x90`\x1F\x80\x19\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\x037W`@RV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x90\x80` \x93\x92\x81\x84R\x84\x84\x017_\x82\x82\x01\x84\x01R`\x1F\x01`\x1F\x19\x16\x01\x01\x90V\xFE\xA2dipfsX\"\x12 \0\x0B\xCC\xA34w\xB4\xA6\xB7\xFF\xA5,\x86r\xDE\xD0\xC0\x94\xF6[96\xE4w\x7F\xB13\xC2FFmwdsolcC\0\x08\x1E\x003",
);
/**Constructor`.
```solidity
constructor(address inputBox);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct constructorCall {
#[allow(missing_docs)]
pub inputBox: alloy::sol_types::private::Address,
}
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<constructorCall> for UnderlyingRustTuple<'_> {
fn from(value: constructorCall) -> Self {
(value.inputBox,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for constructorCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { inputBox: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolConstructor for constructorCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
#[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.inputBox,
),
)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `depositSingleERC1155Token(address,address,uint256,uint256,bytes,bytes)` and selector `0xdec07dca`.
```solidity
function depositSingleERC1155Token(address token, address appContract, uint256 tokenId, uint256 value, bytes memory baseLayerData, bytes memory execLayerData) external;
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct depositSingleERC1155TokenCall {
#[allow(missing_docs)]
pub token: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub appContract: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub tokenId: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub value: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub baseLayerData: alloy::sol_types::private::Bytes,
#[allow(missing_docs)]
pub execLayerData: alloy::sol_types::private::Bytes,
}
///Container type for the return parameters of the [`depositSingleERC1155Token(address,address,uint256,uint256,bytes,bytes)`](depositSingleERC1155TokenCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct depositSingleERC1155TokenReturn {}
#[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::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Bytes,
alloy::sol_types::sol_data::Bytes,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
alloy::sol_types::private::primitives::aliases::U256,
alloy::sol_types::private::Bytes,
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<depositSingleERC1155TokenCall>
for UnderlyingRustTuple<'_> {
fn from(value: depositSingleERC1155TokenCall) -> Self {
(
value.token,
value.appContract,
value.tokenId,
value.value,
value.baseLayerData,
value.execLayerData,
)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for depositSingleERC1155TokenCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
token: tuple.0,
appContract: tuple.1,
tokenId: tuple.2,
value: tuple.3,
baseLayerData: tuple.4,
execLayerData: tuple.5,
}
}
}
}
{
#[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<depositSingleERC1155TokenReturn>
for UnderlyingRustTuple<'_> {
fn from(value: depositSingleERC1155TokenReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for depositSingleERC1155TokenReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl depositSingleERC1155TokenReturn {
fn _tokenize(
&self,
) -> <depositSingleERC1155TokenCall as alloy_sol_types::SolCall>::ReturnToken<
'_,
> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for depositSingleERC1155TokenCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Bytes,
alloy::sol_types::sol_data::Bytes,
);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = depositSingleERC1155TokenReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "depositSingleERC1155Token(address,address,uint256,uint256,bytes,bytes)";
const SELECTOR: [u8; 4] = [222u8, 192u8, 125u8, 202u8];
#[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.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.tokenId),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.value),
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.baseLayerData,
),
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.execLayerData,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
depositSingleERC1155TokenReturn::_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(Into::into)
}
#[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(Into::into)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `getInputBox()` and selector `0x00aace9a`.
```solidity
function getInputBox() external view returns (address);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getInputBoxCall;
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`getInputBox()`](getInputBoxCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct getInputBoxReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::Address,
}
#[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<getInputBoxCall> for UnderlyingRustTuple<'_> {
fn from(value: getInputBoxCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getInputBoxCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[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<getInputBoxReturn> for UnderlyingRustTuple<'_> {
fn from(value: getInputBoxReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for getInputBoxReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for getInputBoxCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::Address;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,);
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "getInputBox()";
const SELECTOR: [u8; 4] = [0u8, 170u8, 206u8, 154u8];
#[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::Address 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: getInputBoxReturn = 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: getInputBoxReturn = r.into();
r._0
})
}
}
};
///Container for all the [`ERC1155SinglePortal`](self) function calls.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum ERC1155SinglePortalCalls {
#[allow(missing_docs)]
depositSingleERC1155Token(depositSingleERC1155TokenCall),
#[allow(missing_docs)]
getInputBox(getInputBoxCall),
}
impl ERC1155SinglePortalCalls {
/// 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]] = &[
[0u8, 170u8, 206u8, 154u8],
[222u8, 192u8, 125u8, 202u8],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(getInputBox),
::core::stringify!(depositSingleERC1155Token),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<getInputBoxCall as alloy_sol_types::SolCall>::SIGNATURE,
<depositSingleERC1155TokenCall 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 ERC1155SinglePortalCalls {
const NAME: &'static str = "ERC1155SinglePortalCalls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 2usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::depositSingleERC1155Token(_) => {
<depositSingleERC1155TokenCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::getInputBox(_) => {
<getInputBoxCall 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<ERC1155SinglePortalCalls>] = &[
{
fn getInputBox(
data: &[u8],
) -> alloy_sol_types::Result<ERC1155SinglePortalCalls> {
<getInputBoxCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(ERC1155SinglePortalCalls::getInputBox)
}
getInputBox
},
{
fn depositSingleERC1155Token(
data: &[u8],
) -> alloy_sol_types::Result<ERC1155SinglePortalCalls> {
<depositSingleERC1155TokenCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(ERC1155SinglePortalCalls::depositSingleERC1155Token)
}
depositSingleERC1155Token
},
];
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<ERC1155SinglePortalCalls>] = &[
{
fn getInputBox(
data: &[u8],
) -> alloy_sol_types::Result<ERC1155SinglePortalCalls> {
<getInputBoxCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(ERC1155SinglePortalCalls::getInputBox)
}
getInputBox
},
{
fn depositSingleERC1155Token(
data: &[u8],
) -> alloy_sol_types::Result<ERC1155SinglePortalCalls> {
<depositSingleERC1155TokenCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(ERC1155SinglePortalCalls::depositSingleERC1155Token)
}
depositSingleERC1155Token
},
];
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::depositSingleERC1155Token(inner) => {
<depositSingleERC1155TokenCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::getInputBox(inner) => {
<getInputBoxCall 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::depositSingleERC1155Token(inner) => {
<depositSingleERC1155TokenCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::getInputBox(inner) => {
<getInputBoxCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
}
}
}
use alloy::contract as alloy_contract;
/**Creates a new wrapper around an on-chain [`ERC1155SinglePortal`](self) contract instance.
See the [wrapper's documentation](`ERC1155SinglePortalInstance`) 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,
) -> ERC1155SinglePortalInstance<P, N> {
ERC1155SinglePortalInstance::<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,
inputBox: alloy::sol_types::private::Address,
) -> impl ::core::future::Future<
Output = alloy_contract::Result<ERC1155SinglePortalInstance<P, N>>,
> {
ERC1155SinglePortalInstance::<P, N>::deploy(__provider, inputBox)
}
/**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,
inputBox: alloy::sol_types::private::Address,
) -> alloy_contract::RawCallBuilder<P, N> {
ERC1155SinglePortalInstance::<P, N>::deploy_builder(__provider, inputBox)
}
/**A [`ERC1155SinglePortal`](self) instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`ERC1155SinglePortal`](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 ERC1155SinglePortalInstance<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 ERC1155SinglePortalInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ERC1155SinglePortalInstance").field(&self.address).finish()
}
}
/// Instantiation and getters/setters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> ERC1155SinglePortalInstance<P, N> {
/**Creates a new wrapper around an on-chain [`ERC1155SinglePortal`](self) contract instance.
See the [wrapper's documentation](`ERC1155SinglePortalInstance`) 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,
inputBox: alloy::sol_types::private::Address,
) -> alloy_contract::Result<ERC1155SinglePortalInstance<P, N>> {
let call_builder = Self::deploy_builder(__provider, inputBox);
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,
inputBox: alloy::sol_types::private::Address,
) -> alloy_contract::RawCallBuilder<P, N> {
alloy_contract::RawCallBuilder::new_raw_deploy(
__provider,
[
&BYTECODE[..],
&alloy_sol_types::SolConstructor::abi_encode(
&constructorCall { inputBox },
)[..],
]
.concat()
.into(),
)
}
/// 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> ERC1155SinglePortalInstance<&P, N> {
/// Clones the provider and returns a new instance with the cloned provider.
#[inline]
pub fn with_cloned_provider(self) -> ERC1155SinglePortalInstance<P, N> {
ERC1155SinglePortalInstance {
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,
> ERC1155SinglePortalInstance<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 [`depositSingleERC1155Token`] function.
pub fn depositSingleERC1155Token(
&self,
token: alloy::sol_types::private::Address,
appContract: alloy::sol_types::private::Address,
tokenId: alloy::sol_types::private::primitives::aliases::U256,
value: alloy::sol_types::private::primitives::aliases::U256,
baseLayerData: alloy::sol_types::private::Bytes,
execLayerData: alloy::sol_types::private::Bytes,
) -> alloy_contract::SolCallBuilder<&P, depositSingleERC1155TokenCall, N> {
self.call_builder(
&depositSingleERC1155TokenCall {
token,
appContract,
tokenId,
value,
baseLayerData,
execLayerData,
},
)
}
///Creates a new call builder for the [`getInputBox`] function.
pub fn getInputBox(
&self,
) -> alloy_contract::SolCallBuilder<&P, getInputBoxCall, N> {
self.call_builder(&getInputBoxCall)
}
}
/// Event filters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> ERC1155SinglePortalInstance<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)
}
}
}