/**
Generated by the following Solidity interface...
```solidity
interface AuthorityFactory {
event AuthorityCreated(address authority);
function calculateAuthorityAddress(address authorityOwner, uint256 epochLength, bytes32 salt) external view returns (address);
function newAuthority(address authorityOwner, uint256 epochLength) external returns (address);
function newAuthority(address authorityOwner, uint256 epochLength, bytes32 salt) external returns (address);
}
```
...which was generated by the following JSON ABI:
```json
[
{
"type": "function",
"name": "calculateAuthorityAddress",
"inputs": [
{
"name": "authorityOwner",
"type": "address",
"internalType": "address"
},
{
"name": "epochLength",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "salt",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "newAuthority",
"inputs": [
{
"name": "authorityOwner",
"type": "address",
"internalType": "address"
},
{
"name": "epochLength",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IAuthority"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "newAuthority",
"inputs": [
{
"name": "authorityOwner",
"type": "address",
"internalType": "address"
},
{
"name": "epochLength",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "salt",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IAuthority"
}
],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "AuthorityCreated",
"inputs": [
{
"name": "authority",
"type": "address",
"indexed": false,
"internalType": "contract IAuthority"
}
],
"anonymous": false
}
]
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod AuthorityFactory {
use super::*;
use alloy::sol_types as alloy_sol_types;
/// The creation / init bytecode of the contract.
///
/// ```text
///0x60808060405234601557610916908161001a8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c9081631442f7bb146101a55750806393d7217c146100fa5763ec9926681461003d575f80fd5b346100f65761004b36610274565b9160405191610620908184019284841067ffffffffffffffff8511176100e2578493610091936102c186396001600160a01b039091168152602081019190915260400190565b03905ff580156100d75760209060018060a01b03167fdca1fad70bee4ba7a4e17a1c6e99e657d2251af7a279124758bc01588abe2d2f82604051838152a1604051908152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b346100f65760403660031901126100f6576004356001600160a01b03811681036100f6576040519061062080830183811067ffffffffffffffff8211176100e257839261015f926102c185396001600160a01b03168152602435602082015260400190565b03905ff080156100d75760209060018060a01b03167fdca1fad70bee4ba7a4e17a1c6e99e657d2251af7a279124758bc01588abe2d2f82604051838152a1604051908152f35b346100f657600b602080926102066102456101bf36610274565b959091610214610620936101d58486018961029e565b848852838801946102c18639604051968791858301948560209093929193604081019460018060a01b031681520152565b03601f19810187528661029e565b60405194859383850197518091895e840190838201905f8252519283915e01015f815203601f19810183528261029e565b51902090604051916040830152838201523081520160ff8153605590206040516001600160a01b039091168152f35b60609060031901126100f6576004356001600160a01b03811681036100f657906024359060443590565b90601f8019910116810190811067ffffffffffffffff8211176100e25760405256fe60a03461011f57601f61062038819003918201601f19168301916001600160401b0383118484101761012357808492604094855283398101031261011f5780516001600160a01b038116919082900361011f576020015180156100da5760805280156100c757600380546001600160a01b03198116831790915560405191906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36104e8908161013882396080518181816101a201526102720152f35b631e4fbdf760e01b5f525f60045260245ffd5b60405162461bcd60e51b815260206004820152601d60248201527f65706f6368206c656e677468206d757374206e6f74206265207a65726f0000006044820152606490fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610402575080636470af0014610248578063715018a6146101ed5780638da5cb5b146101c5578063cfe8a73b1461018b578063d574f4d71461016e578063e5cc866414610126578063ee5e0faa146101095763f2fde38b1461007f575f80fd5b3461010557602036600319011261010557610098610467565b6100a061047d565b6001600160a01b031680156100f257600380546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b34610105575f366003190112610105576020600254604051908152f35b34610105576040366003190112610105576001600160a01b03610147610467565b165f525f60205260405f206024355f52602052602060ff60405f2054166040519015158152f35b34610105575f366003190112610105576020600154604051908152f35b34610105575f3660031901126101055760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610105575f366003190112610105576003546040516001600160a01b039091168152602090f35b34610105575f3660031901126101055761020561047d565b600380546001600160a01b031981169091555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461010557606036600319011261010557610261610467565b6024356044359161027061047d565b7f000000000000000000000000000000000000000000000000000000000000000080156103ee575f1981018181116103da57818406036103c457438310156103ad5782049060018060a01b0316805f52600460205260405f2092600160ff8460081c94161b94835f52846020528560405f205416610396577f0f2cd00a405c0d1a66050307b6722c4788db6ed57aa3589a5c38da535cc3ce63916040918483518381528260208201527ff4ff953641f10e17dd93c0bc51334cb1f711fdcb4e37992021a5973f7a958f09853392a36103496002546104a4565b600255845f525f602052825f20815f52602052825f20600160ff1982541617905582519182526020820152a26103806001546104a4565b6001555f5260205260405f209081541790555f80f35b5090637e94264560e01b5f5260045260245260445ffd5b8263d804a6a160e01b5f526004524360245260445ffd5b8263c92a0d6960e01b5f5260045260245260445ffd5b634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b34610105576020366003190112610105576004359063ffffffff60e01b821680920361010557816020921590811561043c575b5015158152f35b63485979a360e11b811491508115610456575b5083610435565b6301ffc9a760e01b1490508361044f565b600435906001600160a01b038216820361010557565b6003546001600160a01b0316330361049157565b63118cdaa760e01b5f523360045260245ffd5b5f1981146103da576001019056fea26469706673582212207b0199ad0524fd56347ce3e6aad02d69c9950e42b672be8690cee40605c0ec5564736f6c634300081e0033a26469706673582212209caab3e8439b18e0ce8a49d1f9f616c0bfa525b3b742c418e25e59771492ab5264736f6c634300081e0033
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80\x80`@R4`\x15Wa\t\x16\x90\x81a\0\x1A\x829\xF3[_\x80\xFD\xFE`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x14B\xF7\xBB\x14a\x01\xA5WP\x80c\x93\xD7!|\x14a\0\xFAWc\xEC\x99&h\x14a\0=W_\x80\xFD[4a\0\xF6Wa\0K6a\x02tV[\x91`@Q\x91a\x06 \x90\x81\x84\x01\x92\x84\x84\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x11\x17a\0\xE2W\x84\x93a\0\x91\x93a\x02\xC1\x869`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x81\x01\x91\x90\x91R`@\x01\x90V[\x03\x90_\xF5\x80\x15a\0\xD7W` \x90`\x01\x80`\xA0\x1B\x03\x16\x7F\xDC\xA1\xFA\xD7\x0B\xEEK\xA7\xA4\xE1z\x1Cn\x99\xE6W\xD2%\x1A\xF7\xA2y\x12GX\xBC\x01X\x8A\xBE-/\x82`@Q\x83\x81R\xA1`@Q\x90\x81R\xF3[`@Q=_\x82>=\x90\xFD[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[_\x80\xFD[4a\0\xF6W`@6`\x03\x19\x01\x12a\0\xF6W`\x045`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x03a\0\xF6W`@Q\x90a\x06 \x80\x83\x01\x83\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\0\xE2W\x83\x92a\x01_\x92a\x02\xC1\x859`\x01`\x01`\xA0\x1B\x03\x16\x81R`$5` \x82\x01R`@\x01\x90V[\x03\x90_\xF0\x80\x15a\0\xD7W` \x90`\x01\x80`\xA0\x1B\x03\x16\x7F\xDC\xA1\xFA\xD7\x0B\xEEK\xA7\xA4\xE1z\x1Cn\x99\xE6W\xD2%\x1A\xF7\xA2y\x12GX\xBC\x01X\x8A\xBE-/\x82`@Q\x83\x81R\xA1`@Q\x90\x81R\xF3[4a\0\xF6W`\x0B` \x80\x92a\x02\x06a\x02Ea\x01\xBF6a\x02tV[\x95\x90\x91a\x02\x14a\x06 \x93a\x01\xD5\x84\x86\x01\x89a\x02\x9EV[\x84\x88R\x83\x88\x01\x94a\x02\xC1\x869`@Q\x96\x87\x91\x85\x83\x01\x94\x85` \x90\x93\x92\x91\x93`@\x81\x01\x94`\x01\x80`\xA0\x1B\x03\x16\x81R\x01RV[\x03`\x1F\x19\x81\x01\x87R\x86a\x02\x9EV[`@Q\x94\x85\x93\x83\x85\x01\x97Q\x80\x91\x89^\x84\x01\x90\x83\x82\x01\x90_\x82RQ\x92\x83\x91^\x01\x01_\x81R\x03`\x1F\x19\x81\x01\x83R\x82a\x02\x9EV[Q\x90 \x90`@Q\x91`@\x83\x01R\x83\x82\x01R0\x81R\x01`\xFF\x81S`U\x90 `@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R\xF3[``\x90`\x03\x19\x01\x12a\0\xF6W`\x045`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x03a\0\xF6W\x90`$5\x90`D5\x90V[\x90`\x1F\x80\x19\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\0\xE2W`@RV\xFE`\xA04a\x01\x1FW`\x1Fa\x06 8\x81\x90\x03\x91\x82\x01`\x1F\x19\x16\x83\x01\x91`\x01`\x01`@\x1B\x03\x83\x11\x84\x84\x10\x17a\x01#W\x80\x84\x92`@\x94\x85R\x839\x81\x01\x03\x12a\x01\x1FW\x80Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x91\x90\x82\x90\x03a\x01\x1FW` \x01Q\x80\x15a\0\xDAW`\x80R\x80\x15a\0\xC7W`\x03\x80T`\x01`\x01`\xA0\x1B\x03\x19\x81\x16\x83\x17\x90\x91U`@Q\x91\x90`\x01`\x01`\xA0\x1B\x03\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0_\x80\xA3a\x04\xE8\x90\x81a\x018\x829`\x80Q\x81\x81\x81a\x01\xA2\x01Ra\x02r\x01R\xF3[c\x1EO\xBD\xF7`\xE0\x1B_R_`\x04R`$_\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1D`$\x82\x01R\x7Fepoch length must not be zero\0\0\0`D\x82\x01R`d\x90\xFD[_\x80\xFD[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD\xFE`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x01\xFF\xC9\xA7\x14a\x04\x02WP\x80cdp\xAF\0\x14a\x02HW\x80cqP\x18\xA6\x14a\x01\xEDW\x80c\x8D\xA5\xCB[\x14a\x01\xC5W\x80c\xCF\xE8\xA7;\x14a\x01\x8BW\x80c\xD5t\xF4\xD7\x14a\x01nW\x80c\xE5\xCC\x86d\x14a\x01&W\x80c\xEE^\x0F\xAA\x14a\x01\tWc\xF2\xFD\xE3\x8B\x14a\0\x7FW_\x80\xFD[4a\x01\x05W` 6`\x03\x19\x01\x12a\x01\x05Wa\0\x98a\x04gV[a\0\xA0a\x04}V[`\x01`\x01`\xA0\x1B\x03\x16\x80\x15a\0\xF2W`\x03\x80T`\x01`\x01`\xA0\x1B\x03\x19\x81\x16\x83\x17\x90\x91U`\x01`\x01`\xA0\x1B\x03\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0_\x80\xA3\0[c\x1EO\xBD\xF7`\xE0\x1B_R_`\x04R`$_\xFD[_\x80\xFD[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W` `\x02T`@Q\x90\x81R\xF3[4a\x01\x05W`@6`\x03\x19\x01\x12a\x01\x05W`\x01`\x01`\xA0\x1B\x03a\x01Ga\x04gV[\x16_R_` R`@_ `$5_R` R` `\xFF`@_ T\x16`@Q\x90\x15\x15\x81R\xF3[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W` `\x01T`@Q\x90\x81R\xF3[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W` `@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[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W`\x03T`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x90\xF3[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05Wa\x02\x05a\x04}V[`\x03\x80T`\x01`\x01`\xA0\x1B\x03\x19\x81\x16\x90\x91U_\x90`\x01`\x01`\xA0\x1B\x03\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x82\x80\xA3\0[4a\x01\x05W``6`\x03\x19\x01\x12a\x01\x05Wa\x02aa\x04gV[`$5`D5\x91a\x02pa\x04}V[\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\x80\x15a\x03\xEEW_\x19\x81\x01\x81\x81\x11a\x03\xDAW\x81\x84\x06\x03a\x03\xC4WC\x83\x10\x15a\x03\xADW\x82\x04\x90`\x01\x80`\xA0\x1B\x03\x16\x80_R`\x04` R`@_ \x92`\x01`\xFF\x84`\x08\x1C\x94\x16\x1B\x94\x83_R\x84` R\x85`@_ T\x16a\x03\x96W\x7F\x0F,\xD0\n@\\\r\x1Af\x05\x03\x07\xB6r,G\x88\xDBn\xD5z\xA3X\x9A\\8\xDAS\\\xC3\xCEc\x91`@\x91\x84\x83Q\x83\x81R\x82` \x82\x01R\x7F\xF4\xFF\x956A\xF1\x0E\x17\xDD\x93\xC0\xBCQ3L\xB1\xF7\x11\xFD\xCBN7\x99 !\xA5\x97?z\x95\x8F\t\x853\x92\xA3a\x03I`\x02Ta\x04\xA4V[`\x02U\x84_R_` R\x82_ \x81_R` R\x82_ `\x01`\xFF\x19\x82T\x16\x17\x90U\x82Q\x91\x82R` \x82\x01R\xA2a\x03\x80`\x01Ta\x04\xA4V[`\x01U_R` R`@_ \x90\x81T\x17\x90U_\x80\xF3[P\x90c~\x94&E`\xE0\x1B_R`\x04R`$R`D_\xFD[\x82c\xD8\x04\xA6\xA1`\xE0\x1B_R`\x04RC`$R`D_\xFD[\x82c\xC9*\ri`\xE0\x1B_R`\x04R`$R`D_\xFD[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[cNH{q`\xE0\x1B_R`\x12`\x04R`$_\xFD[4a\x01\x05W` 6`\x03\x19\x01\x12a\x01\x05W`\x045\x90c\xFF\xFF\xFF\xFF`\xE0\x1B\x82\x16\x80\x92\x03a\x01\x05W\x81` \x92\x15\x90\x81\x15a\x04<W[P\x15\x15\x81R\xF3[cHYy\xA3`\xE1\x1B\x81\x14\x91P\x81\x15a\x04VW[P\x83a\x045V[c\x01\xFF\xC9\xA7`\xE0\x1B\x14\x90P\x83a\x04OV[`\x045\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\x01\x05WV[`\x03T`\x01`\x01`\xA0\x1B\x03\x163\x03a\x04\x91WV[c\x11\x8C\xDA\xA7`\xE0\x1B_R3`\x04R`$_\xFD[_\x19\x81\x14a\x03\xDAW`\x01\x01\x90V\xFE\xA2dipfsX\"\x12 {\x01\x99\xAD\x05$\xFDV4|\xE3\xE6\xAA\xD0-i\xC9\x95\x0EB\xB6r\xBE\x86\x90\xCE\xE4\x06\x05\xC0\xECUdsolcC\0\x08\x1E\x003\xA2dipfsX\"\x12 \x9C\xAA\xB3\xE8C\x9B\x18\xE0\xCE\x8AI\xD1\xF9\xF6\x16\xC0\xBF\xA5%\xB3\xB7B\xC4\x18\xE2^Yw\x14\x92\xABRdsolcC\0\x08\x1E\x003",
);
/// The runtime bytecode of the contract, as deployed on the network.
///
/// ```text
///0x6080806040526004361015610012575f80fd5b5f3560e01c9081631442f7bb146101a55750806393d7217c146100fa5763ec9926681461003d575f80fd5b346100f65761004b36610274565b9160405191610620908184019284841067ffffffffffffffff8511176100e2578493610091936102c186396001600160a01b039091168152602081019190915260400190565b03905ff580156100d75760209060018060a01b03167fdca1fad70bee4ba7a4e17a1c6e99e657d2251af7a279124758bc01588abe2d2f82604051838152a1604051908152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b346100f65760403660031901126100f6576004356001600160a01b03811681036100f6576040519061062080830183811067ffffffffffffffff8211176100e257839261015f926102c185396001600160a01b03168152602435602082015260400190565b03905ff080156100d75760209060018060a01b03167fdca1fad70bee4ba7a4e17a1c6e99e657d2251af7a279124758bc01588abe2d2f82604051838152a1604051908152f35b346100f657600b602080926102066102456101bf36610274565b959091610214610620936101d58486018961029e565b848852838801946102c18639604051968791858301948560209093929193604081019460018060a01b031681520152565b03601f19810187528661029e565b60405194859383850197518091895e840190838201905f8252519283915e01015f815203601f19810183528261029e565b51902090604051916040830152838201523081520160ff8153605590206040516001600160a01b039091168152f35b60609060031901126100f6576004356001600160a01b03811681036100f657906024359060443590565b90601f8019910116810190811067ffffffffffffffff8211176100e25760405256fe60a03461011f57601f61062038819003918201601f19168301916001600160401b0383118484101761012357808492604094855283398101031261011f5780516001600160a01b038116919082900361011f576020015180156100da5760805280156100c757600380546001600160a01b03198116831790915560405191906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36104e8908161013882396080518181816101a201526102720152f35b631e4fbdf760e01b5f525f60045260245ffd5b60405162461bcd60e51b815260206004820152601d60248201527f65706f6368206c656e677468206d757374206e6f74206265207a65726f0000006044820152606490fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610402575080636470af0014610248578063715018a6146101ed5780638da5cb5b146101c5578063cfe8a73b1461018b578063d574f4d71461016e578063e5cc866414610126578063ee5e0faa146101095763f2fde38b1461007f575f80fd5b3461010557602036600319011261010557610098610467565b6100a061047d565b6001600160a01b031680156100f257600380546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b34610105575f366003190112610105576020600254604051908152f35b34610105576040366003190112610105576001600160a01b03610147610467565b165f525f60205260405f206024355f52602052602060ff60405f2054166040519015158152f35b34610105575f366003190112610105576020600154604051908152f35b34610105575f3660031901126101055760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610105575f366003190112610105576003546040516001600160a01b039091168152602090f35b34610105575f3660031901126101055761020561047d565b600380546001600160a01b031981169091555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461010557606036600319011261010557610261610467565b6024356044359161027061047d565b7f000000000000000000000000000000000000000000000000000000000000000080156103ee575f1981018181116103da57818406036103c457438310156103ad5782049060018060a01b0316805f52600460205260405f2092600160ff8460081c94161b94835f52846020528560405f205416610396577f0f2cd00a405c0d1a66050307b6722c4788db6ed57aa3589a5c38da535cc3ce63916040918483518381528260208201527ff4ff953641f10e17dd93c0bc51334cb1f711fdcb4e37992021a5973f7a958f09853392a36103496002546104a4565b600255845f525f602052825f20815f52602052825f20600160ff1982541617905582519182526020820152a26103806001546104a4565b6001555f5260205260405f209081541790555f80f35b5090637e94264560e01b5f5260045260245260445ffd5b8263d804a6a160e01b5f526004524360245260445ffd5b8263c92a0d6960e01b5f5260045260245260445ffd5b634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52601260045260245ffd5b34610105576020366003190112610105576004359063ffffffff60e01b821680920361010557816020921590811561043c575b5015158152f35b63485979a360e11b811491508115610456575b5083610435565b6301ffc9a760e01b1490508361044f565b600435906001600160a01b038216820361010557565b6003546001600160a01b0316330361049157565b63118cdaa760e01b5f523360045260245ffd5b5f1981146103da576001019056fea26469706673582212207b0199ad0524fd56347ce3e6aad02d69c9950e42b672be8690cee40605c0ec5564736f6c634300081e0033a26469706673582212209caab3e8439b18e0ce8a49d1f9f616c0bfa525b3b742c418e25e59771492ab5264736f6c634300081e0033
/// ```
#[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\x14B\xF7\xBB\x14a\x01\xA5WP\x80c\x93\xD7!|\x14a\0\xFAWc\xEC\x99&h\x14a\0=W_\x80\xFD[4a\0\xF6Wa\0K6a\x02tV[\x91`@Q\x91a\x06 \x90\x81\x84\x01\x92\x84\x84\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x11\x17a\0\xE2W\x84\x93a\0\x91\x93a\x02\xC1\x869`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x81\x01\x91\x90\x91R`@\x01\x90V[\x03\x90_\xF5\x80\x15a\0\xD7W` \x90`\x01\x80`\xA0\x1B\x03\x16\x7F\xDC\xA1\xFA\xD7\x0B\xEEK\xA7\xA4\xE1z\x1Cn\x99\xE6W\xD2%\x1A\xF7\xA2y\x12GX\xBC\x01X\x8A\xBE-/\x82`@Q\x83\x81R\xA1`@Q\x90\x81R\xF3[`@Q=_\x82>=\x90\xFD[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[_\x80\xFD[4a\0\xF6W`@6`\x03\x19\x01\x12a\0\xF6W`\x045`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x03a\0\xF6W`@Q\x90a\x06 \x80\x83\x01\x83\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\0\xE2W\x83\x92a\x01_\x92a\x02\xC1\x859`\x01`\x01`\xA0\x1B\x03\x16\x81R`$5` \x82\x01R`@\x01\x90V[\x03\x90_\xF0\x80\x15a\0\xD7W` \x90`\x01\x80`\xA0\x1B\x03\x16\x7F\xDC\xA1\xFA\xD7\x0B\xEEK\xA7\xA4\xE1z\x1Cn\x99\xE6W\xD2%\x1A\xF7\xA2y\x12GX\xBC\x01X\x8A\xBE-/\x82`@Q\x83\x81R\xA1`@Q\x90\x81R\xF3[4a\0\xF6W`\x0B` \x80\x92a\x02\x06a\x02Ea\x01\xBF6a\x02tV[\x95\x90\x91a\x02\x14a\x06 \x93a\x01\xD5\x84\x86\x01\x89a\x02\x9EV[\x84\x88R\x83\x88\x01\x94a\x02\xC1\x869`@Q\x96\x87\x91\x85\x83\x01\x94\x85` \x90\x93\x92\x91\x93`@\x81\x01\x94`\x01\x80`\xA0\x1B\x03\x16\x81R\x01RV[\x03`\x1F\x19\x81\x01\x87R\x86a\x02\x9EV[`@Q\x94\x85\x93\x83\x85\x01\x97Q\x80\x91\x89^\x84\x01\x90\x83\x82\x01\x90_\x82RQ\x92\x83\x91^\x01\x01_\x81R\x03`\x1F\x19\x81\x01\x83R\x82a\x02\x9EV[Q\x90 \x90`@Q\x91`@\x83\x01R\x83\x82\x01R0\x81R\x01`\xFF\x81S`U\x90 `@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R\xF3[``\x90`\x03\x19\x01\x12a\0\xF6W`\x045`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x03a\0\xF6W\x90`$5\x90`D5\x90V[\x90`\x1F\x80\x19\x91\x01\x16\x81\x01\x90\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17a\0\xE2W`@RV\xFE`\xA04a\x01\x1FW`\x1Fa\x06 8\x81\x90\x03\x91\x82\x01`\x1F\x19\x16\x83\x01\x91`\x01`\x01`@\x1B\x03\x83\x11\x84\x84\x10\x17a\x01#W\x80\x84\x92`@\x94\x85R\x839\x81\x01\x03\x12a\x01\x1FW\x80Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x91\x90\x82\x90\x03a\x01\x1FW` \x01Q\x80\x15a\0\xDAW`\x80R\x80\x15a\0\xC7W`\x03\x80T`\x01`\x01`\xA0\x1B\x03\x19\x81\x16\x83\x17\x90\x91U`@Q\x91\x90`\x01`\x01`\xA0\x1B\x03\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0_\x80\xA3a\x04\xE8\x90\x81a\x018\x829`\x80Q\x81\x81\x81a\x01\xA2\x01Ra\x02r\x01R\xF3[c\x1EO\xBD\xF7`\xE0\x1B_R_`\x04R`$_\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1D`$\x82\x01R\x7Fepoch length must not be zero\0\0\0`D\x82\x01R`d\x90\xFD[_\x80\xFD[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD\xFE`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x01\xFF\xC9\xA7\x14a\x04\x02WP\x80cdp\xAF\0\x14a\x02HW\x80cqP\x18\xA6\x14a\x01\xEDW\x80c\x8D\xA5\xCB[\x14a\x01\xC5W\x80c\xCF\xE8\xA7;\x14a\x01\x8BW\x80c\xD5t\xF4\xD7\x14a\x01nW\x80c\xE5\xCC\x86d\x14a\x01&W\x80c\xEE^\x0F\xAA\x14a\x01\tWc\xF2\xFD\xE3\x8B\x14a\0\x7FW_\x80\xFD[4a\x01\x05W` 6`\x03\x19\x01\x12a\x01\x05Wa\0\x98a\x04gV[a\0\xA0a\x04}V[`\x01`\x01`\xA0\x1B\x03\x16\x80\x15a\0\xF2W`\x03\x80T`\x01`\x01`\xA0\x1B\x03\x19\x81\x16\x83\x17\x90\x91U`\x01`\x01`\xA0\x1B\x03\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0_\x80\xA3\0[c\x1EO\xBD\xF7`\xE0\x1B_R_`\x04R`$_\xFD[_\x80\xFD[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W` `\x02T`@Q\x90\x81R\xF3[4a\x01\x05W`@6`\x03\x19\x01\x12a\x01\x05W`\x01`\x01`\xA0\x1B\x03a\x01Ga\x04gV[\x16_R_` R`@_ `$5_R` R` `\xFF`@_ T\x16`@Q\x90\x15\x15\x81R\xF3[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W` `\x01T`@Q\x90\x81R\xF3[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W` `@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[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05W`\x03T`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x90\xF3[4a\x01\x05W_6`\x03\x19\x01\x12a\x01\x05Wa\x02\x05a\x04}V[`\x03\x80T`\x01`\x01`\xA0\x1B\x03\x19\x81\x16\x90\x91U_\x90`\x01`\x01`\xA0\x1B\x03\x16\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x82\x80\xA3\0[4a\x01\x05W``6`\x03\x19\x01\x12a\x01\x05Wa\x02aa\x04gV[`$5`D5\x91a\x02pa\x04}V[\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\x80\x15a\x03\xEEW_\x19\x81\x01\x81\x81\x11a\x03\xDAW\x81\x84\x06\x03a\x03\xC4WC\x83\x10\x15a\x03\xADW\x82\x04\x90`\x01\x80`\xA0\x1B\x03\x16\x80_R`\x04` R`@_ \x92`\x01`\xFF\x84`\x08\x1C\x94\x16\x1B\x94\x83_R\x84` R\x85`@_ T\x16a\x03\x96W\x7F\x0F,\xD0\n@\\\r\x1Af\x05\x03\x07\xB6r,G\x88\xDBn\xD5z\xA3X\x9A\\8\xDAS\\\xC3\xCEc\x91`@\x91\x84\x83Q\x83\x81R\x82` \x82\x01R\x7F\xF4\xFF\x956A\xF1\x0E\x17\xDD\x93\xC0\xBCQ3L\xB1\xF7\x11\xFD\xCBN7\x99 !\xA5\x97?z\x95\x8F\t\x853\x92\xA3a\x03I`\x02Ta\x04\xA4V[`\x02U\x84_R_` R\x82_ \x81_R` R\x82_ `\x01`\xFF\x19\x82T\x16\x17\x90U\x82Q\x91\x82R` \x82\x01R\xA2a\x03\x80`\x01Ta\x04\xA4V[`\x01U_R` R`@_ \x90\x81T\x17\x90U_\x80\xF3[P\x90c~\x94&E`\xE0\x1B_R`\x04R`$R`D_\xFD[\x82c\xD8\x04\xA6\xA1`\xE0\x1B_R`\x04RC`$R`D_\xFD[\x82c\xC9*\ri`\xE0\x1B_R`\x04R`$R`D_\xFD[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[cNH{q`\xE0\x1B_R`\x12`\x04R`$_\xFD[4a\x01\x05W` 6`\x03\x19\x01\x12a\x01\x05W`\x045\x90c\xFF\xFF\xFF\xFF`\xE0\x1B\x82\x16\x80\x92\x03a\x01\x05W\x81` \x92\x15\x90\x81\x15a\x04<W[P\x15\x15\x81R\xF3[cHYy\xA3`\xE1\x1B\x81\x14\x91P\x81\x15a\x04VW[P\x83a\x045V[c\x01\xFF\xC9\xA7`\xE0\x1B\x14\x90P\x83a\x04OV[`\x045\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\x01\x05WV[`\x03T`\x01`\x01`\xA0\x1B\x03\x163\x03a\x04\x91WV[c\x11\x8C\xDA\xA7`\xE0\x1B_R3`\x04R`$_\xFD[_\x19\x81\x14a\x03\xDAW`\x01\x01\x90V\xFE\xA2dipfsX\"\x12 {\x01\x99\xAD\x05$\xFDV4|\xE3\xE6\xAA\xD0-i\xC9\x95\x0EB\xB6r\xBE\x86\x90\xCE\xE4\x06\x05\xC0\xECUdsolcC\0\x08\x1E\x003\xA2dipfsX\"\x12 \x9C\xAA\xB3\xE8C\x9B\x18\xE0\xCE\x8AI\xD1\xF9\xF6\x16\xC0\xBF\xA5%\xB3\xB7B\xC4\x18\xE2^Yw\x14\x92\xABRdsolcC\0\x08\x1E\x003",
);
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Event with signature `AuthorityCreated(address)` and selector `0xdca1fad70bee4ba7a4e17a1c6e99e657d2251af7a279124758bc01588abe2d2f`.
```solidity
event AuthorityCreated(address authority);
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct AuthorityCreated {
#[allow(missing_docs)]
pub authority: 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;
#[automatically_derived]
impl alloy_sol_types::SolEvent for AuthorityCreated {
type DataTuple<'a> = (alloy::sol_types::sol_data::Address,);
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,);
const SIGNATURE: &'static str = "AuthorityCreated(address)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
220u8, 161u8, 250u8, 215u8, 11u8, 238u8, 75u8, 167u8, 164u8, 225u8,
122u8, 28u8, 110u8, 153u8, 230u8, 87u8, 210u8, 37u8, 26u8, 247u8, 162u8,
121u8, 18u8, 71u8, 88u8, 188u8, 1u8, 88u8, 138u8, 190u8, 45u8, 47u8,
]);
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 { authority: 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::Address as alloy_sol_types::SolType>::tokenize(
&self.authority,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(),)
}
#[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,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for AuthorityCreated {
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<&AuthorityCreated> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &AuthorityCreated) -> 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 `calculateAuthorityAddress(address,uint256,bytes32)` and selector `0x1442f7bb`.
```solidity
function calculateAuthorityAddress(address authorityOwner, uint256 epochLength, bytes32 salt) external view returns (address);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct calculateAuthorityAddressCall {
#[allow(missing_docs)]
pub authorityOwner: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub epochLength: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub salt: alloy::sol_types::private::FixedBytes<32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`calculateAuthorityAddress(address,uint256,bytes32)`](calculateAuthorityAddressCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct calculateAuthorityAddressReturn {
#[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> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::FixedBytes<32>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
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<calculateAuthorityAddressCall>
for UnderlyingRustTuple<'_> {
fn from(value: calculateAuthorityAddressCall) -> Self {
(value.authorityOwner, value.epochLength, value.salt)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for calculateAuthorityAddressCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
authorityOwner: tuple.0,
epochLength: tuple.1,
salt: tuple.2,
}
}
}
}
{
#[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<calculateAuthorityAddressReturn>
for UnderlyingRustTuple<'_> {
fn from(value: calculateAuthorityAddressReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for calculateAuthorityAddressReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for calculateAuthorityAddressCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::FixedBytes<32>,
);
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 = "calculateAuthorityAddress(address,uint256,bytes32)";
const SELECTOR: [u8; 4] = [20u8, 66u8, 247u8, 187u8];
#[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.authorityOwner,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.epochLength),
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(&self.salt),
)
}
#[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: calculateAuthorityAddressReturn = 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: calculateAuthorityAddressReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `newAuthority(address,uint256)` and selector `0x93d7217c`.
```solidity
function newAuthority(address authorityOwner, uint256 epochLength) external returns (address);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct newAuthority_0Call {
#[allow(missing_docs)]
pub authorityOwner: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub epochLength: 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 [`newAuthority(address,uint256)`](newAuthority_0Call) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct newAuthority_0Return {
#[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> = (
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<newAuthority_0Call> for UnderlyingRustTuple<'_> {
fn from(value: newAuthority_0Call) -> Self {
(value.authorityOwner, value.epochLength)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for newAuthority_0Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
authorityOwner: tuple.0,
epochLength: tuple.1,
}
}
}
}
{
#[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<newAuthority_0Return>
for UnderlyingRustTuple<'_> {
fn from(value: newAuthority_0Return) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for newAuthority_0Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for newAuthority_0Call {
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::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 = "newAuthority(address,uint256)";
const SELECTOR: [u8; 4] = [147u8, 215u8, 33u8, 124u8];
#[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.authorityOwner,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.epochLength),
)
}
#[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: newAuthority_0Return = 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: newAuthority_0Return = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `newAuthority(address,uint256,bytes32)` and selector `0xec992668`.
```solidity
function newAuthority(address authorityOwner, uint256 epochLength, bytes32 salt) external returns (address);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct newAuthority_1Call {
#[allow(missing_docs)]
pub authorityOwner: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub epochLength: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub salt: alloy::sol_types::private::FixedBytes<32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`newAuthority(address,uint256,bytes32)`](newAuthority_1Call) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct newAuthority_1Return {
#[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> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::FixedBytes<32>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
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<newAuthority_1Call> for UnderlyingRustTuple<'_> {
fn from(value: newAuthority_1Call) -> Self {
(value.authorityOwner, value.epochLength, value.salt)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for newAuthority_1Call {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
authorityOwner: tuple.0,
epochLength: tuple.1,
salt: tuple.2,
}
}
}
}
{
#[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<newAuthority_1Return>
for UnderlyingRustTuple<'_> {
fn from(value: newAuthority_1Return) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for newAuthority_1Return {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for newAuthority_1Call {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::FixedBytes<32>,
);
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 = "newAuthority(address,uint256,bytes32)";
const SELECTOR: [u8; 4] = [236u8, 153u8, 38u8, 104u8];
#[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.authorityOwner,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.epochLength),
<alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(&self.salt),
)
}
#[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: newAuthority_1Return = 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: newAuthority_1Return = r.into();
r._0
})
}
}
};
///Container for all the [`AuthorityFactory`](self) function calls.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum AuthorityFactoryCalls {
#[allow(missing_docs)]
calculateAuthorityAddress(calculateAuthorityAddressCall),
#[allow(missing_docs)]
newAuthority_0(newAuthority_0Call),
#[allow(missing_docs)]
newAuthority_1(newAuthority_1Call),
}
impl AuthorityFactoryCalls {
/// 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]] = &[
[20u8, 66u8, 247u8, 187u8],
[147u8, 215u8, 33u8, 124u8],
[236u8, 153u8, 38u8, 104u8],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(calculateAuthorityAddress),
::core::stringify!(newAuthority_0),
::core::stringify!(newAuthority_1),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<calculateAuthorityAddressCall as alloy_sol_types::SolCall>::SIGNATURE,
<newAuthority_0Call as alloy_sol_types::SolCall>::SIGNATURE,
<newAuthority_1Call 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 AuthorityFactoryCalls {
const NAME: &'static str = "AuthorityFactoryCalls";
const MIN_DATA_LENGTH: usize = 64usize;
const COUNT: usize = 3usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::calculateAuthorityAddress(_) => {
<calculateAuthorityAddressCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::newAuthority_0(_) => {
<newAuthority_0Call as alloy_sol_types::SolCall>::SELECTOR
}
Self::newAuthority_1(_) => {
<newAuthority_1Call 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<AuthorityFactoryCalls>] = &[
{
fn calculateAuthorityAddress(
data: &[u8],
) -> alloy_sol_types::Result<AuthorityFactoryCalls> {
<calculateAuthorityAddressCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(AuthorityFactoryCalls::calculateAuthorityAddress)
}
calculateAuthorityAddress
},
{
fn newAuthority_0(
data: &[u8],
) -> alloy_sol_types::Result<AuthorityFactoryCalls> {
<newAuthority_0Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(AuthorityFactoryCalls::newAuthority_0)
}
newAuthority_0
},
{
fn newAuthority_1(
data: &[u8],
) -> alloy_sol_types::Result<AuthorityFactoryCalls> {
<newAuthority_1Call as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(AuthorityFactoryCalls::newAuthority_1)
}
newAuthority_1
},
];
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<AuthorityFactoryCalls>] = &[
{
fn calculateAuthorityAddress(
data: &[u8],
) -> alloy_sol_types::Result<AuthorityFactoryCalls> {
<calculateAuthorityAddressCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(AuthorityFactoryCalls::calculateAuthorityAddress)
}
calculateAuthorityAddress
},
{
fn newAuthority_0(
data: &[u8],
) -> alloy_sol_types::Result<AuthorityFactoryCalls> {
<newAuthority_0Call as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(AuthorityFactoryCalls::newAuthority_0)
}
newAuthority_0
},
{
fn newAuthority_1(
data: &[u8],
) -> alloy_sol_types::Result<AuthorityFactoryCalls> {
<newAuthority_1Call as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(AuthorityFactoryCalls::newAuthority_1)
}
newAuthority_1
},
];
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::calculateAuthorityAddress(inner) => {
<calculateAuthorityAddressCall as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::newAuthority_0(inner) => {
<newAuthority_0Call as alloy_sol_types::SolCall>::abi_encoded_size(
inner,
)
}
Self::newAuthority_1(inner) => {
<newAuthority_1Call 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::calculateAuthorityAddress(inner) => {
<calculateAuthorityAddressCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::newAuthority_0(inner) => {
<newAuthority_0Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::newAuthority_1(inner) => {
<newAuthority_1Call as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
}
}
}
///Container for all the [`AuthorityFactory`](self) events.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum AuthorityFactoryEvents {
#[allow(missing_docs)]
AuthorityCreated(AuthorityCreated),
}
impl AuthorityFactoryEvents {
/// 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]] = &[
[
220u8, 161u8, 250u8, 215u8, 11u8, 238u8, 75u8, 167u8, 164u8, 225u8,
122u8, 28u8, 110u8, 153u8, 230u8, 87u8, 210u8, 37u8, 26u8, 247u8, 162u8,
121u8, 18u8, 71u8, 88u8, 188u8, 1u8, 88u8, 138u8, 190u8, 45u8, 47u8,
],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(AuthorityCreated),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<AuthorityCreated 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 AuthorityFactoryEvents {
const NAME: &'static str = "AuthorityFactoryEvents";
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(<AuthorityCreated as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<AuthorityCreated as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::AuthorityCreated)
}
_ => {
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 AuthorityFactoryEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::AuthorityCreated(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::AuthorityCreated(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
/**Creates a new wrapper around an on-chain [`AuthorityFactory`](self) contract instance.
See the [wrapper's documentation](`AuthorityFactoryInstance`) 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,
) -> AuthorityFactoryInstance<P, N> {
AuthorityFactoryInstance::<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<AuthorityFactoryInstance<P, N>>,
> {
AuthorityFactoryInstance::<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> {
AuthorityFactoryInstance::<P, N>::deploy_builder(__provider)
}
/**A [`AuthorityFactory`](self) instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`AuthorityFactory`](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 AuthorityFactoryInstance<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 AuthorityFactoryInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("AuthorityFactoryInstance").field(&self.address).finish()
}
}
/// Instantiation and getters/setters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> AuthorityFactoryInstance<P, N> {
/**Creates a new wrapper around an on-chain [`AuthorityFactory`](self) contract instance.
See the [wrapper's documentation](`AuthorityFactoryInstance`) 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<AuthorityFactoryInstance<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> AuthorityFactoryInstance<&P, N> {
/// Clones the provider and returns a new instance with the cloned provider.
#[inline]
pub fn with_cloned_provider(self) -> AuthorityFactoryInstance<P, N> {
AuthorityFactoryInstance {
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,
> AuthorityFactoryInstance<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 [`calculateAuthorityAddress`] function.
pub fn calculateAuthorityAddress(
&self,
authorityOwner: alloy::sol_types::private::Address,
epochLength: alloy::sol_types::private::primitives::aliases::U256,
salt: alloy::sol_types::private::FixedBytes<32>,
) -> alloy_contract::SolCallBuilder<&P, calculateAuthorityAddressCall, N> {
self.call_builder(
&calculateAuthorityAddressCall {
authorityOwner,
epochLength,
salt,
},
)
}
///Creates a new call builder for the [`newAuthority_0`] function.
pub fn newAuthority_0(
&self,
authorityOwner: alloy::sol_types::private::Address,
epochLength: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, newAuthority_0Call, N> {
self.call_builder(
&newAuthority_0Call {
authorityOwner,
epochLength,
},
)
}
///Creates a new call builder for the [`newAuthority_1`] function.
pub fn newAuthority_1(
&self,
authorityOwner: alloy::sol_types::private::Address,
epochLength: alloy::sol_types::private::primitives::aliases::U256,
salt: alloy::sol_types::private::FixedBytes<32>,
) -> alloy_contract::SolCallBuilder<&P, newAuthority_1Call, N> {
self.call_builder(
&newAuthority_1Call {
authorityOwner,
epochLength,
salt,
},
)
}
}
/// Event filters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> AuthorityFactoryInstance<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 [`AuthorityCreated`] event.
pub fn AuthorityCreated_filter(
&self,
) -> alloy_contract::Event<&P, AuthorityCreated, N> {
self.event_filter::<AuthorityCreated>()
}
}
}