/**
Generated by the following Solidity interface...
```solidity
interface RankedFeed {
error AlreadyVoted();
event PostCreated(bytes32 indexed post_id, address indexed poster, bytes post_data);
event PostVoted(bytes32 indexed post_id, address indexed voter);
function createPost(bytes memory post_data) external;
function votePost(bytes32 post_id) external;
}
```
...which was generated by the following JSON ABI:
```json
[
{
"type": "function",
"name": "createPost",
"inputs": [
{
"name": "post_data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "votePost",
"inputs": [
{
"name": "post_id",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "PostCreated",
"inputs": [
{
"name": "post_id",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "poster",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "post_data",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
}
],
"anonymous": false
},
{
"type": "event",
"name": "PostVoted",
"inputs": [
{
"name": "post_id",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "voter",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AlreadyVoted",
"inputs": []
}
]
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod RankedFeed {
use super::*;
use alloy::sol_types as alloy_sol_types;
/// The creation / init bytecode of the contract.
///
/// ```text
///0x6080604052348015600e575f5ffd5b5061074d8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063a1981bf114610038578063dfbaa2fb14610054575b5f5ffd5b610052600480360381019061004d9190610427565b610070565b005b61006e600480360381019061006991906104b3565b610133565b005b5f610087823360016102339092919063ffffffff16565b146100be576040517f7c9a1cf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100d681336001806102f9909392919063ffffffff16565b6100ec8160015f6103bf9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff16817f98b6b180756c849b5bfbbd2bbd091f3fe64b0935ac195418c0b619b9b661c78d60405160405180910390a350565b5f338383604051602001610149939291906105af565b6040516020818303038152906040528051906020012090505f610178823360016102339092919063ffffffff16565b146101af576040517f7c9a1cf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101c781336001806102f9909392919063ffffffff16565b6101dd8160015f6103bf9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff16817fed6e6fdf99cd5e97145c7e59ade93923be1979557a77e639ed95a203c7a8e8618585604051610226929190610624565b60405180910390a3505050565b5f3273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146102a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610299906106c6565b60405180910390fd5b835f015f8481526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490509392505050565b3273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035e906106c6565b60405180910390fd5b80845f015f8581526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555050505050565b80835f015f8481526020019081526020015f205f8282546103e0919061071a565b92505081905550505050565b5f5ffd5b5f5ffd5b5f819050919050565b610406816103f4565b8114610410575f5ffd5b50565b5f81359050610421816103fd565b92915050565b5f6020828403121561043c5761043b6103ec565b5b5f61044984828501610413565b91505092915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261047357610472610452565b5b8235905067ffffffffffffffff8111156104905761048f610456565b5b6020830191508360018202830111156104ac576104ab61045a565b5b9250929050565b5f5f602083850312156104c9576104c86103ec565b5b5f83013567ffffffffffffffff8111156104e6576104e56103f0565b5b6104f28582860161045e565b92509250509250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610527826104fe565b9050919050565b5f8160601b9050919050565b5f6105448261052e565b9050919050565b5f6105558261053a565b9050919050565b61056d6105688261051d565b61054b565b82525050565b5f81905092915050565b828183375f83830152505050565b5f6105968385610573565b93506105a383858461057d565b82840190509392505050565b5f6105ba828661055c565b6014820191506105cb82848661058b565b9150819050949350505050565b5f82825260208201905092915050565b5f601f19601f8301169050919050565b5f61060383856105d8565b935061061083858461057d565b610619836105e8565b840190509392505050565b5f6020820190508181035f83015261063d8184866105f8565b90509392505050565b5f82825260208201905092915050565b7f43616e6e6f7420616363657373204f776e6564436f756e746572206f776e65645f8201527f20627920616e6f74686572206164647265737300000000000000000000000000602082015250565b5f6106b0603383610646565b91506106bb82610656565b604082019050919050565b5f6020820190508181035f8301526106dd816106a4565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610724826106e4565b915061072f836106e4565b9250828201905080821115610747576107466106ed565b5b9291505056
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R4\x80\x15`\x0EW__\xFD[Pa\x07M\x80a\0\x1C_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\x004W_5`\xE0\x1C\x80c\xA1\x98\x1B\xF1\x14a\08W\x80c\xDF\xBA\xA2\xFB\x14a\0TW[__\xFD[a\0R`\x04\x806\x03\x81\x01\x90a\0M\x91\x90a\x04'V[a\0pV[\0[a\0n`\x04\x806\x03\x81\x01\x90a\0i\x91\x90a\x04\xB3V[a\x013V[\0[_a\0\x87\x823`\x01a\x023\x90\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[\x14a\0\xBEW`@Q\x7F|\x9A\x1C\xF9\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`\x04\x01`@Q\x80\x91\x03\x90\xFD[a\0\xD6\x813`\x01\x80a\x02\xF9\x90\x93\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[a\0\xEC\x81`\x01_a\x03\xBF\x90\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[3s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81\x7F\x98\xB6\xB1\x80ul\x84\x9B[\xFB\xBD+\xBD\t\x1F?\xE6K\t5\xAC\x19T\x18\xC0\xB6\x19\xB9\xB6a\xC7\x8D`@Q`@Q\x80\x91\x03\x90\xA3PV[_3\x83\x83`@Q` \x01a\x01I\x93\x92\x91\x90a\x05\xAFV[`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P_a\x01x\x823`\x01a\x023\x90\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[\x14a\x01\xAFW`@Q\x7F|\x9A\x1C\xF9\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`\x04\x01`@Q\x80\x91\x03\x90\xFD[a\x01\xC7\x813`\x01\x80a\x02\xF9\x90\x93\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[a\x01\xDD\x81`\x01_a\x03\xBF\x90\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[3s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81\x7F\xEDno\xDF\x99\xCD^\x97\x14\\~Y\xAD\xE99#\xBE\x19yUzw\xE69\xED\x95\xA2\x03\xC7\xA8\xE8a\x85\x85`@Qa\x02&\x92\x91\x90a\x06$V[`@Q\x80\x91\x03\x90\xA3PPPV[_2s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF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x81R` \x01\x90\x81R` \x01_ _\x82\x82Ta\x03\xE0\x91\x90a\x07\x1AV[\x92PP\x81\x90UPPPPV[__\xFD[__\xFD[_\x81\x90P\x91\x90PV[a\x04\x06\x81a\x03\xF4V[\x81\x14a\x04\x10W__\xFD[PV[_\x815\x90Pa\x04!\x81a\x03\xFDV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04<Wa\x04;a\x03\xECV[[_a\x04I\x84\x82\x85\x01a\x04\x13V[\x91PP\x92\x91PPV[__\xFD[__\xFD[__\xFD[__\x83`\x1F\x84\x01\x12a\x04sWa\x04ra\x04RV[[\x825\x90Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x04\x90Wa\x04\x8Fa\x04VV[[` \x83\x01\x91P\x83`\x01\x82\x02\x83\x01\x11\x15a\x04\xACWa\x04\xABa\x04ZV[[\x92P\x92\x90PV[__` \x83\x85\x03\x12\x15a\x04\xC9Wa\x04\xC8a\x03\xECV[[_\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x04\xE6Wa\x04\xE5a\x03\xF0V[[a\x04\xF2\x85\x82\x86\x01a\x04^V[\x92P\x92PP\x92P\x92\x90PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x05'\x82a\x04\xFEV[\x90P\x91\x90PV[_\x81``\x1B\x90P\x91\x90PV[_a\x05D\x82a\x05.V[\x90P\x91\x90PV[_a\x05U\x82a\x05:V[\x90P\x91\x90PV[a\x05ma\x05h\x82a\x05\x1DV[a\x05KV[\x82RPPV[_\x81\x90P\x92\x91PPV[\x82\x81\x837_\x83\x83\x01RPPPV[_a\x05\x96\x83\x85a\x05sV[\x93Pa\x05\xA3\x83\x85\x84a\x05}V[\x82\x84\x01\x90P\x93\x92PPPV[_a\x05\xBA\x82\x86a\x05\\V[`\x14\x82\x01\x91Pa\x05\xCB\x82\x84\x86a\x05\x8BV[\x91P\x81\x90P\x94\x93PPPPV[_\x82\x82R` \x82\x01\x90P\x92\x91PPV[_`\x1F\x19`\x1F\x83\x01\x16\x90P\x91\x90PV[_a\x06\x03\x83\x85a\x05\xD8V[\x93Pa\x06\x10\x83\x85\x84a\x05}V[a\x06\x19\x83a\x05\xE8V[\x84\x01\x90P\x93\x92PPPV[_` \x82\x01\x90P\x81\x81\x03_\x83\x01Ra\x06=\x81\x84\x86a\x05\xF8V[\x90P\x93\x92PPPV[_\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FCannot access OwnedCounter owned_\x82\x01R\x7F by another address\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01RPV[_a\x06\xB0`3\x83a\x06FV[\x91Pa\x06\xBB\x82a\x06VV[`@\x82\x01\x90P\x91\x90PV[_` \x82\x01\x90P\x81\x81\x03_\x83\x01Ra\x06\xDD\x81a\x06\xA4V[\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[\x7FNH{q\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_R`\x11`\x04R`$_\xFD[_a\x07$\x82a\x06\xE4V[\x91Pa\x07/\x83a\x06\xE4V[\x92P\x82\x82\x01\x90P\x80\x82\x11\x15a\x07GWa\x07Fa\x06\xEDV[[\x92\x91PPV",
);
/// The runtime bytecode of the contract, as deployed on the network.
///
/// ```text
///0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063a1981bf114610038578063dfbaa2fb14610054575b5f5ffd5b610052600480360381019061004d9190610427565b610070565b005b61006e600480360381019061006991906104b3565b610133565b005b5f610087823360016102339092919063ffffffff16565b146100be576040517f7c9a1cf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100d681336001806102f9909392919063ffffffff16565b6100ec8160015f6103bf9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff16817f98b6b180756c849b5bfbbd2bbd091f3fe64b0935ac195418c0b619b9b661c78d60405160405180910390a350565b5f338383604051602001610149939291906105af565b6040516020818303038152906040528051906020012090505f610178823360016102339092919063ffffffff16565b146101af576040517f7c9a1cf900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101c781336001806102f9909392919063ffffffff16565b6101dd8160015f6103bf9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff16817fed6e6fdf99cd5e97145c7e59ade93923be1979557a77e639ed95a203c7a8e8618585604051610226929190610624565b60405180910390a3505050565b5f3273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146102a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610299906106c6565b60405180910390fd5b835f015f8481526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490509392505050565b3273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035e906106c6565b60405180910390fd5b80845f015f8581526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555050505050565b80835f015f8481526020019081526020015f205f8282546103e0919061071a565b92505081905550505050565b5f5ffd5b5f5ffd5b5f819050919050565b610406816103f4565b8114610410575f5ffd5b50565b5f81359050610421816103fd565b92915050565b5f6020828403121561043c5761043b6103ec565b5b5f61044984828501610413565b91505092915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261047357610472610452565b5b8235905067ffffffffffffffff8111156104905761048f610456565b5b6020830191508360018202830111156104ac576104ab61045a565b5b9250929050565b5f5f602083850312156104c9576104c86103ec565b5b5f83013567ffffffffffffffff8111156104e6576104e56103f0565b5b6104f28582860161045e565b92509250509250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610527826104fe565b9050919050565b5f8160601b9050919050565b5f6105448261052e565b9050919050565b5f6105558261053a565b9050919050565b61056d6105688261051d565b61054b565b82525050565b5f81905092915050565b828183375f83830152505050565b5f6105968385610573565b93506105a383858461057d565b82840190509392505050565b5f6105ba828661055c565b6014820191506105cb82848661058b565b9150819050949350505050565b5f82825260208201905092915050565b5f601f19601f8301169050919050565b5f61060383856105d8565b935061061083858461057d565b610619836105e8565b840190509392505050565b5f6020820190508181035f83015261063d8184866105f8565b90509392505050565b5f82825260208201905092915050565b7f43616e6e6f7420616363657373204f776e6564436f756e746572206f776e65645f8201527f20627920616e6f74686572206164647265737300000000000000000000000000602082015250565b5f6106b0603383610646565b91506106bb82610656565b604082019050919050565b5f6020820190508181035f8301526106dd816106a4565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610724826106e4565b915061072f836106e4565b9250828201905080821115610747576107466106ed565b5b9291505056
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\x004W_5`\xE0\x1C\x80c\xA1\x98\x1B\xF1\x14a\08W\x80c\xDF\xBA\xA2\xFB\x14a\0TW[__\xFD[a\0R`\x04\x806\x03\x81\x01\x90a\0M\x91\x90a\x04'V[a\0pV[\0[a\0n`\x04\x806\x03\x81\x01\x90a\0i\x91\x90a\x04\xB3V[a\x013V[\0[_a\0\x87\x823`\x01a\x023\x90\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[\x14a\0\xBEW`@Q\x7F|\x9A\x1C\xF9\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`\x04\x01`@Q\x80\x91\x03\x90\xFD[a\0\xD6\x813`\x01\x80a\x02\xF9\x90\x93\x92\x91\x90c\xFF\xFF\xFF\xFF\x16V[a\0\xEC\x81`\x01_a\x03\xBF\x90\x92\x91\x90c\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\x90PV[a\x04\x06\x81a\x03\xF4V[\x81\x14a\x04\x10W__\xFD[PV[_\x815\x90Pa\x04!\x81a\x03\xFDV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04<Wa\x04;a\x03\xECV[[_a\x04I\x84\x82\x85\x01a\x04\x13V[\x91PP\x92\x91PPV[__\xFD[__\xFD[__\xFD[__\x83`\x1F\x84\x01\x12a\x04sWa\x04ra\x04RV[[\x825\x90Pg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x04\x90Wa\x04\x8Fa\x04VV[[` \x83\x01\x91P\x83`\x01\x82\x02\x83\x01\x11\x15a\x04\xACWa\x04\xABa\x04ZV[[\x92P\x92\x90PV[__` \x83\x85\x03\x12\x15a\x04\xC9Wa\x04\xC8a\x03\xECV[[_\x83\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x04\xE6Wa\x04\xE5a\x03\xF0V[[a\x04\xF2\x85\x82\x86\x01a\x04^V[\x92P\x92PP\x92P\x92\x90PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x05'\x82a\x04\xFEV[\x90P\x91\x90PV[_\x81``\x1B\x90P\x91\x90PV[_a\x05D\x82a\x05.V[\x90P\x91\x90PV[_a\x05U\x82a\x05:V[\x90P\x91\x90PV[a\x05ma\x05h\x82a\x05\x1DV[a\x05KV[\x82RPPV[_\x81\x90P\x92\x91PPV[\x82\x81\x837_\x83\x83\x01RPPPV[_a\x05\x96\x83\x85a\x05sV[\x93Pa\x05\xA3\x83\x85\x84a\x05}V[\x82\x84\x01\x90P\x93\x92PPPV[_a\x05\xBA\x82\x86a\x05\\V[`\x14\x82\x01\x91Pa\x05\xCB\x82\x84\x86a\x05\x8BV[\x91P\x81\x90P\x94\x93PPPPV[_\x82\x82R` \x82\x01\x90P\x92\x91PPV[_`\x1F\x19`\x1F\x83\x01\x16\x90P\x91\x90PV[_a\x06\x03\x83\x85a\x05\xD8V[\x93Pa\x06\x10\x83\x85\x84a\x05}V[a\x06\x19\x83a\x05\xE8V[\x84\x01\x90P\x93\x92PPPV[_` \x82\x01\x90P\x81\x81\x03_\x83\x01Ra\x06=\x81\x84\x86a\x05\xF8V[\x90P\x93\x92PPPV[_\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FCannot access OwnedCounter owned_\x82\x01R\x7F by another address\0\0\0\0\0\0\0\0\0\0\0\0\0` \x82\x01RPV[_a\x06\xB0`3\x83a\x06FV[\x91Pa\x06\xBB\x82a\x06VV[`@\x82\x01\x90P\x91\x90PV[_` \x82\x01\x90P\x81\x81\x03_\x83\x01Ra\x06\xDD\x81a\x06\xA4V[\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[\x7FNH{q\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_R`\x11`\x04R`$_\xFD[_a\x07$\x82a\x06\xE4V[\x91Pa\x07/\x83a\x06\xE4V[\x92P\x82\x82\x01\x90P\x80\x82\x11\x15a\x07GWa\x07Fa\x06\xEDV[[\x92\x91PPV",
);
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `AlreadyVoted()` and selector `0x7c9a1cf9`.
```solidity
error AlreadyVoted();
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct AlreadyVoted;
#[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<AlreadyVoted> for UnderlyingRustTuple<'_> {
fn from(value: AlreadyVoted) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for AlreadyVoted {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for AlreadyVoted {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "AlreadyVoted()";
const SELECTOR: [u8; 4] = [124u8, 154u8, 28u8, 249u8];
#[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 abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Event with signature `PostCreated(bytes32,address,bytes)` and selector `0xed6e6fdf99cd5e97145c7e59ade93923be1979557a77e639ed95a203c7a8e861`.
```solidity
event PostCreated(bytes32 indexed post_id, address indexed poster, bytes post_data);
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct PostCreated {
#[allow(missing_docs)]
pub post_id: alloy::sol_types::private::FixedBytes<32>,
#[allow(missing_docs)]
pub poster: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub post_data: alloy::sol_types::private::Bytes,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for PostCreated {
type DataTuple<'a> = (alloy::sol_types::sol_data::Bytes,);
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "PostCreated(bytes32,address,bytes)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
237u8, 110u8, 111u8, 223u8, 153u8, 205u8, 94u8, 151u8, 20u8, 92u8, 126u8,
89u8, 173u8, 233u8, 57u8, 35u8, 190u8, 25u8, 121u8, 85u8, 122u8, 119u8,
230u8, 57u8, 237u8, 149u8, 162u8, 3u8, 199u8, 168u8, 232u8, 97u8,
]);
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 {
post_id: topics.1,
poster: topics.2,
post_data: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(
alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
),
);
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<alloy::sol_types::sol_data::Bytes as alloy_sol_types::SolType>::tokenize(
&self.post_data,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(), self.post_id.clone(), self.poster.clone())
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(
Self::SIGNATURE_HASH,
);
out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::EventTopic>::encode_topic(&self.post_id);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.poster,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for PostCreated {
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<&PostCreated> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &PostCreated) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Event with signature `PostVoted(bytes32,address)` and selector `0x98b6b180756c849b5bfbbd2bbd091f3fe64b0935ac195418c0b619b9b661c78d`.
```solidity
event PostVoted(bytes32 indexed post_id, address indexed voter);
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct PostVoted {
#[allow(missing_docs)]
pub post_id: alloy::sol_types::private::FixedBytes<32>,
#[allow(missing_docs)]
pub voter: 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 PostVoted {
type DataTuple<'a> = ();
type DataToken<'a> = <Self::DataTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "PostVoted(bytes32,address)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([
152u8, 182u8, 177u8, 128u8, 117u8, 108u8, 132u8, 155u8, 91u8, 251u8,
189u8, 43u8, 189u8, 9u8, 31u8, 63u8, 230u8, 75u8, 9u8, 53u8, 172u8, 25u8,
84u8, 24u8, 192u8, 182u8, 25u8, 185u8, 182u8, 97u8, 199u8, 141u8,
]);
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 {
post_id: topics.1,
voter: topics.2,
}
}
#[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<'_> {
()
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(Self::SIGNATURE_HASH.into(), self.post_id.clone(), self.voter.clone())
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(
Self::SIGNATURE_HASH,
);
out[1usize] = <alloy::sol_types::sol_data::FixedBytes<
32,
> as alloy_sol_types::EventTopic>::encode_topic(&self.post_id);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.voter,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for PostVoted {
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<&PostVoted> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &PostVoted) -> 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 `createPost(bytes)` and selector `0xdfbaa2fb`.
```solidity
function createPost(bytes memory post_data) external;
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct createPostCall {
#[allow(missing_docs)]
pub post_data: alloy::sol_types::private::Bytes,
}
///Container type for the return parameters of the [`createPost(bytes)`](createPostCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct createPostReturn {}
#[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::Bytes,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (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<createPostCall> for UnderlyingRustTuple<'_> {
fn from(value: createPostCall) -> Self {
(value.post_data,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for createPostCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { post_data: tuple.0 }
}
}
}
{
#[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<createPostReturn> for UnderlyingRustTuple<'_> {
fn from(value: createPostReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for createPostReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl createPostReturn {
fn _tokenize(
&self,
) -> <createPostCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for createPostCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Bytes,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = createPostReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "createPost(bytes)";
const SELECTOR: [u8; 4] = [223u8, 186u8, 162u8, 251u8];
#[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::Bytes as alloy_sol_types::SolType>::tokenize(
&self.post_data,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
createPostReturn::_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 `votePost(bytes32)` and selector `0xa1981bf1`.
```solidity
function votePost(bytes32 post_id) external;
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct votePostCall {
#[allow(missing_docs)]
pub post_id: alloy::sol_types::private::FixedBytes<32>,
}
///Container type for the return parameters of the [`votePost(bytes32)`](votePostCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct votePostReturn {}
#[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::FixedBytes<32>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(
_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>,
) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<votePostCall> for UnderlyingRustTuple<'_> {
fn from(value: votePostCall) -> Self {
(value.post_id,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for votePostCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { post_id: tuple.0 }
}
}
}
{
#[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<votePostReturn> for UnderlyingRustTuple<'_> {
fn from(value: votePostReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for votePostReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl votePostReturn {
fn _tokenize(
&self,
) -> <votePostCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for votePostCall {
type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,);
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
type Return = votePostReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "votePost(bytes32)";
const SELECTOR: [u8; 4] = [161u8, 152u8, 27u8, 241u8];
#[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::FixedBytes<
32,
> as alloy_sol_types::SolType>::tokenize(&self.post_id),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
votePostReturn::_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)
}
}
};
///Container for all the [`RankedFeed`](self) function calls.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum RankedFeedCalls {
#[allow(missing_docs)]
createPost(createPostCall),
#[allow(missing_docs)]
votePost(votePostCall),
}
impl RankedFeedCalls {
/// 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]] = &[
[161u8, 152u8, 27u8, 241u8],
[223u8, 186u8, 162u8, 251u8],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(votePost),
::core::stringify!(createPost),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<votePostCall as alloy_sol_types::SolCall>::SIGNATURE,
<createPostCall 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 RankedFeedCalls {
const NAME: &'static str = "RankedFeedCalls";
const MIN_DATA_LENGTH: usize = 32usize;
const COUNT: usize = 2usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::createPost(_) => {
<createPostCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::votePost(_) => <votePostCall 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<RankedFeedCalls>] = &[
{
fn votePost(
data: &[u8],
) -> alloy_sol_types::Result<RankedFeedCalls> {
<votePostCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(RankedFeedCalls::votePost)
}
votePost
},
{
fn createPost(
data: &[u8],
) -> alloy_sol_types::Result<RankedFeedCalls> {
<createPostCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(RankedFeedCalls::createPost)
}
createPost
},
];
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<RankedFeedCalls>] = &[
{
fn votePost(
data: &[u8],
) -> alloy_sol_types::Result<RankedFeedCalls> {
<votePostCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(RankedFeedCalls::votePost)
}
votePost
},
{
fn createPost(
data: &[u8],
) -> alloy_sol_types::Result<RankedFeedCalls> {
<createPostCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(RankedFeedCalls::createPost)
}
createPost
},
];
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::createPost(inner) => {
<createPostCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::votePost(inner) => {
<votePostCall 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::createPost(inner) => {
<createPostCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
Self::votePost(inner) => {
<votePostCall as alloy_sol_types::SolCall>::abi_encode_raw(
inner,
out,
)
}
}
}
}
///Container for all the [`RankedFeed`](self) custom errors.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum RankedFeedErrors {
#[allow(missing_docs)]
AlreadyVoted(AlreadyVoted),
}
impl RankedFeedErrors {
/// 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]] = &[[124u8, 154u8, 28u8, 249u8]];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(AlreadyVoted),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<AlreadyVoted as alloy_sol_types::SolError>::SIGNATURE,
];
/// Returns the signature for the given selector, if known.
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
/// Returns the enum variant name for the given selector, if known.
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for RankedFeedErrors {
const NAME: &'static str = "RankedFeedErrors";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 1usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::AlreadyVoted(_) => {
<AlreadyVoted as alloy_sol_types::SolError>::SELECTOR
}
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(
&[u8],
) -> alloy_sol_types::Result<RankedFeedErrors>] = &[
{
fn AlreadyVoted(
data: &[u8],
) -> alloy_sol_types::Result<RankedFeedErrors> {
<AlreadyVoted as alloy_sol_types::SolError>::abi_decode_raw(data)
.map(RankedFeedErrors::AlreadyVoted)
}
AlreadyVoted
},
];
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<RankedFeedErrors>] = &[
{
fn AlreadyVoted(
data: &[u8],
) -> alloy_sol_types::Result<RankedFeedErrors> {
<AlreadyVoted as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(RankedFeedErrors::AlreadyVoted)
}
AlreadyVoted
},
];
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::AlreadyVoted(inner) => {
<AlreadyVoted as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::AlreadyVoted(inner) => {
<AlreadyVoted as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
}
}
}
///Container for all the [`RankedFeed`](self) events.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum RankedFeedEvents {
#[allow(missing_docs)]
PostCreated(PostCreated),
#[allow(missing_docs)]
PostVoted(PostVoted),
}
impl RankedFeedEvents {
/// 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]] = &[
[
152u8, 182u8, 177u8, 128u8, 117u8, 108u8, 132u8, 155u8, 91u8, 251u8,
189u8, 43u8, 189u8, 9u8, 31u8, 63u8, 230u8, 75u8, 9u8, 53u8, 172u8, 25u8,
84u8, 24u8, 192u8, 182u8, 25u8, 185u8, 182u8, 97u8, 199u8, 141u8,
],
[
237u8, 110u8, 111u8, 223u8, 153u8, 205u8, 94u8, 151u8, 20u8, 92u8, 126u8,
89u8, 173u8, 233u8, 57u8, 35u8, 190u8, 25u8, 121u8, 85u8, 122u8, 119u8,
230u8, 57u8, 237u8, 149u8, 162u8, 3u8, 199u8, 168u8, 232u8, 97u8,
],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(PostVoted),
::core::stringify!(PostCreated),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<PostVoted as alloy_sol_types::SolEvent>::SIGNATURE,
<PostCreated 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 RankedFeedEvents {
const NAME: &'static str = "RankedFeedEvents";
const COUNT: usize = 2usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<PostCreated as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<PostCreated as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::PostCreated)
}
Some(<PostVoted as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<PostVoted as alloy_sol_types::SolEvent>::decode_raw_log(
topics,
data,
)
.map(Self::PostVoted)
}
_ => {
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 RankedFeedEvents {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::PostCreated(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
Self::PostVoted(inner) => {
alloy_sol_types::private::IntoLogData::to_log_data(inner)
}
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::PostCreated(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::PostVoted(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
/**Creates a new wrapper around an on-chain [`RankedFeed`](self) contract instance.
See the [wrapper's documentation](`RankedFeedInstance`) 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,
) -> RankedFeedInstance<P, N> {
RankedFeedInstance::<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<RankedFeedInstance<P, N>>,
> {
RankedFeedInstance::<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> {
RankedFeedInstance::<P, N>::deploy_builder(__provider)
}
/**A [`RankedFeed`](self) instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`RankedFeed`](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 RankedFeedInstance<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 RankedFeedInstance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("RankedFeedInstance").field(&self.address).finish()
}
}
/// Instantiation and getters/setters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> RankedFeedInstance<P, N> {
/**Creates a new wrapper around an on-chain [`RankedFeed`](self) contract instance.
See the [wrapper's documentation](`RankedFeedInstance`) 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<RankedFeedInstance<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> RankedFeedInstance<&P, N> {
/// Clones the provider and returns a new instance with the cloned provider.
#[inline]
pub fn with_cloned_provider(self) -> RankedFeedInstance<P, N> {
RankedFeedInstance {
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,
> RankedFeedInstance<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 [`createPost`] function.
pub fn createPost(
&self,
post_data: alloy::sol_types::private::Bytes,
) -> alloy_contract::SolCallBuilder<&P, createPostCall, N> {
self.call_builder(&createPostCall { post_data })
}
///Creates a new call builder for the [`votePost`] function.
pub fn votePost(
&self,
post_id: alloy::sol_types::private::FixedBytes<32>,
) -> alloy_contract::SolCallBuilder<&P, votePostCall, N> {
self.call_builder(&votePostCall { post_id })
}
}
/// Event filters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> RankedFeedInstance<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 [`PostCreated`] event.
pub fn PostCreated_filter(&self) -> alloy_contract::Event<&P, PostCreated, N> {
self.event_filter::<PostCreated>()
}
///Creates a new event filter for the [`PostVoted`] event.
pub fn PostVoted_filter(&self) -> alloy_contract::Event<&P, PostVoted, N> {
self.event_filter::<PostVoted>()
}
}
}