diff --git a/mp2-common/src/eth.rs b/mp2-common/src/eth.rs index a0494d993..fb5405172 100644 --- a/mp2-common/src/eth.rs +++ b/mp2-common/src/eth.rs @@ -155,7 +155,7 @@ pub struct ReceiptProofInfo { } /// Contains all the information for an [`Event`] in rlp form -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, Hash, PartialEq, Eq)] pub struct EventLogInfo { /// Size in bytes of the whole log rlp encoded pub size: usize, diff --git a/mp2-v1/Makefile b/mp2-v1/Makefile index f82a9538b..1c73912da 100644 --- a/mp2-v1/Makefile +++ b/mp2-v1/Makefile @@ -12,15 +12,12 @@ TEST_BINDINGS_OUT_PATH=$(TEST_CONTRACT_PATH)/out/$(TEST_BINDINGS_FOLDER) # Generate the integration test contract bindings. bindings: - rm -rf $(TEST_BINDINGS_MOD_PATH) $(TEST_BINDINGS_OUT_PATH) # Generate new bindings. forge install --root $(TEST_CONTRACT_PATH) - forge bind --alloy --module --root $(TEST_CONTRACT_PATH) - -# Move the bindings module to the integration test location. - mv -f $(TEST_BINDINGS_OUT_PATH) $(TEST_BINDINGS_MOD_PATH) + forge bind --bindings-path $(TEST_BINDINGS_MOD_PATH) --alloy --module --root $(TEST_CONTRACT_PATH) --extra-output abi --overwrite cargo fmt + # Declare phony targets .PHONY: bindings diff --git a/mp2-v1/src/api.rs b/mp2-v1/src/api.rs index 129521229..4f813b8e9 100644 --- a/mp2-v1/src/api.rs +++ b/mp2-v1/src/api.rs @@ -222,7 +222,7 @@ fn metadata_digest_mapping(address: &Address, chain_id: u64, extra: Vec, slo compute_leaf_mapping_metadata_digest(key_id, value_id, slot) } -fn combine_digest_and_block(digest: Digest) -> HashOutput { +pub fn combine_digest_and_block(digest: Digest) -> HashOutput { let block_id = identifier_block_column(); let inputs = digest .to_fields() diff --git a/mp2-v1/src/final_extraction/api.rs b/mp2-v1/src/final_extraction/api.rs index 5e7f96498..df3dbb4fe 100644 --- a/mp2-v1/src/final_extraction/api.rs +++ b/mp2-v1/src/final_extraction/api.rs @@ -57,7 +57,7 @@ pub struct PublicParameters { circuit_set: RecursiveCircuits, } -const FINAL_EXTRACTION_CIRCUIT_SET_SIZE: usize = 2; +const FINAL_EXTRACTION_CIRCUIT_SET_SIZE: usize = 4; pub(super) const NUM_IO: usize = PublicInputs::::TOTAL_LEN; impl PublicParameters { diff --git a/mp2-v1/src/final_extraction/receipt_circuit.rs b/mp2-v1/src/final_extraction/receipt_circuit.rs index 56a540370..a1366a2af 100644 --- a/mp2-v1/src/final_extraction/receipt_circuit.rs +++ b/mp2-v1/src/final_extraction/receipt_circuit.rs @@ -108,7 +108,6 @@ impl CircuitLogicWires for ReceiptRecursiveWires { _verified_proofs: [&plonky2::plonk::proof::ProofWithPublicInputsTarget; 0], builder_parameters: Self::CircuitBuilderParams, ) -> Self { - // value proof for table a and value proof for table b = 2 let verification = ReceiptCircuitProofInputs::build(builder, &builder_parameters); ReceiptExtractionCircuit::build( builder, diff --git a/mp2-v1/src/values_extraction/api.rs b/mp2-v1/src/values_extraction/api.rs index e79662dd6..8a702ac2d 100644 --- a/mp2-v1/src/values_extraction/api.rs +++ b/mp2-v1/src/values_extraction/api.rs @@ -716,27 +716,41 @@ mod tests { let receipt_proof_infos = generate_receipt_test_info::<1, 0>(); let receipt_proofs = receipt_proof_infos.proofs(); let query = receipt_proof_infos.query(); - // We check that we have enough receipts and then take the second and third info - // (the MPT proof for the first node is different). - // Then check that the node above both is a branch. - assert!(receipt_proofs.len() > 3); - let second_info = &receipt_proofs[1]; - let third_info = &receipt_proofs[2]; + // We need two nodes that are children of the same branch so we compare the last but two nodes for each of them until we find a case that works + let (info_one, info_two) = if let Some((one, two)) = receipt_proofs + .iter() + .enumerate() + .find_map(|(i, current_proof)| { + let current_node_second_to_last = + current_proof.mpt_proof[current_proof.mpt_proof.len() - 2].clone(); + receipt_proofs + .iter() + .skip(i + 1) + .find(|find_info| { + find_info.mpt_proof[find_info.mpt_proof.len() - 2].clone() + == current_node_second_to_last + }) + .map(|matching| (current_proof, matching)) + }) { + (one, two) + } else { + panic!("No relevant events with same branch node parent") + }; - let proof_length_1 = second_info.mpt_proof.len(); - let proof_length_2 = third_info.mpt_proof.len(); + let proof_length_1 = info_one.mpt_proof.len(); + let proof_length_2 = info_two.mpt_proof.len(); - let list_one = rlp::decode_list::>(&second_info.mpt_proof[proof_length_1 - 2]); - let list_two = rlp::decode_list::>(&third_info.mpt_proof[proof_length_2 - 2]); + let list_one = rlp::decode_list::>(&info_one.mpt_proof[proof_length_1 - 2]); + let list_two = rlp::decode_list::>(&info_two.mpt_proof[proof_length_2 - 2]); - assert!(list_one == list_two); + assert_eq!(list_one, list_two); assert!(list_one.len() == 17); println!("Generating params..."); let params = build_circuits_params(); println!("Proving leaf 1..."); - let leaf_input_1 = CircuitInput::new_receipt_leaf(second_info, query); + let leaf_input_1 = CircuitInput::new_receipt_leaf(info_one, query); let now = std::time::Instant::now(); let leaf_proof1 = generate_proof(¶ms, leaf_input_1).unwrap(); { @@ -751,7 +765,7 @@ mod tests { ); println!("Proving leaf 2..."); - let leaf_input_2 = CircuitInput::new_receipt_leaf(third_info, query); + let leaf_input_2 = CircuitInput::new_receipt_leaf(info_two, query); let now = std::time::Instant::now(); let leaf_proof2 = generate_proof(¶ms, leaf_input_2).unwrap(); println!( @@ -762,7 +776,7 @@ mod tests { // The branch case for receipts is identical to that of a mapping so we use the same api. println!("Proving branch..."); let branch_input = CircuitInput::new_mapping_variable_branch( - second_info.mpt_proof[proof_length_1 - 2].clone(), + info_one.mpt_proof[proof_length_1 - 2].clone(), vec![leaf_proof1, leaf_proof2], ); diff --git a/mp2-v1/src/values_extraction/mod.rs b/mp2-v1/src/values_extraction/mod.rs index 7e14d4658..eaecdd1a8 100644 --- a/mp2-v1/src/values_extraction/mod.rs +++ b/mp2-v1/src/values_extraction/mod.rs @@ -37,18 +37,26 @@ pub(crate) const BLOCK_ID_DST: &[u8] = b"BLOCK_NUMBER"; /// Prefix used for making a topic column id. const TOPIC_PREFIX: &[u8] = b"topic"; +/// [`TOPIC_PREFIX`] as a [`str`] +const TOPIC_NAME: &str = "topic"; /// Prefix used for making a data column id. const DATA_PREFIX: &[u8] = b"data"; +/// [`DATA_PREFIX`] as a [`str`] +const DATA_NAME: &str = "data"; /// Prefix for transaction index const TX_INDEX_PREFIX: &[u8] = b"tx index"; /// Prefix for log number const LOG_NUMBER_PREFIX: &[u8] = b"log number"; +/// [`LOG_NUMBER_PREFIX`] as a [`str`] +const LOG_NUMBER_NAME: &str = "log number"; /// Prefix for gas used -const GAS_USED_PREFIX: &[u8] = b" gas used"; +const GAS_USED_PREFIX: &[u8] = b"gas used"; +/// [`GAS_USED_PREFIX`] as a [`str`] +const GAS_USED_NAME: &str = "gas used"; pub fn identifier_block_column() -> u64 { let inputs: Vec = BLOCK_ID_DST.to_fields(); @@ -401,3 +409,84 @@ pub fn compute_receipt_leaf_value_digest( + event: &EventLogInfo, +) -> Vec<(String, GFp)> { + let log_number_input = [ + event.address.as_slice(), + event.event_signature.as_slice(), + LOG_NUMBER_PREFIX, + ] + .concat() + .into_iter() + .map(GFp::from_canonical_u8) + .collect::>(); + let log_number_column_id = H::hash_no_pad(&log_number_input).elements[0]; + + let gas_used_input = [ + event.address.as_slice(), + event.event_signature.as_slice(), + GAS_USED_PREFIX, + ] + .concat() + .into_iter() + .map(GFp::from_canonical_u8) + .collect::>(); + let gas_used_column_id = H::hash_no_pad(&gas_used_input).elements[0]; + + let topic_ids = event + .topics + .iter() + .enumerate() + .map(|(j, _)| { + let input = [ + event.address.as_slice(), + event.event_signature.as_slice(), + TOPIC_PREFIX, + &[j as u8 + 1], + ] + .concat() + .into_iter() + .map(GFp::from_canonical_u8) + .collect::>(); + ( + format!("{}_{}", TOPIC_NAME, j + 1), + H::hash_no_pad(&input).elements[0], + ) + }) + .collect::>(); + + let data_ids = event + .data + .iter() + .enumerate() + .map(|(j, _)| { + let input = [ + event.address.as_slice(), + event.event_signature.as_slice(), + DATA_PREFIX, + &[j as u8 + 1], + ] + .concat() + .into_iter() + .map(GFp::from_canonical_u8) + .collect::>(); + ( + format!("{}_{}", DATA_NAME, j + 1), + H::hash_no_pad(&input).elements[0], + ) + }) + .collect::>(); + + [ + vec![ + (LOG_NUMBER_NAME.to_string(), log_number_column_id), + (GAS_USED_NAME.to_string(), gas_used_column_id), + ], + topic_ids, + data_ids, + ] + .concat() +} diff --git a/mp2-v1/test-contracts/src/Event.sol b/mp2-v1/test-contracts/src/Event.sol new file mode 100644 index 000000000..683030020 --- /dev/null +++ b/mp2-v1/test-contracts/src/Event.sol @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +contract EventEmitter { + uint256 public number; + event noIndexed(); + event oneIndexed(uint256 indexed num); + event twoIndexed(uint256 indexed num, uint256 indexed numTwo); + event threeIndexed( + uint256 indexed num, + uint256 indexed numTwo, + uint256 indexed numThree + ); + event oneData( + uint256 indexed num, + uint256 indexed numTwo, + uint256 indexed numThree, + uint256 numFour + ); + event twoData( + uint256 indexed num, + uint256 indexed numTwo, + uint256 indexed numThree, + uint256 numFour, + uint256 numFive + ); + event noIOneD(uint256 num); + event noITwoD(uint256 num, uint256 numTwo); + event oneIOneD(uint256 indexed num, uint256 numTwo); + event oneITwoD(uint256 indexed num, uint256 numTwo, uint256 numThree); + event twoIOneD( + uint256 indexed num, + uint256 indexed numTwo, + uint256 numThree + ); + event twoITwoD( + uint256 indexed num, + uint256 indexed numTwo, + uint256 numThree, + uint256 numFour + ); + + function testNoIndexed() public { + emit noIndexed(); + } + + function testOneIndexed() public { + emit oneIndexed(number); + increment(); + } + + function testTwoIndexed() public { + emit twoIndexed(number, number + 1); + increment(); + } + + function testThreeIndexed() public { + emit threeIndexed(number, number + 1, number + 2); + increment(); + } + + function testOneData() public { + emit oneData(number, number + 1, number + 2, number + 3); + increment(); + } + + function testTwoData() public { + emit twoData(number, number + 1, number + 2, number + 3, number + 4); + increment(); + } + + function testNoIOneD() public { + emit noIOneD(number); + increment(); + } + + function testNoITwoD() public { + emit noITwoD(number, number + 1); + increment(); + } + + function testOneIOneD() public { + emit oneIOneD(number, number + 1); + increment(); + } + + function testOneITwoD() public { + emit oneITwoD(number, number + 1, number + 2); + increment(); + } + + function testTwoIOneD() public { + emit twoIOneD(number, number + 1, number + 2); + increment(); + } + + function testTwoITwoD() public { + emit twoITwoD(number, number + 1, number + 2, number + 3); + increment(); + } + + function increment() public { + number++; + } +} diff --git a/mp2-v1/tests/common/bindings/eventemitter.rs b/mp2-v1/tests/common/bindings/eventemitter.rs new file mode 100644 index 000000000..7843a3356 --- /dev/null +++ b/mp2-v1/tests/common/bindings/eventemitter.rs @@ -0,0 +1,4197 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface EventEmitter { + event noIOneD(uint256 num); + event noITwoD(uint256 num, uint256 numTwo); + event noIndexed(); + event oneData(uint256 indexed num, uint256 indexed numTwo, uint256 indexed numThree, uint256 numFour); + event oneIOneD(uint256 indexed num, uint256 numTwo); + event oneITwoD(uint256 indexed num, uint256 numTwo, uint256 numThree); + event oneIndexed(uint256 indexed num); + event threeIndexed(uint256 indexed num, uint256 indexed numTwo, uint256 indexed numThree); + event twoData(uint256 indexed num, uint256 indexed numTwo, uint256 indexed numThree, uint256 numFour, uint256 numFive); + event twoIOneD(uint256 indexed num, uint256 indexed numTwo, uint256 numThree); + event twoITwoD(uint256 indexed num, uint256 indexed numTwo, uint256 numThree, uint256 numFour); + event twoIndexed(uint256 indexed num, uint256 indexed numTwo); + + function increment() external; + function number() external view returns (uint256); + function testNoIOneD() external; + function testNoITwoD() external; + function testNoIndexed() external; + function testOneData() external; + function testOneIOneD() external; + function testOneITwoD() external; + function testOneIndexed() external; + function testThreeIndexed() external; + function testTwoData() external; + function testTwoIOneD() external; + function testTwoITwoD() external; + function testTwoIndexed() external; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "increment", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "number", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "testNoIOneD", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testNoITwoD", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testNoIndexed", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testOneData", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testOneIOneD", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testOneITwoD", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testOneIndexed", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testThreeIndexed", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testTwoData", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testTwoIOneD", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testTwoITwoD", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "testTwoIndexed", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "noIOneD", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "noITwoD", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "noIndexed", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "oneData", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numThree", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numFour", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "oneIOneD", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "oneITwoD", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "numThree", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "oneIndexed", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "threeIndexed", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numThree", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "twoData", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numThree", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numFour", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "numFive", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "twoIOneD", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numThree", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "twoITwoD", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numThree", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "numFour", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "twoIndexed", + "inputs": [ + { + "name": "num", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "numTwo", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod EventEmitter { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x608060405234801561000f575f80fd5b5061057e8061001d5f395ff3fe608060405234801561000f575f80fd5b50600436106100e3575f3560e01c806346d6a7b5116100885780638381f58a116100635780638381f58a14610139578063b1e057a914610153578063c02420001461015b578063d09de08a14610163575f80fd5b806346d6a7b51461012157806363eb70f014610129578063729d452014610131575f80fd5b806331c1c63b116100c357806331c1c63b14610101578063338b538a146101095780634282ed58146101115780634369f72814610119575f80fd5b80623c7e56146100e7578062d83b55146100f15780632dc34764146100f9575b5f80fd5b6100ef61016b565b005b6100ef6101cf565b6100ef61022b565b6100ef610295565b6100ef6102e2565b6100ef610322565b6100ef61034b565b6100ef610387565b6100ef6103d7565b6100ef61042c565b6101415f5481565b60405190815260200160405180910390f35b6100ef61045f565b6100ef6104bc565b6100ef6104ee565b5f54610178906002610517565b5f54610185906001610517565b5f547ff57f433eb9493cf4d9cb5763c12221d9b095804644d4ee006a78c72076cff9476101b3826003610517565b6040519081526020015b60405180910390a46101cd6104ee565b565b5f547fef4c88193498df237f039055d1212ac2a3b93ed8aea88c814312e50f6a32592d6101fd826001610517565b5f5461020a906002610517565b604080519283526020830191909152015b60405180910390a26101cd6104ee565b5f54610238906002610517565b5f54610245906001610517565b5f547ff03d29753fbd5ac209bab88a99b396bcc25c3e72530d02c81aea4d324ab3d742610273826003610517565b5f54610280906004610517565b604080519283526020830191909152016101bd565b5f546102a2906002610517565b5f546102af906001610517565b5f805460405190917f1d18de2cd8798a1c29b9255930c807eb6c84ae0acb2219acbb11e0f65cf813e991a46101cd6104ee565b5f546102ef906001610517565b5f805460405190917fa6baf14d8f11d7a4497089bb3fca0adfc34837cfb1f4aa370634d36ef0305b4691a36101cd6104ee565b6040517ef7c74f0533aa15e5ac7cafa9f9261d14da1e78830deba7110fbc79001ed15e905f90a1565b5f547f168718c0b1eb6bfd7b0edecea5c6fc6502737ad73a4c9f52ffa7e553c8eb9f53610379826001610517565b60405190815260200161021b565b5f547f2fa61517ddf9dc7f2f3d5ca72414a01c834d9c5bb7c336c977423c85094bba61906103b6816001610517565b604080519283526020830191909152015b60405180910390a16101cd6104ee565b5f546103e4906001610517565b5f547f3bb2d6337882faa5526cf806c9763904a90f3363590dd4386913e3fcd8a2e1d1610412826002610517565b6040519081526020015b60405180910390a36101cd6104ee565b5f805460405190917fc2809a1a2fb95d84cfdc488cdb320a144c158f8d44836c9c2d4badba082bfdfa91a26101cd6104ee565b5f5461046c906001610517565b5f547f4b92229abe204a30d7b088d8110291760934d65b3c960680ad94e05f52a8860561049a826002610517565b5f546104a7906003610517565b6040805192835260208301919091520161041c565b7f04f7fb289e51ea9996ec98e62ff4b651becfa6e53f3b850be209b69741c66f245f546040516103c791815260200190565b5f805490806104fc83610530565b9190505550565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561052a5761052a610503565b92915050565b5f6001820161054157610541610503565b506001019056fea2646970667358221220b4cc2df5eed06f538a31157edfaeeee591a5719d35fb47f3b6ce5d31c1ffe2f964736f6c63430008180033 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[Pa\x05~\x80a\0\x1D_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[P`\x046\x10a\0\xE3W_5`\xE0\x1C\x80cF\xD6\xA7\xB5\x11a\0\x88W\x80c\x83\x81\xF5\x8A\x11a\0cW\x80c\x83\x81\xF5\x8A\x14a\x019W\x80c\xB1\xE0W\xA9\x14a\x01SW\x80c\xC0$ \0\x14a\x01[W\x80c\xD0\x9D\xE0\x8A\x14a\x01cW_\x80\xFD[\x80cF\xD6\xA7\xB5\x14a\x01!W\x80cc\xEBp\xF0\x14a\x01)W\x80cr\x9DE \x14a\x011W_\x80\xFD[\x80c1\xC1\xC6;\x11a\0\xC3W\x80c1\xC1\xC6;\x14a\x01\x01W\x80c3\x8BS\x8A\x14a\x01\tW\x80cB\x82\xEDX\x14a\x01\x11W\x80cCi\xF7(\x14a\x01\x19W_\x80\xFD[\x80b<~V\x14a\0\xE7W\x80b\xD8;U\x14a\0\xF1W\x80c-\xC3Gd\x14a\0\xF9W[_\x80\xFD[a\0\xEFa\x01kV[\0[a\0\xEFa\x01\xCFV[a\0\xEFa\x02+V[a\0\xEFa\x02\x95V[a\0\xEFa\x02\xE2V[a\0\xEFa\x03\"V[a\0\xEFa\x03KV[a\0\xEFa\x03\x87V[a\0\xEFa\x03\xD7V[a\0\xEFa\x04,V[a\x01A_T\x81V[`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3[a\0\xEFa\x04_V[a\0\xEFa\x04\xBCV[a\0\xEFa\x04\xEEV[_Ta\x01x\x90`\x02a\x05\x17V[_Ta\x01\x85\x90`\x01a\x05\x17V[_T\x7F\xF5\x7FC>\xB9I<\xF4\xD9\xCBWc\xC1\"!\xD9\xB0\x95\x80FD\xD4\xEE\0jx\xC7 v\xCF\xF9Ga\x01\xB3\x82`\x03a\x05\x17V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xA4a\x01\xCDa\x04\xEEV[V[_T\x7F\xEFL\x88\x194\x98\xDF#\x7F\x03\x90U\xD1!*\xC2\xA3\xB9>\xD8\xAE\xA8\x8C\x81C\x12\xE5\x0Fj2Y-a\x01\xFD\x82`\x01a\x05\x17V[_Ta\x02\n\x90`\x02a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01[`@Q\x80\x91\x03\x90\xA2a\x01\xCDa\x04\xEEV[_Ta\x028\x90`\x02a\x05\x17V[_Ta\x02E\x90`\x01a\x05\x17V[_T\x7F\xF0=)u?\xBDZ\xC2\t\xBA\xB8\x8A\x99\xB3\x96\xBC\xC2\\>rS\r\x02\xC8\x1A\xEAM2J\xB3\xD7Ba\x02s\x82`\x03a\x05\x17V[_Ta\x02\x80\x90`\x04a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01a\x01\xBDV[_Ta\x02\xA2\x90`\x02a\x05\x17V[_Ta\x02\xAF\x90`\x01a\x05\x17V[_\x80T`@Q\x90\x91\x7F\x1D\x18\xDE,\xD8y\x8A\x1C)\xB9%Y0\xC8\x07\xEBl\x84\xAE\n\xCB\"\x19\xAC\xBB\x11\xE0\xF6\\\xF8\x13\xE9\x91\xA4a\x01\xCDa\x04\xEEV[_Ta\x02\xEF\x90`\x01a\x05\x17V[_\x80T`@Q\x90\x91\x7F\xA6\xBA\xF1M\x8F\x11\xD7\xA4Ip\x89\xBB?\xCA\n\xDF\xC3H7\xCF\xB1\xF4\xAA7\x064\xD3n\xF00[F\x91\xA3a\x01\xCDa\x04\xEEV[`@Q~\xF7\xC7O\x053\xAA\x15\xE5\xAC|\xAF\xA9\xF9&\x1D\x14\xDA\x1Ex\x83\r\xEB\xA7\x11\x0F\xBCy\0\x1E\xD1^\x90_\x90\xA1V[_T\x7F\x16\x87\x18\xC0\xB1\xEBk\xFD{\x0E\xDE\xCE\xA5\xC6\xFCe\x02sz\xD7:L\x9FR\xFF\xA7\xE5S\xC8\xEB\x9FSa\x03y\x82`\x01a\x05\x17V[`@Q\x90\x81R` \x01a\x02\x1BV[_T\x7F/\xA6\x15\x17\xDD\xF9\xDC\x7F/=\\\xA7$\x14\xA0\x1C\x83M\x9C[\xB7\xC36\xC9wB<\x85\tK\xBAa\x90a\x03\xB6\x81`\x01a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01[`@Q\x80\x91\x03\x90\xA1a\x01\xCDa\x04\xEEV[_Ta\x03\xE4\x90`\x01a\x05\x17V[_T\x7F;\xB2\xD63x\x82\xFA\xA5Rl\xF8\x06\xC9v9\x04\xA9\x0F3cY\r\xD48i\x13\xE3\xFC\xD8\xA2\xE1\xD1a\x04\x12\x82`\x02a\x05\x17V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xA3a\x01\xCDa\x04\xEEV[_\x80T`@Q\x90\x91\x7F\xC2\x80\x9A\x1A/\xB9]\x84\xCF\xDCH\x8C\xDB2\n\x14L\x15\x8F\x8DD\x83l\x9C-K\xAD\xBA\x08+\xFD\xFA\x91\xA2a\x01\xCDa\x04\xEEV[_Ta\x04l\x90`\x01a\x05\x17V[_T\x7FK\x92\"\x9A\xBE J0\xD7\xB0\x88\xD8\x11\x02\x91v\t4\xD6[<\x96\x06\x80\xAD\x94\xE0_R\xA8\x86\x05a\x04\x9A\x82`\x02a\x05\x17V[_Ta\x04\xA7\x90`\x03a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01a\x04\x1CV[\x7F\x04\xF7\xFB(\x9EQ\xEA\x99\x96\xEC\x98\xE6/\xF4\xB6Q\xBE\xCF\xA6\xE5?;\x85\x0B\xE2\t\xB6\x97A\xC6o$_T`@Qa\x03\xC7\x91\x81R` \x01\x90V[_\x80T\x90\x80a\x04\xFC\x83a\x050V[\x91\x90PUPV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[\x80\x82\x01\x80\x82\x11\x15a\x05*Wa\x05*a\x05\x03V[\x92\x91PPV[_`\x01\x82\x01a\x05AWa\x05Aa\x05\x03V[P`\x01\x01\x90V\xFE\xA2dipfsX\"\x12 \xB4\xCC-\xF5\xEE\xD0oS\x8A1\x15~\xDF\xAE\xEE\xE5\x91\xA5q\x9D5\xFBG\xF3\xB6\xCE]1\xC1\xFF\xE2\xF9dsolcC\0\x08\x18\x003", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x608060405234801561000f575f80fd5b50600436106100e3575f3560e01c806346d6a7b5116100885780638381f58a116100635780638381f58a14610139578063b1e057a914610153578063c02420001461015b578063d09de08a14610163575f80fd5b806346d6a7b51461012157806363eb70f014610129578063729d452014610131575f80fd5b806331c1c63b116100c357806331c1c63b14610101578063338b538a146101095780634282ed58146101115780634369f72814610119575f80fd5b80623c7e56146100e7578062d83b55146100f15780632dc34764146100f9575b5f80fd5b6100ef61016b565b005b6100ef6101cf565b6100ef61022b565b6100ef610295565b6100ef6102e2565b6100ef610322565b6100ef61034b565b6100ef610387565b6100ef6103d7565b6100ef61042c565b6101415f5481565b60405190815260200160405180910390f35b6100ef61045f565b6100ef6104bc565b6100ef6104ee565b5f54610178906002610517565b5f54610185906001610517565b5f547ff57f433eb9493cf4d9cb5763c12221d9b095804644d4ee006a78c72076cff9476101b3826003610517565b6040519081526020015b60405180910390a46101cd6104ee565b565b5f547fef4c88193498df237f039055d1212ac2a3b93ed8aea88c814312e50f6a32592d6101fd826001610517565b5f5461020a906002610517565b604080519283526020830191909152015b60405180910390a26101cd6104ee565b5f54610238906002610517565b5f54610245906001610517565b5f547ff03d29753fbd5ac209bab88a99b396bcc25c3e72530d02c81aea4d324ab3d742610273826003610517565b5f54610280906004610517565b604080519283526020830191909152016101bd565b5f546102a2906002610517565b5f546102af906001610517565b5f805460405190917f1d18de2cd8798a1c29b9255930c807eb6c84ae0acb2219acbb11e0f65cf813e991a46101cd6104ee565b5f546102ef906001610517565b5f805460405190917fa6baf14d8f11d7a4497089bb3fca0adfc34837cfb1f4aa370634d36ef0305b4691a36101cd6104ee565b6040517ef7c74f0533aa15e5ac7cafa9f9261d14da1e78830deba7110fbc79001ed15e905f90a1565b5f547f168718c0b1eb6bfd7b0edecea5c6fc6502737ad73a4c9f52ffa7e553c8eb9f53610379826001610517565b60405190815260200161021b565b5f547f2fa61517ddf9dc7f2f3d5ca72414a01c834d9c5bb7c336c977423c85094bba61906103b6816001610517565b604080519283526020830191909152015b60405180910390a16101cd6104ee565b5f546103e4906001610517565b5f547f3bb2d6337882faa5526cf806c9763904a90f3363590dd4386913e3fcd8a2e1d1610412826002610517565b6040519081526020015b60405180910390a36101cd6104ee565b5f805460405190917fc2809a1a2fb95d84cfdc488cdb320a144c158f8d44836c9c2d4badba082bfdfa91a26101cd6104ee565b5f5461046c906001610517565b5f547f4b92229abe204a30d7b088d8110291760934d65b3c960680ad94e05f52a8860561049a826002610517565b5f546104a7906003610517565b6040805192835260208301919091520161041c565b7f04f7fb289e51ea9996ec98e62ff4b651becfa6e53f3b850be209b69741c66f245f546040516103c791815260200190565b5f805490806104fc83610530565b9190505550565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561052a5761052a610503565b92915050565b5f6001820161054157610541610503565b506001019056fea2646970667358221220b4cc2df5eed06f538a31157edfaeeee591a5719d35fb47f3b6ce5d31c1ffe2f964736f6c63430008180033 + /// ``` + #[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_\x80\xFD[P`\x046\x10a\0\xE3W_5`\xE0\x1C\x80cF\xD6\xA7\xB5\x11a\0\x88W\x80c\x83\x81\xF5\x8A\x11a\0cW\x80c\x83\x81\xF5\x8A\x14a\x019W\x80c\xB1\xE0W\xA9\x14a\x01SW\x80c\xC0$ \0\x14a\x01[W\x80c\xD0\x9D\xE0\x8A\x14a\x01cW_\x80\xFD[\x80cF\xD6\xA7\xB5\x14a\x01!W\x80cc\xEBp\xF0\x14a\x01)W\x80cr\x9DE \x14a\x011W_\x80\xFD[\x80c1\xC1\xC6;\x11a\0\xC3W\x80c1\xC1\xC6;\x14a\x01\x01W\x80c3\x8BS\x8A\x14a\x01\tW\x80cB\x82\xEDX\x14a\x01\x11W\x80cCi\xF7(\x14a\x01\x19W_\x80\xFD[\x80b<~V\x14a\0\xE7W\x80b\xD8;U\x14a\0\xF1W\x80c-\xC3Gd\x14a\0\xF9W[_\x80\xFD[a\0\xEFa\x01kV[\0[a\0\xEFa\x01\xCFV[a\0\xEFa\x02+V[a\0\xEFa\x02\x95V[a\0\xEFa\x02\xE2V[a\0\xEFa\x03\"V[a\0\xEFa\x03KV[a\0\xEFa\x03\x87V[a\0\xEFa\x03\xD7V[a\0\xEFa\x04,V[a\x01A_T\x81V[`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3[a\0\xEFa\x04_V[a\0\xEFa\x04\xBCV[a\0\xEFa\x04\xEEV[_Ta\x01x\x90`\x02a\x05\x17V[_Ta\x01\x85\x90`\x01a\x05\x17V[_T\x7F\xF5\x7FC>\xB9I<\xF4\xD9\xCBWc\xC1\"!\xD9\xB0\x95\x80FD\xD4\xEE\0jx\xC7 v\xCF\xF9Ga\x01\xB3\x82`\x03a\x05\x17V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xA4a\x01\xCDa\x04\xEEV[V[_T\x7F\xEFL\x88\x194\x98\xDF#\x7F\x03\x90U\xD1!*\xC2\xA3\xB9>\xD8\xAE\xA8\x8C\x81C\x12\xE5\x0Fj2Y-a\x01\xFD\x82`\x01a\x05\x17V[_Ta\x02\n\x90`\x02a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01[`@Q\x80\x91\x03\x90\xA2a\x01\xCDa\x04\xEEV[_Ta\x028\x90`\x02a\x05\x17V[_Ta\x02E\x90`\x01a\x05\x17V[_T\x7F\xF0=)u?\xBDZ\xC2\t\xBA\xB8\x8A\x99\xB3\x96\xBC\xC2\\>rS\r\x02\xC8\x1A\xEAM2J\xB3\xD7Ba\x02s\x82`\x03a\x05\x17V[_Ta\x02\x80\x90`\x04a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01a\x01\xBDV[_Ta\x02\xA2\x90`\x02a\x05\x17V[_Ta\x02\xAF\x90`\x01a\x05\x17V[_\x80T`@Q\x90\x91\x7F\x1D\x18\xDE,\xD8y\x8A\x1C)\xB9%Y0\xC8\x07\xEBl\x84\xAE\n\xCB\"\x19\xAC\xBB\x11\xE0\xF6\\\xF8\x13\xE9\x91\xA4a\x01\xCDa\x04\xEEV[_Ta\x02\xEF\x90`\x01a\x05\x17V[_\x80T`@Q\x90\x91\x7F\xA6\xBA\xF1M\x8F\x11\xD7\xA4Ip\x89\xBB?\xCA\n\xDF\xC3H7\xCF\xB1\xF4\xAA7\x064\xD3n\xF00[F\x91\xA3a\x01\xCDa\x04\xEEV[`@Q~\xF7\xC7O\x053\xAA\x15\xE5\xAC|\xAF\xA9\xF9&\x1D\x14\xDA\x1Ex\x83\r\xEB\xA7\x11\x0F\xBCy\0\x1E\xD1^\x90_\x90\xA1V[_T\x7F\x16\x87\x18\xC0\xB1\xEBk\xFD{\x0E\xDE\xCE\xA5\xC6\xFCe\x02sz\xD7:L\x9FR\xFF\xA7\xE5S\xC8\xEB\x9FSa\x03y\x82`\x01a\x05\x17V[`@Q\x90\x81R` \x01a\x02\x1BV[_T\x7F/\xA6\x15\x17\xDD\xF9\xDC\x7F/=\\\xA7$\x14\xA0\x1C\x83M\x9C[\xB7\xC36\xC9wB<\x85\tK\xBAa\x90a\x03\xB6\x81`\x01a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01[`@Q\x80\x91\x03\x90\xA1a\x01\xCDa\x04\xEEV[_Ta\x03\xE4\x90`\x01a\x05\x17V[_T\x7F;\xB2\xD63x\x82\xFA\xA5Rl\xF8\x06\xC9v9\x04\xA9\x0F3cY\r\xD48i\x13\xE3\xFC\xD8\xA2\xE1\xD1a\x04\x12\x82`\x02a\x05\x17V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xA3a\x01\xCDa\x04\xEEV[_\x80T`@Q\x90\x91\x7F\xC2\x80\x9A\x1A/\xB9]\x84\xCF\xDCH\x8C\xDB2\n\x14L\x15\x8F\x8DD\x83l\x9C-K\xAD\xBA\x08+\xFD\xFA\x91\xA2a\x01\xCDa\x04\xEEV[_Ta\x04l\x90`\x01a\x05\x17V[_T\x7FK\x92\"\x9A\xBE J0\xD7\xB0\x88\xD8\x11\x02\x91v\t4\xD6[<\x96\x06\x80\xAD\x94\xE0_R\xA8\x86\x05a\x04\x9A\x82`\x02a\x05\x17V[_Ta\x04\xA7\x90`\x03a\x05\x17V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01a\x04\x1CV[\x7F\x04\xF7\xFB(\x9EQ\xEA\x99\x96\xEC\x98\xE6/\xF4\xB6Q\xBE\xCF\xA6\xE5?;\x85\x0B\xE2\t\xB6\x97A\xC6o$_T`@Qa\x03\xC7\x91\x81R` \x01\x90V[_\x80T\x90\x80a\x04\xFC\x83a\x050V[\x91\x90PUPV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[\x80\x82\x01\x80\x82\x11\x15a\x05*Wa\x05*a\x05\x03V[\x92\x91PPV[_`\x01\x82\x01a\x05AWa\x05Aa\x05\x03V[P`\x01\x01\x90V\xFE\xA2dipfsX\"\x12 \xB4\xCC-\xF5\xEE\xD0oS\x8A1\x15~\xDF\xAE\xEE\xE5\x91\xA5q\x9D5\xFBG\xF3\xB6\xCE]1\xC1\xFF\xE2\xF9dsolcC\0\x08\x18\x003", + ); + /**Event with signature `noIOneD(uint256)` and selector `0x04f7fb289e51ea9996ec98e62ff4b651becfa6e53f3b850be209b69741c66f24`. + ```solidity + event noIOneD(uint256 num); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct noIOneD { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for noIOneD { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "noIOneD(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 4u8, 247u8, 251u8, 40u8, 158u8, 81u8, 234u8, 153u8, 150u8, 236u8, 152u8, 230u8, + 47u8, 244u8, 182u8, 81u8, 190u8, 207u8, 166u8, 229u8, 63u8, 59u8, 133u8, 11u8, + 226u8, 9u8, 182u8, 151u8, 65u8, 198u8, 111u8, 36u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { num: data.0 } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.num, + ), + ) + } + #[inline] + fn topics(&self) -> ::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() < ::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 noIOneD { + 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<&noIOneD> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &noIOneD) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `noITwoD(uint256,uint256)` and selector `0x2fa61517ddf9dc7f2f3d5ca72414a01c834d9c5bb7c336c977423c85094bba61`. + ```solidity + event noITwoD(uint256 num, uint256 numTwo); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct noITwoD { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for noITwoD { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "noITwoD(uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 47u8, 166u8, 21u8, 23u8, 221u8, 249u8, 220u8, 127u8, 47u8, 61u8, 92u8, 167u8, + 36u8, 20u8, 160u8, 28u8, 131u8, 77u8, 156u8, 91u8, 183u8, 195u8, 54u8, 201u8, + 119u8, 66u8, 60u8, 133u8, 9u8, 75u8, 186u8, 97u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: data.0, + numTwo: data.1, + } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.num, + ), + as alloy_sol_types::SolType>::tokenize( + &self.numTwo, + ), + ) + } + #[inline] + fn topics(&self) -> ::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() < ::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 noITwoD { + 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<&noITwoD> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &noITwoD) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `noIndexed()` and selector `0x00f7c74f0533aa15e5ac7cafa9f9261d14da1e78830deba7110fbc79001ed15e`. + ```solidity + event noIndexed(); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct noIndexed {} + #[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 noIndexed { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "noIndexed()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 0u8, 247u8, 199u8, 79u8, 5u8, 51u8, 170u8, 21u8, 229u8, 172u8, 124u8, 175u8, + 169u8, 249u8, 38u8, 29u8, 20u8, 218u8, 30u8, 120u8, 131u8, 13u8, 235u8, 167u8, + 17u8, 15u8, 188u8, 121u8, 0u8, 30u8, 209u8, 94u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self {} + } + #[inline] + fn check_signature( + topics: &::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) -> ::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() < ::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 noIndexed { + 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<&noIndexed> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &noIndexed) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `oneData(uint256,uint256,uint256,uint256)` and selector `0xf57f433eb9493cf4d9cb5763c12221d9b095804644d4ee006a78c72076cff947`. + ```solidity + event oneData(uint256 indexed num, uint256 indexed numTwo, uint256 indexed numThree, uint256 numFour); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct oneData { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numThree: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numFour: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for oneData { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "oneData(uint256,uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 245u8, 127u8, 67u8, 62u8, 185u8, 73u8, 60u8, 244u8, 217u8, 203u8, 87u8, 99u8, + 193u8, 34u8, 33u8, 217u8, 176u8, 149u8, 128u8, 70u8, 68u8, 212u8, 238u8, 0u8, + 106u8, 120u8, 199u8, 32u8, 118u8, 207u8, 249u8, 71u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: topics.2, + numThree: topics.3, + numFour: data.0, + } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.numFour, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.num.clone(), + self.numTwo.clone(), + self.numThree.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numTwo); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numThree); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for oneData { + 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<&oneData> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &oneData) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `oneIOneD(uint256,uint256)` and selector `0x168718c0b1eb6bfd7b0edecea5c6fc6502737ad73a4c9f52ffa7e553c8eb9f53`. + ```solidity + event oneIOneD(uint256 indexed num, uint256 numTwo); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct oneIOneD { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for oneIOneD { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "oneIOneD(uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 22u8, 135u8, 24u8, 192u8, 177u8, 235u8, 107u8, 253u8, 123u8, 14u8, 222u8, + 206u8, 165u8, 198u8, 252u8, 101u8, 2u8, 115u8, 122u8, 215u8, 58u8, 76u8, 159u8, + 82u8, 255u8, 167u8, 229u8, 83u8, 200u8, 235u8, 159u8, 83u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: data.0, + } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.numTwo, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.num.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for oneIOneD { + 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<&oneIOneD> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &oneIOneD) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `oneITwoD(uint256,uint256,uint256)` and selector `0xef4c88193498df237f039055d1212ac2a3b93ed8aea88c814312e50f6a32592d`. + ```solidity + event oneITwoD(uint256 indexed num, uint256 numTwo, uint256 numThree); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct oneITwoD { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numThree: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for oneITwoD { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "oneITwoD(uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 239u8, 76u8, 136u8, 25u8, 52u8, 152u8, 223u8, 35u8, 127u8, 3u8, 144u8, 85u8, + 209u8, 33u8, 42u8, 194u8, 163u8, 185u8, 62u8, 216u8, 174u8, 168u8, 140u8, + 129u8, 67u8, 18u8, 229u8, 15u8, 106u8, 50u8, 89u8, 45u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: data.0, + numThree: data.1, + } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.numTwo, + ), + as alloy_sol_types::SolType>::tokenize( + &self.numThree, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.num.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for oneITwoD { + 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<&oneITwoD> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &oneITwoD) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `oneIndexed(uint256)` and selector `0xc2809a1a2fb95d84cfdc488cdb320a144c158f8d44836c9c2d4badba082bfdfa`. + ```solidity + event oneIndexed(uint256 indexed num); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct oneIndexed { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for oneIndexed { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "oneIndexed(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 194u8, 128u8, 154u8, 26u8, 47u8, 185u8, 93u8, 132u8, 207u8, 220u8, 72u8, 140u8, + 219u8, 50u8, 10u8, 20u8, 76u8, 21u8, 143u8, 141u8, 68u8, 131u8, 108u8, 156u8, + 45u8, 75u8, 173u8, 186u8, 8u8, 43u8, 253u8, 250u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { num: topics.1 } + } + #[inline] + fn check_signature( + topics: &::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) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.num.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for oneIndexed { + 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<&oneIndexed> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &oneIndexed) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `threeIndexed(uint256,uint256,uint256)` and selector `0x1d18de2cd8798a1c29b9255930c807eb6c84ae0acb2219acbb11e0f65cf813e9`. + ```solidity + event threeIndexed(uint256 indexed num, uint256 indexed numTwo, uint256 indexed numThree); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct threeIndexed { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numThree: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for threeIndexed { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "threeIndexed(uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 29u8, 24u8, 222u8, 44u8, 216u8, 121u8, 138u8, 28u8, 41u8, 185u8, 37u8, 89u8, + 48u8, 200u8, 7u8, 235u8, 108u8, 132u8, 174u8, 10u8, 203u8, 34u8, 25u8, 172u8, + 187u8, 17u8, 224u8, 246u8, 92u8, 248u8, 19u8, 233u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: topics.2, + numThree: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::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) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.num.clone(), + self.numTwo.clone(), + self.numThree.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numTwo); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numThree); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for threeIndexed { + 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<&threeIndexed> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &threeIndexed) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `twoData(uint256,uint256,uint256,uint256,uint256)` and selector `0xf03d29753fbd5ac209bab88a99b396bcc25c3e72530d02c81aea4d324ab3d742`. + ```solidity + event twoData(uint256 indexed num, uint256 indexed numTwo, uint256 indexed numThree, uint256 numFour, uint256 numFive); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct twoData { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numThree: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numFour: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numFive: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for twoData { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "twoData(uint256,uint256,uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 240u8, 61u8, 41u8, 117u8, 63u8, 189u8, 90u8, 194u8, 9u8, 186u8, 184u8, 138u8, + 153u8, 179u8, 150u8, 188u8, 194u8, 92u8, 62u8, 114u8, 83u8, 13u8, 2u8, 200u8, + 26u8, 234u8, 77u8, 50u8, 74u8, 179u8, 215u8, 66u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: topics.2, + numThree: topics.3, + numFour: data.0, + numFive: data.1, + } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.numFour, + ), + as alloy_sol_types::SolType>::tokenize( + &self.numFive, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.num.clone(), + self.numTwo.clone(), + self.numThree.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numTwo); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numThree); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for twoData { + 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<&twoData> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &twoData) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `twoIOneD(uint256,uint256,uint256)` and selector `0x3bb2d6337882faa5526cf806c9763904a90f3363590dd4386913e3fcd8a2e1d1`. + ```solidity + event twoIOneD(uint256 indexed num, uint256 indexed numTwo, uint256 numThree); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct twoIOneD { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numThree: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for twoIOneD { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "twoIOneD(uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 59u8, 178u8, 214u8, 51u8, 120u8, 130u8, 250u8, 165u8, 82u8, 108u8, 248u8, 6u8, + 201u8, 118u8, 57u8, 4u8, 169u8, 15u8, 51u8, 99u8, 89u8, 13u8, 212u8, 56u8, + 105u8, 19u8, 227u8, 252u8, 216u8, 162u8, 225u8, 209u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: topics.2, + numThree: data.0, + } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.numThree, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.num.clone(), + self.numTwo.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numTwo); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for twoIOneD { + 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<&twoIOneD> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &twoIOneD) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `twoITwoD(uint256,uint256,uint256,uint256)` and selector `0x4b92229abe204a30d7b088d8110291760934d65b3c960680ad94e05f52a88605`. + ```solidity + event twoITwoD(uint256 indexed num, uint256 indexed numTwo, uint256 numThree, uint256 numFour); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct twoITwoD { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numThree: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numFour: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for twoITwoD { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "twoITwoD(uint256,uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 75u8, 146u8, 34u8, 154u8, 190u8, 32u8, 74u8, 48u8, 215u8, 176u8, 136u8, 216u8, + 17u8, 2u8, 145u8, 118u8, 9u8, 52u8, 214u8, 91u8, 60u8, 150u8, 6u8, 128u8, + 173u8, 148u8, 224u8, 95u8, 82u8, 168u8, 134u8, 5u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: topics.2, + numThree: data.0, + numFour: data.1, + } + } + #[inline] + fn check_signature( + topics: &::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<'_> { + ( + as alloy_sol_types::SolType>::tokenize( + &self.numThree, + ), + as alloy_sol_types::SolType>::tokenize( + &self.numFour, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.num.clone(), + self.numTwo.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numTwo); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for twoITwoD { + 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<&twoITwoD> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &twoITwoD) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `twoIndexed(uint256,uint256)` and selector `0xa6baf14d8f11d7a4497089bb3fca0adfc34837cfb1f4aa370634d36ef0305b46`. + ```solidity + event twoIndexed(uint256 indexed num, uint256 indexed numTwo); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct twoIndexed { + #[allow(missing_docs)] + pub num: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub numTwo: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for twoIndexed { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "twoIndexed(uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 166u8, 186u8, 241u8, 77u8, 143u8, 17u8, 215u8, 164u8, 73u8, 112u8, 137u8, + 187u8, 63u8, 202u8, 10u8, 223u8, 195u8, 72u8, 55u8, 207u8, 177u8, 244u8, 170u8, + 55u8, 6u8, 52u8, 211u8, 110u8, 240u8, 48u8, 91u8, 70u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + num: topics.1, + numTwo: topics.2, + } + } + #[inline] + fn check_signature( + topics: &::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) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.num.clone(), + self.numTwo.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.num); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.numTwo); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for twoIndexed { + 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<&twoIndexed> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &twoIndexed) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `increment()` and selector `0xd09de08a`. + ```solidity + function increment() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct incrementCall {} + ///Container type for the return parameters of the [`increment()`](incrementCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct incrementReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: incrementCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for incrementCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: incrementReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for incrementReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for incrementCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = incrementReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "increment()"; + const SELECTOR: [u8; 4] = [208u8, 157u8, 224u8, 138u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `number()` and selector `0x8381f58a`. + ```solidity + function number() external view returns (uint256); + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct numberCall {} + ///Container type for the return parameters of the [`number()`](numberCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct numberReturn { + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: numberCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for numberCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: numberReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for numberReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for numberCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = numberReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "number()"; + const SELECTOR: [u8; 4] = [131u8, 129u8, 245u8, 138u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testNoIOneD()` and selector `0xc0242000`. + ```solidity + function testNoIOneD() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testNoIOneDCall {} + ///Container type for the return parameters of the [`testNoIOneD()`](testNoIOneDCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testNoIOneDReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testNoIOneDCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testNoIOneDCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testNoIOneDReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testNoIOneDReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testNoIOneDCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testNoIOneDReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testNoIOneD()"; + const SELECTOR: [u8; 4] = [192u8, 36u8, 32u8, 0u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testNoITwoD()` and selector `0x46d6a7b5`. + ```solidity + function testNoITwoD() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testNoITwoDCall {} + ///Container type for the return parameters of the [`testNoITwoD()`](testNoITwoDCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testNoITwoDReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testNoITwoDCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testNoITwoDCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testNoITwoDReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testNoITwoDReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testNoITwoDCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testNoITwoDReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testNoITwoD()"; + const SELECTOR: [u8; 4] = [70u8, 214u8, 167u8, 181u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testNoIndexed()` and selector `0x4282ed58`. + ```solidity + function testNoIndexed() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testNoIndexedCall {} + ///Container type for the return parameters of the [`testNoIndexed()`](testNoIndexedCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testNoIndexedReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testNoIndexedCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testNoIndexedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testNoIndexedReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testNoIndexedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testNoIndexedCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testNoIndexedReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testNoIndexed()"; + const SELECTOR: [u8; 4] = [66u8, 130u8, 237u8, 88u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testOneData()` and selector `0x003c7e56`. + ```solidity + function testOneData() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneDataCall {} + ///Container type for the return parameters of the [`testOneData()`](testOneDataCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneDataReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneDataCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneDataCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneDataReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneDataReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testOneDataCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testOneDataReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testOneData()"; + const SELECTOR: [u8; 4] = [0u8, 60u8, 126u8, 86u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testOneIOneD()` and selector `0x4369f728`. + ```solidity + function testOneIOneD() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneIOneDCall {} + ///Container type for the return parameters of the [`testOneIOneD()`](testOneIOneDCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneIOneDReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneIOneDCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneIOneDCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneIOneDReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneIOneDReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testOneIOneDCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testOneIOneDReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testOneIOneD()"; + const SELECTOR: [u8; 4] = [67u8, 105u8, 247u8, 40u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testOneITwoD()` and selector `0x00d83b55`. + ```solidity + function testOneITwoD() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneITwoDCall {} + ///Container type for the return parameters of the [`testOneITwoD()`](testOneITwoDCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneITwoDReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneITwoDCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneITwoDCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneITwoDReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneITwoDReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testOneITwoDCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testOneITwoDReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testOneITwoD()"; + const SELECTOR: [u8; 4] = [0u8, 216u8, 59u8, 85u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testOneIndexed()` and selector `0x729d4520`. + ```solidity + function testOneIndexed() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneIndexedCall {} + ///Container type for the return parameters of the [`testOneIndexed()`](testOneIndexedCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testOneIndexedReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneIndexedCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneIndexedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testOneIndexedReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testOneIndexedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testOneIndexedCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testOneIndexedReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testOneIndexed()"; + const SELECTOR: [u8; 4] = [114u8, 157u8, 69u8, 32u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testThreeIndexed()` and selector `0x31c1c63b`. + ```solidity + function testThreeIndexed() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testThreeIndexedCall {} + ///Container type for the return parameters of the [`testThreeIndexed()`](testThreeIndexedCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testThreeIndexedReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testThreeIndexedCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testThreeIndexedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testThreeIndexedReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testThreeIndexedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testThreeIndexedCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testThreeIndexedReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testThreeIndexed()"; + const SELECTOR: [u8; 4] = [49u8, 193u8, 198u8, 59u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testTwoData()` and selector `0x2dc34764`. + ```solidity + function testTwoData() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoDataCall {} + ///Container type for the return parameters of the [`testTwoData()`](testTwoDataCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoDataReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoDataCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoDataCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoDataReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoDataReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testTwoDataCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testTwoDataReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testTwoData()"; + const SELECTOR: [u8; 4] = [45u8, 195u8, 71u8, 100u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testTwoIOneD()` and selector `0x63eb70f0`. + ```solidity + function testTwoIOneD() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoIOneDCall {} + ///Container type for the return parameters of the [`testTwoIOneD()`](testTwoIOneDCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoIOneDReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoIOneDCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoIOneDCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoIOneDReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoIOneDReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testTwoIOneDCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testTwoIOneDReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testTwoIOneD()"; + const SELECTOR: [u8; 4] = [99u8, 235u8, 112u8, 240u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testTwoITwoD()` and selector `0xb1e057a9`. + ```solidity + function testTwoITwoD() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoITwoDCall {} + ///Container type for the return parameters of the [`testTwoITwoD()`](testTwoITwoDCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoITwoDReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoITwoDCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoITwoDCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoITwoDReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoITwoDReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testTwoITwoDCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testTwoITwoDReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testTwoITwoD()"; + const SELECTOR: [u8; 4] = [177u8, 224u8, 87u8, 169u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + /**Function with signature `testTwoIndexed()` and selector `0x338b538a`. + ```solidity + function testTwoIndexed() external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoIndexedCall {} + ///Container type for the return parameters of the [`testTwoIndexed()`](testTwoIndexedCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct testTwoIndexedReturn {} + #[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)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoIndexedCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoIndexedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: testTwoIndexedReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for testTwoIndexedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for testTwoIndexedCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = testTwoIndexedReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "testTwoIndexed()"; + const SELECTOR: [u8; 4] = [51u8, 139u8, 83u8, 138u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) + } + } + }; + ///Container for all the [`EventEmitter`](self) function calls. + pub enum EventEmitterCalls { + increment(incrementCall), + number(numberCall), + testNoIOneD(testNoIOneDCall), + testNoITwoD(testNoITwoDCall), + testNoIndexed(testNoIndexedCall), + testOneData(testOneDataCall), + testOneIOneD(testOneIOneDCall), + testOneITwoD(testOneITwoDCall), + testOneIndexed(testOneIndexedCall), + testThreeIndexed(testThreeIndexedCall), + testTwoData(testTwoDataCall), + testTwoIOneD(testTwoIOneDCall), + testTwoITwoD(testTwoITwoDCall), + testTwoIndexed(testTwoIndexedCall), + } + #[automatically_derived] + impl EventEmitterCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [0u8, 60u8, 126u8, 86u8], + [0u8, 216u8, 59u8, 85u8], + [45u8, 195u8, 71u8, 100u8], + [49u8, 193u8, 198u8, 59u8], + [51u8, 139u8, 83u8, 138u8], + [66u8, 130u8, 237u8, 88u8], + [67u8, 105u8, 247u8, 40u8], + [70u8, 214u8, 167u8, 181u8], + [99u8, 235u8, 112u8, 240u8], + [114u8, 157u8, 69u8, 32u8], + [131u8, 129u8, 245u8, 138u8], + [177u8, 224u8, 87u8, 169u8], + [192u8, 36u8, 32u8, 0u8], + [208u8, 157u8, 224u8, 138u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for EventEmitterCalls { + const NAME: &'static str = "EventEmitterCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 14usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::increment(_) => ::SELECTOR, + Self::number(_) => ::SELECTOR, + Self::testNoIOneD(_) => ::SELECTOR, + Self::testNoITwoD(_) => ::SELECTOR, + Self::testNoIndexed(_) => ::SELECTOR, + Self::testOneData(_) => ::SELECTOR, + Self::testOneIOneD(_) => ::SELECTOR, + Self::testOneITwoD(_) => ::SELECTOR, + Self::testOneIndexed(_) => { + ::SELECTOR + } + Self::testThreeIndexed(_) => { + ::SELECTOR + } + Self::testTwoData(_) => ::SELECTOR, + Self::testTwoIOneD(_) => ::SELECTOR, + Self::testTwoITwoD(_) => ::SELECTOR, + Self::testTwoIndexed(_) => { + ::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], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) + -> alloy_sol_types::Result] = &[ + { + fn testOneData( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testOneData) + } + testOneData + }, + { + fn testOneITwoD( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testOneITwoD) + } + testOneITwoD + }, + { + fn testTwoData( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testTwoData) + } + testTwoData + }, + { + fn testThreeIndexed( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testThreeIndexed) + } + testThreeIndexed + }, + { + fn testTwoIndexed( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testTwoIndexed) + } + testTwoIndexed + }, + { + fn testNoIndexed( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testNoIndexed) + } + testNoIndexed + }, + { + fn testOneIOneD( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testOneIOneD) + } + testOneIOneD + }, + { + fn testNoITwoD( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testNoITwoD) + } + testNoITwoD + }, + { + fn testTwoIOneD( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testTwoIOneD) + } + testTwoIOneD + }, + { + fn testOneIndexed( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testOneIndexed) + } + testOneIndexed + }, + { + fn number( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data, validate) + .map(EventEmitterCalls::number) + } + number + }, + { + fn testTwoITwoD( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testTwoITwoD) + } + testTwoITwoD + }, + { + fn testNoIOneD( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(EventEmitterCalls::testNoIOneD) + } + testNoIOneD + }, + { + fn increment( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data, validate) + .map(EventEmitterCalls::increment) + } + increment + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); + }; + DECODE_SHIMS[idx](data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::increment(inner) => { + ::abi_encoded_size(inner) + } + Self::number(inner) => { + ::abi_encoded_size(inner) + } + Self::testNoIOneD(inner) => { + ::abi_encoded_size(inner) + } + Self::testNoITwoD(inner) => { + ::abi_encoded_size(inner) + } + Self::testNoIndexed(inner) => { + ::abi_encoded_size(inner) + } + Self::testOneData(inner) => { + ::abi_encoded_size(inner) + } + Self::testOneIOneD(inner) => { + ::abi_encoded_size(inner) + } + Self::testOneITwoD(inner) => { + ::abi_encoded_size(inner) + } + Self::testOneIndexed(inner) => { + ::abi_encoded_size(inner) + } + Self::testThreeIndexed(inner) => { + ::abi_encoded_size(inner) + } + Self::testTwoData(inner) => { + ::abi_encoded_size(inner) + } + Self::testTwoIOneD(inner) => { + ::abi_encoded_size(inner) + } + Self::testTwoITwoD(inner) => { + ::abi_encoded_size(inner) + } + Self::testTwoIndexed(inner) => { + ::abi_encoded_size(inner) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::increment(inner) => { + ::abi_encode_raw(inner, out) + } + Self::number(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testNoIOneD(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testNoITwoD(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testNoIndexed(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testOneData(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testOneIOneD(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testOneITwoD(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testOneIndexed(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testThreeIndexed(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testTwoData(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testTwoIOneD(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testTwoITwoD(inner) => { + ::abi_encode_raw(inner, out) + } + Self::testTwoIndexed(inner) => { + ::abi_encode_raw(inner, out) + } + } + } + } + ///Container for all the [`EventEmitter`](self) events. + pub enum EventEmitterEvents { + noIOneD(noIOneD), + noITwoD(noITwoD), + noIndexed(noIndexed), + oneData(oneData), + oneIOneD(oneIOneD), + oneITwoD(oneITwoD), + oneIndexed(oneIndexed), + threeIndexed(threeIndexed), + twoData(twoData), + twoIOneD(twoIOneD), + twoITwoD(twoITwoD), + twoIndexed(twoIndexed), + } + #[automatically_derived] + impl EventEmitterEvents { + /// 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]] = &[ + [ + 0u8, 247u8, 199u8, 79u8, 5u8, 51u8, 170u8, 21u8, 229u8, 172u8, 124u8, 175u8, 169u8, + 249u8, 38u8, 29u8, 20u8, 218u8, 30u8, 120u8, 131u8, 13u8, 235u8, 167u8, 17u8, 15u8, + 188u8, 121u8, 0u8, 30u8, 209u8, 94u8, + ], + [ + 4u8, 247u8, 251u8, 40u8, 158u8, 81u8, 234u8, 153u8, 150u8, 236u8, 152u8, 230u8, + 47u8, 244u8, 182u8, 81u8, 190u8, 207u8, 166u8, 229u8, 63u8, 59u8, 133u8, 11u8, + 226u8, 9u8, 182u8, 151u8, 65u8, 198u8, 111u8, 36u8, + ], + [ + 22u8, 135u8, 24u8, 192u8, 177u8, 235u8, 107u8, 253u8, 123u8, 14u8, 222u8, 206u8, + 165u8, 198u8, 252u8, 101u8, 2u8, 115u8, 122u8, 215u8, 58u8, 76u8, 159u8, 82u8, + 255u8, 167u8, 229u8, 83u8, 200u8, 235u8, 159u8, 83u8, + ], + [ + 29u8, 24u8, 222u8, 44u8, 216u8, 121u8, 138u8, 28u8, 41u8, 185u8, 37u8, 89u8, 48u8, + 200u8, 7u8, 235u8, 108u8, 132u8, 174u8, 10u8, 203u8, 34u8, 25u8, 172u8, 187u8, + 17u8, 224u8, 246u8, 92u8, 248u8, 19u8, 233u8, + ], + [ + 47u8, 166u8, 21u8, 23u8, 221u8, 249u8, 220u8, 127u8, 47u8, 61u8, 92u8, 167u8, 36u8, + 20u8, 160u8, 28u8, 131u8, 77u8, 156u8, 91u8, 183u8, 195u8, 54u8, 201u8, 119u8, + 66u8, 60u8, 133u8, 9u8, 75u8, 186u8, 97u8, + ], + [ + 59u8, 178u8, 214u8, 51u8, 120u8, 130u8, 250u8, 165u8, 82u8, 108u8, 248u8, 6u8, + 201u8, 118u8, 57u8, 4u8, 169u8, 15u8, 51u8, 99u8, 89u8, 13u8, 212u8, 56u8, 105u8, + 19u8, 227u8, 252u8, 216u8, 162u8, 225u8, 209u8, + ], + [ + 75u8, 146u8, 34u8, 154u8, 190u8, 32u8, 74u8, 48u8, 215u8, 176u8, 136u8, 216u8, + 17u8, 2u8, 145u8, 118u8, 9u8, 52u8, 214u8, 91u8, 60u8, 150u8, 6u8, 128u8, 173u8, + 148u8, 224u8, 95u8, 82u8, 168u8, 134u8, 5u8, + ], + [ + 166u8, 186u8, 241u8, 77u8, 143u8, 17u8, 215u8, 164u8, 73u8, 112u8, 137u8, 187u8, + 63u8, 202u8, 10u8, 223u8, 195u8, 72u8, 55u8, 207u8, 177u8, 244u8, 170u8, 55u8, 6u8, + 52u8, 211u8, 110u8, 240u8, 48u8, 91u8, 70u8, + ], + [ + 194u8, 128u8, 154u8, 26u8, 47u8, 185u8, 93u8, 132u8, 207u8, 220u8, 72u8, 140u8, + 219u8, 50u8, 10u8, 20u8, 76u8, 21u8, 143u8, 141u8, 68u8, 131u8, 108u8, 156u8, 45u8, + 75u8, 173u8, 186u8, 8u8, 43u8, 253u8, 250u8, + ], + [ + 239u8, 76u8, 136u8, 25u8, 52u8, 152u8, 223u8, 35u8, 127u8, 3u8, 144u8, 85u8, 209u8, + 33u8, 42u8, 194u8, 163u8, 185u8, 62u8, 216u8, 174u8, 168u8, 140u8, 129u8, 67u8, + 18u8, 229u8, 15u8, 106u8, 50u8, 89u8, 45u8, + ], + [ + 240u8, 61u8, 41u8, 117u8, 63u8, 189u8, 90u8, 194u8, 9u8, 186u8, 184u8, 138u8, + 153u8, 179u8, 150u8, 188u8, 194u8, 92u8, 62u8, 114u8, 83u8, 13u8, 2u8, 200u8, 26u8, + 234u8, 77u8, 50u8, 74u8, 179u8, 215u8, 66u8, + ], + [ + 245u8, 127u8, 67u8, 62u8, 185u8, 73u8, 60u8, 244u8, 217u8, 203u8, 87u8, 99u8, + 193u8, 34u8, 33u8, 217u8, 176u8, 149u8, 128u8, 70u8, 68u8, 212u8, 238u8, 0u8, + 106u8, 120u8, 199u8, 32u8, 118u8, 207u8, 249u8, 71u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for EventEmitterEvents { + const NAME: &'static str = "EventEmitterEvents"; + const COUNT: usize = 12usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::noIOneD) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::noITwoD) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::noIndexed) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::oneData) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::oneIOneD) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::oneITwoD) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, data, validate, + ) + .map(Self::oneIndexed) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, data, validate, + ) + .map(Self::threeIndexed) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::twoData) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::twoIOneD) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data, validate) + .map(Self::twoITwoD) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, data, validate, + ) + .map(Self::twoIndexed) + } + _ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::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 EventEmitterEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::noIOneD(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::noITwoD(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::noIndexed(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::oneData(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::oneIOneD(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::oneITwoD(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::oneIndexed(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::threeIndexed(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::twoData(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::twoIOneD(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::twoITwoD(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::twoIndexed(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::noIOneD(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::noITwoD(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::noIndexed(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::oneData(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::oneIOneD(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::oneITwoD(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::oneIndexed(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::threeIndexed(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::twoData(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::twoIOneD(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::twoITwoD(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::twoIndexed(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`EventEmitter`](self) contract instance. + + See the [wrapper's documentation](`EventEmitterInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> EventEmitterInstance { + EventEmitterInstance::::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< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future>> + { + EventEmitterInstance::::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< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { + EventEmitterInstance::::deploy_builder(provider) + } + /**A [`EventEmitter`](self) instance. + + Contains type-safe methods for interacting with an on-chain instance of the + [`EventEmitter`](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 EventEmitterInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for EventEmitterInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("EventEmitterInstance") + .field(&self.address) + .finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > EventEmitterInstance + { + /**Creates a new wrapper around an on-chain [`EventEmitter`](self) contract instance. + + See the [wrapper's documentation](`EventEmitterInstance`) for more details.*/ + #[inline] + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { + Self { + address, + provider, + _network_transport: ::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> { + 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 { + 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 EventEmitterInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> EventEmitterInstance { + EventEmitterInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > EventEmitterInstance + { + /// 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( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`increment`] function. + pub fn increment(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&incrementCall {}) + } + ///Creates a new call builder for the [`number`] function. + pub fn number(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&numberCall {}) + } + ///Creates a new call builder for the [`testNoIOneD`] function. + pub fn testNoIOneD(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testNoIOneDCall {}) + } + ///Creates a new call builder for the [`testNoITwoD`] function. + pub fn testNoITwoD(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testNoITwoDCall {}) + } + ///Creates a new call builder for the [`testNoIndexed`] function. + pub fn testNoIndexed(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testNoIndexedCall {}) + } + ///Creates a new call builder for the [`testOneData`] function. + pub fn testOneData(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testOneDataCall {}) + } + ///Creates a new call builder for the [`testOneIOneD`] function. + pub fn testOneIOneD(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testOneIOneDCall {}) + } + ///Creates a new call builder for the [`testOneITwoD`] function. + pub fn testOneITwoD(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testOneITwoDCall {}) + } + ///Creates a new call builder for the [`testOneIndexed`] function. + pub fn testOneIndexed( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&testOneIndexedCall {}) + } + ///Creates a new call builder for the [`testThreeIndexed`] function. + pub fn testThreeIndexed( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&testThreeIndexedCall {}) + } + ///Creates a new call builder for the [`testTwoData`] function. + pub fn testTwoData(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testTwoDataCall {}) + } + ///Creates a new call builder for the [`testTwoIOneD`] function. + pub fn testTwoIOneD(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testTwoIOneDCall {}) + } + ///Creates a new call builder for the [`testTwoITwoD`] function. + pub fn testTwoITwoD(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&testTwoITwoDCall {}) + } + ///Creates a new call builder for the [`testTwoIndexed`] function. + pub fn testTwoIndexed( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&testTwoIndexedCall {}) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > EventEmitterInstance + { + /// 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( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`noIOneD`] event. + pub fn noIOneD_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`noITwoD`] event. + pub fn noITwoD_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`noIndexed`] event. + pub fn noIndexed_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`oneData`] event. + pub fn oneData_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`oneIOneD`] event. + pub fn oneIOneD_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`oneITwoD`] event. + pub fn oneITwoD_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`oneIndexed`] event. + pub fn oneIndexed_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`threeIndexed`] event. + pub fn threeIndexed_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`twoData`] event. + pub fn twoData_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`twoIOneD`] event. + pub fn twoIOneD_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`twoITwoD`] event. + pub fn twoITwoD_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`twoIndexed`] event. + pub fn twoIndexed_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + } +} diff --git a/mp2-v1/tests/common/bindings/mod.rs b/mp2-v1/tests/common/bindings/mod.rs index c8e26af41..6539eb0db 100644 --- a/mp2-v1/tests/common/bindings/mod.rs +++ b/mp2-v1/tests/common/bindings/mod.rs @@ -3,4 +3,5 @@ //! This is autogenerated code. //! Do not manually edit these files. //! These files may be overwritten by the codegen system at any time. +pub mod eventemitter; pub mod simple; diff --git a/mp2-v1/tests/common/bindings/simple.rs b/mp2-v1/tests/common/bindings/simple.rs index c642fe59d..19a40f54d 100644 --- a/mp2-v1/tests/common/bindings/simple.rs +++ b/mp2-v1/tests/common/bindings/simple.rs @@ -221,7 +221,13 @@ interface Simple { } ] ```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] pub mod Simple { use super::*; use alloy::sol_types as alloy_sol_types; @@ -245,7 +251,7 @@ pub mod Simple { pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[P`\x046\x10a\0\xA6W_5`\xE0\x1C\x80cl\xC0\x14\xDE\x11a\0nW\x80cl\xC0\x14\xDE\x14a\x01KW\x80c\xA3\x14\x15\x0F\x14a\x01gW\x80c\xA5\xD6f\xA9\x14a\x01pW\x80c\xC8\xAF:\xA6\x14a\x01\x85W\x80c\xD1^\xC8Q\x14a\x01\x98W\x80c\xF2]T\xF5\x14a\x01\xDAW_\x80\xFD[\x80c\x02\0\"\\\x14a\0\xAAW\x80c\x0C\x16\x16\xC9\x14a\0\xBFW\x80c\x1C\x13C\x15\x14a\0\xD2W\x80c*\xE4&\x86\x14a\0\xE5W\x80ci\x87\xB1\xFB\x14a\x01*W[_\x80\xFD[a\0\xBDa\0\xB86`\x04a\x04\xD3V[a\x01\xEDV[\0[a\0\xBDa\0\xCD6`\x04a\x05\x92V[a\x021V[a\0\xBDa\0\xE06`\x04a\x06rV[a\x03rV[a\x01\ra\0\xF36`\x04a\x06\x9CV[`\x04` R_\x90\x81R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x81V[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\x01=a\x0186`\x04a\x06\x9CV[a\x03\x9FV[`@Q\x90\x81R` \x01a\x01!V[_Ta\x01W\x90`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01a\x01!V[a\x01=`\x01T\x81V[a\x01xa\x03\xBEV[`@Qa\x01!\x91\x90a\x06\xB3V[`\x03Ta\x01\r\x90`\x01`\x01`\xA0\x1B\x03\x16\x81V[a\0\xBDa\x01\xA66`\x04a\x06\x9CV[`\x05\x80T`\x01\x81\x01\x82U_\x91\x90\x91R\x7F\x03kc\x84\xB5\xEC\xA7\x91\xC6'a\x15-\x0Cy\xBB\x06\x04\xC1\x04\xA5\xFBoN\xB0p?1T\xBB=\xB0\x01UV[a\0\xBDa\x01\xE86`\x04a\x06\x9CV[`\x01UV[_\x80T`\xFF\x19\x16\x85\x15\x15\x17\x90U`\x01\x83\x90U`\x02a\x02\x0B\x83\x82a\x07\x83V[P`\x03\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x92\x90\x92\x16\x91\x90\x91\x17\x90UPPPV[_[\x81Q\x81\x10\x15a\x03nW_\x82\x82\x81Q\x81\x10a\x02OWa\x02Oa\x08WV[` \x02` \x01\x01Q`@\x01Q`\x02\x81\x11\x15a\x02lWa\x02la\x08CV[\x03a\x02\xB3W`\x04_\x83\x83\x81Q\x81\x10a\x02\x86Wa\x02\x86a\x08WV[` \x90\x81\x02\x91\x90\x91\x01\x81\x01QQ\x82R\x81\x01\x91\x90\x91R`@\x01_ \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90Ua\x03fV[`\x02\x82\x82\x81Q\x81\x10a\x02\xC7Wa\x02\xC7a\x08WV[` \x02` \x01\x01Q`@\x01Q`\x02\x81\x11\x15a\x02\xE4Wa\x02\xE4a\x08CV[\x14\x80a\x03\x1EWP`\x01\x82\x82\x81Q\x81\x10a\x02\xFFWa\x02\xFFa\x08WV[` \x02` \x01\x01Q`@\x01Q`\x02\x81\x11\x15a\x03\x1CWa\x03\x1Ca\x08CV[\x14[\x15a\x03fWa\x03f\x82\x82\x81Q\x81\x10a\x038Wa\x038a\x08WV[` \x02` \x01\x01Q_\x01Q\x83\x83\x81Q\x81\x10a\x03UWa\x03Ua\x08WV[` \x02` \x01\x01Q` \x01Qa\x03rV[`\x01\x01a\x023V[PPV[_\x91\x82R`\x04` R`@\x90\x91 \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x90\x92\x16\x91\x90\x91\x17\x90UV[`\x05\x81\x81T\x81\x10a\x03\xAEW_\x80\xFD[_\x91\x82R` \x90\x91 \x01T\x90P\x81V[`\x02\x80Ta\x03\xCB\x90a\x06\xFFV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03\xF7\x90a\x06\xFFV[\x80\x15a\x04BW\x80`\x1F\x10a\x04\x19Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x04BV[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x04%W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x81V[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[`@Q``\x81\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x82\x82\x10\x17\x15a\x04\x81Wa\x04\x81a\x04JV[`@R\x90V[`@Q`\x1F\x82\x01`\x1F\x19\x16\x81\x01g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x82\x82\x10\x17\x15a\x04\xB0Wa\x04\xB0a\x04JV[`@R\x91\x90PV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x04\xCEW_\x80\xFD[\x91\x90PV[_\x80_\x80`\x80\x85\x87\x03\x12\x15a\x04\xE6W_\x80\xFD[\x845\x80\x15\x15\x81\x14a\x04\xF5W_\x80\xFD[\x93P` \x85\x81\x015\x93P`@\x86\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x05\x19W_\x80\xFD[\x81\x88\x01\x91P\x88`\x1F\x83\x01\x12a\x05,W_\x80\xFD[\x815\x81\x81\x11\x15a\x05>Wa\x05>a\x04JV[a\x05P`\x1F\x82\x01`\x1F\x19\x16\x85\x01a\x04\x87V[\x91P\x80\x82R\x89\x84\x82\x85\x01\x01\x11\x15a\x05eW_\x80\xFD[\x80\x84\x84\x01\x85\x84\x017_\x84\x82\x84\x01\x01RP\x80\x94PPPPa\x05\x87``\x86\x01a\x04\xB8V[\x90P\x92\x95\x91\x94P\x92PV[_` \x80\x83\x85\x03\x12\x15a\x05\xA3W_\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x05\xBAW_\x80\xFD[\x81\x85\x01\x91P\x85`\x1F\x83\x01\x12a\x05\xCDW_\x80\xFD[\x815\x81\x81\x11\x15a\x05\xDFWa\x05\xDFa\x04JV[a\x05\xED\x84\x82`\x05\x1B\x01a\x04\x87V[\x81\x81R\x84\x81\x01\x92P``\x91\x82\x02\x84\x01\x85\x01\x91\x88\x83\x11\x15a\x06\x0BW_\x80\xFD[\x93\x85\x01\x93[\x82\x85\x10\x15a\x06fW\x80\x85\x8A\x03\x12\x15a\x06&W_\x80\xFD[a\x06.a\x04^V[\x855\x81Ra\x06=\x87\x87\x01a\x04\xB8V[\x87\x82\x01R`@\x80\x87\x015`\x03\x81\x10a\x06SW_\x80\xFD[\x90\x82\x01R\x84R\x93\x84\x01\x93\x92\x85\x01\x92a\x06\x10V[P\x97\x96PPPPPPPV[_\x80`@\x83\x85\x03\x12\x15a\x06\x83W_\x80\xFD[\x825\x91Pa\x06\x93` \x84\x01a\x04\xB8V[\x90P\x92P\x92\x90PV[_` \x82\x84\x03\x12\x15a\x06\xACW_\x80\xFD[P5\x91\x90PV[_` \x80\x83R\x83Q\x80` \x85\x01R_[\x81\x81\x10\x15a\x06\xDFW\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x06\xC3V[P_`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x07\x13W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x071WcNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x07~W\x80_R` _ `\x1F\x84\x01`\x05\x1C\x81\x01` \x85\x10\x15a\x07\\WP\x80[`\x1F\x84\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x07{W_\x81U`\x01\x01a\x07hV[PP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x07\x9DWa\x07\x9Da\x04JV[a\x07\xB1\x81a\x07\xAB\x84Ta\x06\xFFV[\x84a\x077V[` \x80`\x1F\x83\x11`\x01\x81\x14a\x07\xE4W_\x84\x15a\x07\xCDWP\x85\x83\x01Q[_\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x08;V[_\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a\x08\x12W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x07\xF3V[P\x85\x82\x10\x15a\x08/W\x87\x85\x01Q_\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PP`\x01\x84`\x01\x1B\x01\x85U[PPPPPPV[cNH{q`\xE0\x1B_R`!`\x04R`$_\xFD[cNH{q`\xE0\x1B_R`2`\x04R`$_\xFD\xFE\xA2dipfsX\"\x12 \xE0\x959\x7F\xFD\xC7\xD1\xEB{\"\xEEI,\x14\x95*$01F_\x1C\xC6\xF6\x90RO\xECF\xFC\xC6;dsolcC\0\x08\x18\x003", ); - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct MappingOperation(u8); const _: () = { @@ -357,14 +363,19 @@ pub mod Simple { /**```solidity struct MappingChange { uint256 key; address value; MappingOperation operation; } ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct MappingChange { - pub key: alloy::sol_types::private::U256, + pub key: alloy::sol_types::private::primitives::aliases::U256, pub value: alloy::sol_types::private::Address, pub operation: ::RustType, } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[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)] @@ -375,7 +386,7 @@ pub mod Simple { ); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::U256, + alloy::sol_types::private::primitives::aliases::U256, alloy::sol_types::private::Address, ::RustType, ); @@ -559,23 +570,28 @@ pub mod Simple { ```solidity function addToArray(uint256 value) external; ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addToArrayCall { - pub value: alloy::sol_types::private::U256, + pub value: alloy::sol_types::private::primitives::aliases::U256, } ///Container type for the return parameters of the [`addToArray(uint256)`](addToArrayCall) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addToArrayReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[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)] type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { @@ -668,25 +684,30 @@ pub mod Simple { ```solidity function arr1(uint256) external view returns (uint256); ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct arr1Call { - pub _0: alloy::sol_types::private::U256, + pub _0: alloy::sol_types::private::primitives::aliases::U256, } ///Container type for the return parameters of the [`arr1(uint256)`](arr1Call) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct arr1Return { - pub _0: alloy::sol_types::private::U256, + pub _0: alloy::sol_types::private::primitives::aliases::U256, } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[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)] type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { @@ -715,7 +736,7 @@ pub mod Simple { #[doc(hidden)] type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { @@ -779,17 +800,22 @@ pub mod Simple { ```solidity function changeMapping(MappingChange[] memory changes) external; ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct changeMappingCall { pub changes: alloy::sol_types::private::Vec<::RustType>, } ///Container type for the return parameters of the [`changeMapping((uint256,address,uint8)[])`](changeMappingCall) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct changeMappingReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] const _: () = { use alloy::sol_types as alloy_sol_types; { @@ -893,25 +919,30 @@ pub mod Simple { ```solidity function m1(uint256) external view returns (address); ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct m1Call { - pub _0: alloy::sol_types::private::U256, + pub _0: alloy::sol_types::private::primitives::aliases::U256, } ///Container type for the return parameters of the [`m1(uint256)`](m1Call) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct m1Return { pub _0: alloy::sol_types::private::Address, } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[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)] type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { @@ -1004,16 +1035,21 @@ pub mod Simple { ```solidity function s1() external view returns (bool); ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s1Call {} ///Container type for the return parameters of the [`s1()`](s1Call) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s1Return { pub _0: bool, } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] const _: () = { use alloy::sol_types as alloy_sol_types; { @@ -1109,16 +1145,21 @@ pub mod Simple { ```solidity function s2() external view returns (uint256); ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s2Call {} ///Container type for the return parameters of the [`s2()`](s2Call) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s2Return { - pub _0: alloy::sol_types::private::U256, + pub _0: alloy::sol_types::private::primitives::aliases::U256, } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] const _: () = { use alloy::sol_types as alloy_sol_types; { @@ -1154,7 +1195,7 @@ pub mod Simple { #[doc(hidden)] type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { @@ -1214,16 +1255,21 @@ pub mod Simple { ```solidity function s3() external view returns (string memory); ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s3Call {} ///Container type for the return parameters of the [`s3()`](s3Call) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s3Return { pub _0: alloy::sol_types::private::String, } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] const _: () = { use alloy::sol_types as alloy_sol_types; { @@ -1319,16 +1365,21 @@ pub mod Simple { ```solidity function s4() external view returns (address); ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s4Call {} ///Container type for the return parameters of the [`s4()`](s4Call) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct s4Return { pub _0: alloy::sol_types::private::Address, } - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] const _: () = { use alloy::sol_types as alloy_sol_types; { @@ -1424,17 +1475,22 @@ pub mod Simple { ```solidity function setMapping(uint256 key, address value) external; ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setMappingCall { - pub key: alloy::sol_types::private::U256, + pub key: alloy::sol_types::private::primitives::aliases::U256, pub value: alloy::sol_types::private::Address, } ///Container type for the return parameters of the [`setMapping(uint256,address)`](setMappingCall) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setMappingReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] const _: () = { use alloy::sol_types as alloy_sol_types; { @@ -1445,7 +1501,7 @@ pub mod Simple { ); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy::sol_types::private::U256, + alloy::sol_types::private::primitives::aliases::U256, alloy::sol_types::private::Address, ); #[cfg(test)] @@ -1549,23 +1605,28 @@ pub mod Simple { ```solidity function setS2(uint256 newS2) external; ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setS2Call { - pub newS2: alloy::sol_types::private::U256, + pub newS2: alloy::sol_types::private::primitives::aliases::U256, } ///Container type for the return parameters of the [`setS2(uint256)`](setS2Call) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setS2Return {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[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)] type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { @@ -1658,19 +1719,24 @@ pub mod Simple { ```solidity function setSimples(bool newS1, uint256 newS2, string memory newS3, address newS4) external; ```*/ - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setSimplesCall { pub newS1: bool, - pub newS2: alloy::sol_types::private::U256, + pub newS2: alloy::sol_types::private::primitives::aliases::U256, pub newS3: alloy::sol_types::private::String, pub newS4: alloy::sol_types::private::Address, } ///Container type for the return parameters of the [`setSimples(bool,uint256,string,address)`](setSimplesCall) function. - #[allow(non_camel_case_types, non_snake_case)] + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setSimplesReturn {} - #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] const _: () = { use alloy::sol_types as alloy_sol_types; { @@ -1684,7 +1750,7 @@ pub mod Simple { #[doc(hidden)] type UnderlyingRustTuple<'a> = ( bool, - alloy::sol_types::private::U256, + alloy::sol_types::private::primitives::aliases::U256, alloy::sol_types::private::String, alloy::sol_types::private::Address, ); @@ -1861,7 +1927,7 @@ pub mod Simple { Self::SELECTORS.binary_search(&selector).is_ok() } #[inline] - #[allow(unsafe_code, non_snake_case)] + #[allow(non_snake_case)] fn abi_decode_raw( selector: [u8; 4], data: &[u8], @@ -1966,7 +2032,7 @@ pub mod Simple { selector, )); }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + DECODE_SHIMS[idx](data, validate) } #[inline] fn abi_encoded_size(&self) -> usize { @@ -2191,14 +2257,14 @@ pub mod Simple { ///Creates a new call builder for the [`addToArray`] function. pub fn addToArray( &self, - value: alloy::sol_types::private::U256, + value: alloy::sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder { self.call_builder(&addToArrayCall { value }) } ///Creates a new call builder for the [`arr1`] function. pub fn arr1( &self, - _0: alloy::sol_types::private::U256, + _0: alloy::sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder { self.call_builder(&arr1Call { _0 }) } @@ -2214,7 +2280,7 @@ pub mod Simple { ///Creates a new call builder for the [`m1`] function. pub fn m1( &self, - _0: alloy::sol_types::private::U256, + _0: alloy::sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder { self.call_builder(&m1Call { _0 }) } @@ -2237,7 +2303,7 @@ pub mod Simple { ///Creates a new call builder for the [`setMapping`] function. pub fn setMapping( &self, - key: alloy::sol_types::private::U256, + key: alloy::sol_types::private::primitives::aliases::U256, value: alloy::sol_types::private::Address, ) -> alloy_contract::SolCallBuilder { self.call_builder(&setMappingCall { key, value }) @@ -2245,7 +2311,7 @@ pub mod Simple { ///Creates a new call builder for the [`setS2`] function. pub fn setS2( &self, - newS2: alloy::sol_types::private::U256, + newS2: alloy::sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder { self.call_builder(&setS2Call { newS2 }) } @@ -2253,7 +2319,7 @@ pub mod Simple { pub fn setSimples( &self, newS1: bool, - newS2: alloy::sol_types::private::U256, + newS2: alloy::sol_types::private::primitives::aliases::U256, newS3: alloy::sol_types::private::String, newS4: alloy::sol_types::private::Address, ) -> alloy_contract::SolCallBuilder { diff --git a/mp2-v1/tests/common/cases/contract.rs b/mp2-v1/tests/common/cases/contract.rs index c25b3aa44..590016be6 100644 --- a/mp2-v1/tests/common/cases/contract.rs +++ b/mp2-v1/tests/common/cases/contract.rs @@ -1,10 +1,18 @@ -use alloy::{primitives::Address, providers::ProviderBuilder}; +use alloy::{ + network::Ethereum, primitives::Address, providers::RootProvider, transports::Transport, +}; use anyhow::Result; use log::info; -use crate::common::{bindings::simple::Simple, TestContext}; +use crate::common::{ + bindings::{ + eventemitter::EventEmitter::{self, EventEmitterInstance}, + simple::Simple::{self, SimpleInstance}, + }, + TestContext, +}; -use super::indexing::{SimpleSingleValue, UpdateSimpleStorage}; +use super::indexing::{ContractUpdate, ReceiptUpdate, SimpleSingleValue, UpdateSimpleStorage}; pub struct Contract { pub address: Address, @@ -12,13 +20,69 @@ pub struct Contract { } impl Contract { - pub async fn current_single_values(&self, ctx: &TestContext) -> Result { - let provider = ProviderBuilder::new() - .with_recommended_fillers() - .wallet(ctx.wallet()) - .on_http(ctx.rpc_url.parse().unwrap()); + /// Creates a new [`Contract`] from an [`Address`] and `chain_id` + pub fn new(address: Address, chain_id: u64) -> Contract { + Contract { address, chain_id } + } + /// Getter for `chain_id` + pub fn chain_id(&self) -> u64 { + self.chain_id + } + /// Getter for [`Address`] + pub fn address(&self) -> Address { + self.address + } +} - let contract = Simple::new(self.address, &provider); +/// Trait implemented by any test contract. +pub trait TestContract +where + T: Transport + Clone, +{ + /// How this implementor ingests updates. + type Update: ContractUpdate; + /// The actual contract instance. + type Contract; + /// Function that generates a new instance of self given a [`Provider`] and a `chain_id` + fn new(address: Address, provider: &RootProvider) -> Self; + /// Get an instance of the contract. + fn get_instance(&self) -> &Self::Contract; + /// Apply an update to the contract. + async fn apply_update(&self, ctx: &TestContext, update: &Self::Update) -> Result<()> { + let contract = self.get_instance(); + update.apply_to(ctx, contract).await; + info!("Updated contract with new values {:?}", update); + Ok(()) + } +} + +pub struct SimpleContract { + pub instance: SimpleInstance>, +} + +impl TestContract for SimpleContract +where + T: Transport + Clone, +{ + type Update = UpdateSimpleStorage; + + type Contract = SimpleInstance>; + fn new(address: Address, provider: &RootProvider) -> Self { + Self { + instance: Simple::new(address, provider.clone()), + } + } + fn get_instance(&self) -> &Self::Contract { + &self.instance + } +} + +impl SimpleContract +where + T: Transport + Clone, +{ + pub async fn current_single_values(&self) -> Result { + let contract = self.get_instance(); Ok(SimpleSingleValue { s1: contract.s1().call().await.unwrap()._0, @@ -27,20 +91,23 @@ impl Contract { s4: contract.s4().call().await.unwrap()._0, }) } - // Returns the table updated - pub async fn apply_update( - &self, - ctx: &TestContext, - update: &UpdateSimpleStorage, - ) -> Result<()> { - let provider = ProviderBuilder::new() - .with_recommended_fillers() - .wallet(ctx.wallet()) - .on_http(ctx.rpc_url.parse().unwrap()); - - let contract = Simple::new(self.address, &provider); - update.apply_to(&contract).await; - info!("Updated contract with new values {:?}", update); - Ok(()) +} + +pub struct EventContract { + pub instance: EventEmitterInstance, Ethereum>, +} + +impl TestContract for EventContract { + type Update = ReceiptUpdate; + type Contract = EventEmitterInstance>; + + fn new(address: Address, provider: &RootProvider) -> Self { + Self { + instance: EventEmitter::new(address, provider.clone()), + } + } + + fn get_instance(&self) -> &Self::Contract { + &self.instance } } diff --git a/mp2-v1/tests/common/cases/indexing.rs b/mp2-v1/tests/common/cases/indexing.rs index 41bdd24db..4b7e7b79f 100644 --- a/mp2-v1/tests/common/cases/indexing.rs +++ b/mp2-v1/tests/common/cases/indexing.rs @@ -1,6 +1,8 @@ //! Test case for local Simple contract //! Reference `test-contracts/src/Simple.sol` for the details of Simple contract. +use std::future::Future; + use anyhow::Result; use log::{debug, info}; use mp2_v1::{ @@ -11,12 +13,17 @@ use mp2_v1::{ row::{CellCollection, CellInfo, Row, RowTreeKey}, ColumnID, }, - values_extraction::identifier_block_column, + values_extraction::{compute_non_indexed_receipt_column_ids, identifier_block_column}, }; +use plonky2::field::types::PrimeField64; + use ryhope::storage::RoEpochKvStorage; use crate::common::{ - bindings::simple::Simple::{self, MappingChange, MappingOperation}, + bindings::{ + eventemitter::EventEmitter::{self, EventEmitterInstance}, + simple::Simple::{self, MappingChange, MappingOperation}, + }, cases::{ contract::Contract, identifier_for_mapping_key_column, identifier_for_mapping_value_column, @@ -36,13 +43,15 @@ use crate::common::{ }; use super::{ - super::bindings::simple::Simple::SimpleInstance, ContractExtractionArgs, TableIndexing, - TableSource, + super::bindings::simple::Simple::SimpleInstance, table_source::ReceiptExtractionArgs, + ContractExtractionArgs, TableIndexing, TableSource, }; use alloy::{ contract::private::{Network, Provider, Transport}, + network::{Ethereum, TransactionBuilder}, primitives::{Address, U256}, - providers::ProviderBuilder, + providers::{ext::AnvilApi, ProviderBuilder, RootProvider}, + sol_types::SolEvent, }; use mp2_common::{eth::StorageSlot, proof::ProofWithVK, types::HashOutput}; @@ -67,11 +76,15 @@ const CONTRACT_SLOT: usize = 1; pub(crate) const BLOCK_COLUMN_NAME: &str = "block_number"; pub(crate) const MAPPING_VALUE_COLUMN: &str = "map_value"; pub(crate) const MAPPING_KEY_COLUMN: &str = "map_key"; +pub(crate) const TX_INDEX_COLUMN: &str = "tx index"; -impl TableIndexing { +impl TableIndexing { pub(crate) async fn merge_table_test_case( ctx: &mut TestContext, - ) -> Result<(Self, Vec>)> { + ) -> Result<( + TableIndexing, + Vec>, + )> { // Create a provider with the wallet for contract deployment and interaction. let provider = ProviderBuilder::new() .with_recommended_fillers() @@ -85,10 +98,7 @@ impl TableIndexing { ); let contract_address = contract.address(); let chain_id = ctx.rpc.get_chain_id().await.unwrap(); - let contract = Contract { - address: *contract_address, - chain_id, - }; + let contract = Contract::new(*contract_address, chain_id); let single_source = SingleValuesExtractionArgs { // this test puts the mapping value as secondary index so there is no index for the // single variable slots. @@ -113,8 +123,9 @@ impl TableIndexing { // NOTE: This array is a convenience to handle smart contract updates // manually, but does not need to be stored explicitely by dist system. mapping_keys: vec![], + length_extraction_args: None, }; - let mut source = TableSource::Merge(MergeSource::new(single_source, mapping_source)); + let mut source = MergeSource::new(single_source, mapping_source); let genesis_change = source.init_contract_data(ctx, &contract).await; let single_columns = SINGLE_SLOTS .iter() @@ -179,14 +190,14 @@ impl TableIndexing { let indexing_genesis_block = ctx.block_number().await; let table = Table::new(indexing_genesis_block, "merged_table".to_string(), columns).await; Ok(( - Self { + TableIndexing:: { value_column, - source: source.clone(), + source, table, contract, - contract_extraction: ContractExtractionArgs { + contract_extraction: Some(ContractExtractionArgs { slot: StorageSlot::Simple(CONTRACT_SLOT), - }, + }), }, genesis_change, )) @@ -194,7 +205,10 @@ impl TableIndexing { pub(crate) async fn single_value_test_case( ctx: &mut TestContext, - ) -> Result<(Self, Vec>)> { + ) -> Result<( + TableIndexing, + Vec>, + )> { // Create a provider with the wallet for contract deployment and interaction. let provider = ProviderBuilder::new() .with_recommended_fillers() @@ -213,10 +227,10 @@ impl TableIndexing { chain_id, }; - let mut source = TableSource::SingleValues(SingleValuesExtractionArgs { + let mut source = SingleValuesExtractionArgs { index_slot: Some(INDEX_SLOT), slots: SINGLE_SLOTS.to_vec(), - }); + }; let genesis_updates = source.init_contract_data(ctx, &contract).await; let indexing_genesis_block = ctx.block_number().await; @@ -263,14 +277,14 @@ impl TableIndexing { }; let table = Table::new(indexing_genesis_block, "single_table".to_string(), columns).await; Ok(( - Self { + TableIndexing:: { value_column: "".to_string(), - source: source.clone(), + source, table, contract, - contract_extraction: ContractExtractionArgs { + contract_extraction: Some(ContractExtractionArgs { slot: StorageSlot::Simple(CONTRACT_SLOT), - }, + }), }, genesis_updates, )) @@ -278,7 +292,10 @@ impl TableIndexing { pub(crate) async fn mapping_test_case( ctx: &mut TestContext, - ) -> Result<(Self, Vec>)> { + ) -> Result<( + TableIndexing, + Vec>, + )> { // Create a provider with the wallet for contract deployment and interaction. let provider = ProviderBuilder::new() .with_recommended_fillers() @@ -303,22 +320,19 @@ impl TableIndexing { false => (key_id, MappingIndex::Key(key_id), value_id), }; - let mapping_args = MappingValuesExtractionArgs { + let mut source = MappingValuesExtractionArgs { slot: MAPPING_SLOT, index: mapping_index, // at the beginning there is no mapping key inserted // NOTE: This array is a convenience to handle smart contract updates // manually, but does not need to be stored explicitely by dist system. mapping_keys: vec![], - }; - - let mut source = TableSource::Mapping(( - mapping_args, - Some(LengthExtractionArgs { + length_extraction_args: Some(LengthExtractionArgs { slot: LENGTH_SLOT, value: LENGTH_VALUE, }), - )); + }; + let contract = Contract { address: *contract_address, chain_id, @@ -366,11 +380,11 @@ impl TableIndexing { let table = Table::new(index_genesis_block, "mapping_table".to_string(), columns).await; Ok(( - Self { + TableIndexing:: { value_column, - contract_extraction: ContractExtractionArgs { + contract_extraction: Some(ContractExtractionArgs { slot: StorageSlot::Simple(CONTRACT_SLOT), - }, + }), contract, source, table, @@ -379,6 +393,98 @@ impl TableIndexing { )) } + pub(crate) async fn receipt_test_case( + no_topics: usize, + no_data: usize, + ctx: &mut TestContext, + ) -> Result<(TableIndexing, Vec>)> + where + T: ReceiptExtractionArgs, + [(); ::NO_TOPICS]:, + [(); ::MAX_DATA]:, + { + // Create a provider with the wallet for contract deployment and interaction. + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(ctx.wallet()) + .on_http(ctx.rpc_url.parse().unwrap()); + + let contract = EventEmitter::deploy(&provider).await.unwrap(); + info!( + "Deployed EventEmitter contract at address: {}", + contract.address() + ); + let contract_address = contract.address(); + let chain_id = ctx.rpc.get_chain_id().await.unwrap(); + let contract = Contract { + address: *contract_address, + chain_id, + }; + + // Retrieve the event signature `str` based on `no_topics` and `no_data` + let event_signature = match (no_topics, no_data) { + (0, 0) => EventEmitter::noIndexed::SIGNATURE, + (0, 1) => EventEmitter::noIOneD::SIGNATURE, + (0, 2) => EventEmitter::noITwoD::SIGNATURE, + (1, 0) => EventEmitter::oneIndexed::SIGNATURE, + (1, 1) => EventEmitter::oneIOneD::SIGNATURE, + (1, 2) => EventEmitter::oneITwoD::SIGNATURE, + (2, 0) => EventEmitter::twoIndexed::SIGNATURE, + (2, 1) => EventEmitter::twoIOneD::SIGNATURE, + (2, 2) => EventEmitter::twoITwoD::SIGNATURE, + (3, 0) => EventEmitter::threeIndexed::SIGNATURE, + (3, 1) => EventEmitter::oneData::SIGNATURE, + (3, 2) => EventEmitter::twoData::SIGNATURE, + _ => panic!( + "Events with {} topics and {} additional pieces of data not supported", + no_topics, no_data + ), + }; + + let mut source = T::new(contract.address(), event_signature); + let genesis_updates = source.init_contract_data(ctx, &contract).await; + + let indexing_genesis_block = ctx.block_number().await; + // Defining the columns structure of the table from the source event + // This is depending on what is our data source, mappings and CSV both have their o + // own way of defining their table. + let columns = TableColumns { + primary: TableColumn { + name: BLOCK_COLUMN_NAME.to_string(), + identifier: identifier_block_column(), + index: IndexType::Primary, + multiplier: false, + }, + secondary: TableColumn { + name: TX_INDEX_COLUMN.to_string(), + identifier: source.get_index(), + index: IndexType::Secondary, + // here we put false always since these are not coming from a "merged" table + multiplier: false, + }, + rest: compute_non_indexed_receipt_column_ids(&source.get_event()) + .into_iter() + .map(|(name, identifier)| TableColumn { + name, + identifier: identifier.to_canonical_u64(), + index: IndexType::None, + multiplier: false, + }) + .collect::>(), + }; + let table = Table::new(indexing_genesis_block, "receipt_table".to_string(), columns).await; + Ok(( + TableIndexing:: { + value_column: "".to_string(), + source, + table, + contract, + contract_extraction: None, + }, + genesis_updates, + )) + } + pub async fn run( &mut self, ctx: &mut TestContext, @@ -571,34 +677,39 @@ impl TableIndexing { proof } Err(_) => { - let contract_proof = ctx - .prove_contract_extraction( - &self.contract.address, - self.contract_extraction.slot.clone(), - bn, - ) - .await; - ctx.storage - .store_proof(contract_proof_key, contract_proof.clone())?; - info!( - "Generated Contract Extraction (C.3) proof for block number {}", - bn - ); - { - let pvk = ProofWithVK::deserialize(&contract_proof)?; - let pis = - contract_extraction::PublicInputs::from_slice(&pvk.proof().public_inputs); - debug!( - " CONTRACT storage root pis.storage_root() {:?}", - hex::encode( - pis.root_hash_field() - .into_iter() - .flat_map(|u| u.to_be_bytes()) - .collect::>() + if let Some(contract_extraction) = &self.contract_extraction { + let contract_proof = ctx + .prove_contract_extraction( + &self.contract.address, + contract_extraction.slot.clone(), + bn, ) + .await; + ctx.storage + .store_proof(contract_proof_key, contract_proof.clone())?; + info!( + "Generated Contract Extraction (C.3) proof for block number {}", + bn ); + { + let pvk = ProofWithVK::deserialize(&contract_proof)?; + let pis = contract_extraction::PublicInputs::from_slice( + &pvk.proof().public_inputs, + ); + debug!( + " CONTRACT storage root pis.storage_root() {:?}", + hex::encode( + pis.root_hash_field() + .into_iter() + .flat_map(|u| u.to_be_bytes()) + .collect::>() + ) + ); + } + contract_proof + } else { + vec![] } - contract_proof } }; @@ -768,6 +879,158 @@ impl UpdateSimpleStorage { } } +#[derive(Debug, Clone, Copy)] +pub struct ReceiptUpdate { + pub event_type: (u8, u8), + pub no_relevant: usize, + pub no_others: usize, +} + +impl ReceiptUpdate { + /// Create a new [`ReceiptUpdate`] + pub fn new(event_type: (u8, u8), no_relevant: usize, no_others: usize) -> ReceiptUpdate { + ReceiptUpdate { + event_type, + no_relevant, + no_others, + } + } + + /// Apply an update to an [`EventEmitterInstance`]. + pub async fn apply_update>( + &self, + ctx: &TestContext, + contract: &EventEmitterInstance, + ) { + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(ctx.wallet()) + .on_http(ctx.rpc_url.parse().unwrap()); + + let addresses = ctx.local_node.as_ref().unwrap().addresses(); + + provider.anvil_set_auto_mine(false).await.unwrap(); + + provider.anvil_auto_impersonate_account(true).await.unwrap(); + // Send a bunch of transactions, some of which are related to the event we are testing for. + let mut pending_tx_builders = vec![]; + + for j in 0..(self.no_relevant + self.no_others) { + let (tx_req, address_index) = { + let first_random = rand::random::() % 5; + let second_random = rand::random::() % 5; + let tx_req = if j < self.no_relevant { + self.select_event(contract) + } else { + let random = match first_random { + 0 => contract.testNoIndexed().into_transaction_request(), + 1 => contract.testTwoIndexed().into_transaction_request(), + 2 => contract.testThreeIndexed().into_transaction_request(), + 3 => contract.testOneData().into_transaction_request(), + 4 => contract.testTwoData().into_transaction_request(), + _ => unreachable!(), + }; + + let random_two = match second_random { + 0 => contract.testOneIOneD().into_transaction_request(), + 1 => contract.testTwoIOneD().into_transaction_request(), + 2 => contract.testTwoITwoD().into_transaction_request(), + 3 => contract.testNoIOneD().into_transaction_request(), + 4 => contract.testNoITwoD().into_transaction_request(), + _ => unreachable!(), + }; + match j % 2 { + 0 => random, + 1 => random_two, + _ => unreachable!(), + } + }; + let address_index = rand::random::() % addresses.len(); + (tx_req, address_index) + }; + let sender_address = addresses[address_index]; + + let funding = U256::from(1e18 as u64); + + provider + .anvil_set_balance(sender_address, funding) + .await + .unwrap(); + + let new_req = tx_req.with_from(sender_address); + let tx_req_final = provider + .fill(new_req) + .await + .unwrap() + .as_envelope() + .cloned() + .unwrap(); + pending_tx_builders.push(provider.send_tx_envelope(tx_req_final).await.unwrap()); + } + + provider + .anvil_auto_impersonate_account(false) + .await + .unwrap(); + provider.anvil_set_auto_mine(true).await.unwrap(); + + for pending_tx in pending_tx_builders { + pending_tx.watch().await.unwrap(); + } + } + + fn select_event, N: Network>( + &self, + contract: &EventEmitterInstance, + ) -> N::TransactionRequest { + match self.event_type { + (0, 0) => contract.testNoIndexed().into_transaction_request(), + (1, 0) => contract.testOneIndexed().into_transaction_request(), + (2, 0) => contract.testTwoIndexed().into_transaction_request(), + (3, 0) => contract.testThreeIndexed().into_transaction_request(), + (0, 1) => contract.testNoIOneD().into_transaction_request(), + (0, 2) => contract.testNoITwoD().into_transaction_request(), + (1, 1) => contract.testOneIOneD().into_transaction_request(), + (1, 2) => contract.testOneITwoD().into_transaction_request(), + (2, 1) => contract.testTwoIOneD().into_transaction_request(), + (2, 2) => contract.testTwoITwoD().into_transaction_request(), + (3, 1) => contract.testOneData().into_transaction_request(), + (3, 2) => contract.testTwoData().into_transaction_request(), + _ => contract.testNoIndexed().into_transaction_request(), + } + } +} + +pub trait ContractUpdate: std::fmt::Debug +where + T: Transport + Clone, +{ + type Contract; + + fn apply_to(&self, ctx: &TestContext, contract: &Self::Contract) -> impl Future; +} + +impl ContractUpdate for UpdateSimpleStorage +where + T: Transport + Clone, +{ + type Contract = SimpleInstance>; + + async fn apply_to(&self, _ctx: &TestContext, contract: &Self::Contract) { + self.apply_to(contract).await + } +} + +impl ContractUpdate for ReceiptUpdate +where + T: Transport + Clone, +{ + type Contract = EventEmitterInstance>; + + async fn apply_to(&self, ctx: &TestContext, contract: &Self::Contract) { + self.apply_update(ctx, contract).await + } +} #[derive(Clone, Debug)] pub enum ChangeType { Deletion, @@ -936,12 +1199,12 @@ where } } -impl TableIndexing { - pub fn table_info(&self) -> TableInfo { +impl TableIndexing { + pub fn table_info(&self) -> TableInfo { TableInfo { public_name: self.table.public_name.clone(), value_column: self.value_column.clone(), - chain_id: self.contract.chain_id, + chain_id: self.contract.chain_id(), columns: self.table.columns.clone(), contract_address: self.contract.address, source: self.source.clone(), diff --git a/mp2-v1/tests/common/cases/mod.rs b/mp2-v1/tests/common/cases/mod.rs index c6445467e..58785e952 100644 --- a/mp2-v1/tests/common/cases/mod.rs +++ b/mp2-v1/tests/common/cases/mod.rs @@ -16,11 +16,11 @@ pub mod query; pub mod table_source; /// Test case definition -pub(crate) struct TableIndexing { +pub(crate) struct TableIndexing { pub(crate) table: Table, pub(crate) contract: Contract, - pub(crate) contract_extraction: ContractExtractionArgs, - pub(crate) source: TableSource, + pub(crate) contract_extraction: Option, + pub(crate) source: T, // the column over which we can do queries like ` y > 64`. It is not the address column that we // assume it the secondary index always. pub(crate) value_column: String, diff --git a/mp2-v1/tests/common/cases/query/aggregated_queries.rs b/mp2-v1/tests/common/cases/query/aggregated_queries.rs index 9234fdd3f..e69dde4d2 100644 --- a/mp2-v1/tests/common/cases/query/aggregated_queries.rs +++ b/mp2-v1/tests/common/cases/query/aggregated_queries.rs @@ -73,7 +73,7 @@ use verifiable_db::{ }; use super::{ - GlobalCircuitInput, QueryCircuitInput, RevelationCircuitInput, MAX_NUM_COLUMNS, + GlobalCircuitInput, QueryCircuitInput, RevelationCircuitInput, TableSource, MAX_NUM_COLUMNS, MAX_NUM_ITEMS_PER_OUTPUT, MAX_NUM_OUTPUTS, MAX_NUM_PLACEHOLDERS, MAX_NUM_PREDICATE_OPS, MAX_NUM_RESULT_OPS, }; @@ -920,9 +920,9 @@ pub async fn prove_single_row( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let max = table.row.current_epoch(); let min = max - 1; @@ -947,9 +947,9 @@ pub(crate) async fn cook_query_between_blocks( }) } -pub(crate) async fn cook_query_secondary_index_nonexisting_placeholder( +pub(crate) async fn cook_query_secondary_index_nonexisting_placeholder( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -995,9 +995,9 @@ pub(crate) async fn cook_query_secondary_index_nonexisting_placeholder( // cook up a SQL query on the secondary index and with a predicate on the non-indexed column. // we just iterate on mapping keys and take the one that exist for most blocks. We also choose // a value to filter over the non-indexed column -pub(crate) async fn cook_query_secondary_index_placeholder( +pub(crate) async fn cook_query_secondary_index_placeholder( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -1040,9 +1040,9 @@ pub(crate) async fn cook_query_secondary_index_placeholder( // cook up a SQL query on the secondary index. For that we just iterate on mapping keys and // take the one that exist for most blocks -pub(crate) async fn cook_query_unique_secondary_index( +pub(crate) async fn cook_query_unique_secondary_index( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -1116,9 +1116,9 @@ pub(crate) async fn cook_query_unique_secondary_index( }) } -pub(crate) async fn cook_query_partial_block_range( +pub(crate) async fn cook_query_partial_block_range( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -1152,9 +1152,9 @@ pub(crate) async fn cook_query_partial_block_range( }) } -pub(crate) async fn cook_query_no_matching_entries( +pub(crate) async fn cook_query_no_matching_entries( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let initial_epoch = table.row.initial_epoch(); // choose query bounds outside of the range [initial_epoch, last_epoch] @@ -1184,9 +1184,9 @@ pub(crate) async fn cook_query_no_matching_entries( /// Cook a query where there are no entries satisying the secondary query bounds only for some /// blocks of the primary index bounds (not for all the blocks) -pub(crate) async fn cook_query_non_matching_entries_some_blocks( +pub(crate) async fn cook_query_non_matching_entries_some_blocks( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, true).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); diff --git a/mp2-v1/tests/common/cases/query/mod.rs b/mp2-v1/tests/common/cases/query/mod.rs index 9e40f47d5..ecc529679 100644 --- a/mp2-v1/tests/common/cases/query/mod.rs +++ b/mp2-v1/tests/common/cases/query/mod.rs @@ -25,7 +25,7 @@ use verifiable_db::query::{ use crate::common::{cases::planner::QueryPlanner, table::Table, TableInfo, TestContext}; -use super::table_source::TableSource; +use super::TableSource; pub mod aggregated_queries; pub mod simple_select_queries; @@ -78,15 +78,23 @@ pub struct QueryCooking { pub(crate) offset: Option, } -pub async fn test_query(ctx: &mut TestContext, table: Table, t: TableInfo) -> Result<()> { - match &t.source { - TableSource::Mapping(_) | TableSource::Merge(_) => query_mapping(ctx, &table, &t).await?, - _ => unimplemented!("yet"), +pub async fn test_query( + ctx: &mut TestContext, + table: Table, + t: TableInfo, +) -> Result<()> { + match &t.source.can_query() { + true => query_mapping(ctx, &table, &t).await?, + false => unimplemented!("yet"), } Ok(()) } -async fn query_mapping(ctx: &mut TestContext, table: &Table, info: &TableInfo) -> Result<()> { +async fn query_mapping( + ctx: &mut TestContext, + table: &Table, + info: &TableInfo, +) -> Result<()> { let table_hash = info.metadata_hash(); let query_info = cook_query_between_blocks(table, info).await?; test_query_mapping(ctx, table, query_info, &table_hash).await?; diff --git a/mp2-v1/tests/common/cases/query/simple_select_queries.rs b/mp2-v1/tests/common/cases/query/simple_select_queries.rs index e29226a8b..44e759d85 100644 --- a/mp2-v1/tests/common/cases/query/simple_select_queries.rs +++ b/mp2-v1/tests/common/cases/query/simple_select_queries.rs @@ -42,7 +42,7 @@ use crate::common::{ }, proof_storage::{ProofKey, ProofStorage}, table::Table, - TableInfo, + TableInfo, TableSource, }; use super::QueryCooking; @@ -252,9 +252,9 @@ where /// Cook a query where the number of matching rows is the same as the maximum number of /// outputs allowed -pub(crate) async fn cook_query_with_max_num_matching_rows( +pub(crate) async fn cook_query_with_max_num_matching_rows( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -295,9 +295,9 @@ pub(crate) async fn cook_query_with_max_num_matching_rows( }) } -pub(crate) async fn cook_query_with_matching_rows( +pub(crate) async fn cook_query_with_matching_rows( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -341,9 +341,9 @@ pub(crate) async fn cook_query_with_matching_rows( } /// Cook a query where the offset is big enough to have no matching rows -pub(crate) async fn cook_query_too_big_offset( +pub(crate) async fn cook_query_too_big_offset( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -384,9 +384,9 @@ pub(crate) async fn cook_query_too_big_offset( }) } -pub(crate) async fn cook_query_no_matching_rows( +pub(crate) async fn cook_query_no_matching_rows( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let initial_epoch = table.index.initial_epoch(); let current_epoch = table.index.current_epoch(); @@ -430,9 +430,9 @@ pub(crate) async fn cook_query_no_matching_rows( }) } -pub(crate) async fn cook_query_with_distinct( +pub(crate) async fn cook_query_with_distinct( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -473,10 +473,10 @@ pub(crate) async fn cook_query_with_distinct( }) } -pub(crate) async fn cook_query_with_wildcard( +pub(crate) async fn cook_query_with_wildcard( table: &Table, distinct: bool, - info: &TableInfo, + info: &TableInfo, ) -> Result { let (longest_key, (min_block, max_block)) = find_longest_lived_key(table, false).await?; let key_value = hex::encode(longest_key.value.to_be_bytes_trimmed_vec()); @@ -527,16 +527,16 @@ pub(crate) async fn cook_query_with_wildcard( }) } -pub(crate) async fn cook_query_with_wildcard_no_distinct( +pub(crate) async fn cook_query_with_wildcard_no_distinct( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { cook_query_with_wildcard(table, false, info).await } -pub(crate) async fn cook_query_with_wildcard_and_distinct( +pub(crate) async fn cook_query_with_wildcard_and_distinct( table: &Table, - info: &TableInfo, + info: &TableInfo, ) -> Result { cook_query_with_wildcard(table, true, info).await } diff --git a/mp2-v1/tests/common/cases/table_source.rs b/mp2-v1/tests/common/cases/table_source.rs index 01f0497d6..8eb572b3a 100644 --- a/mp2-v1/tests/common/cases/table_source.rs +++ b/mp2-v1/tests/common/cases/table_source.rs @@ -1,5 +1,8 @@ use std::{ assert_matches::assert_matches, + fmt::Debug, + future::Future, + hash::Hash, str::FromStr, sync::atomic::{AtomicU64, AtomicUsize}, }; @@ -7,34 +10,40 @@ use std::{ use alloy::{ eips::BlockNumberOrTag, primitives::{Address, U256}, - providers::Provider, + providers::{Provider, ProviderBuilder}, }; use anyhow::{bail, Result}; use futures::{future::BoxFuture, FutureExt}; use log::{debug, info}; use mp2_common::{ digest::TableDimension, - eth::{ProofQuery, StorageSlot}, + eth::{EventLogInfo, ProofQuery, StorageSlot}, + poseidon::H, proof::ProofWithVK, - types::HashOutput, + types::{GFp, HashOutput}, }; use mp2_v1::{ - api::{merge_metadata_hash, metadata_hash, SlotInputs}, + api::{combine_digest_and_block, merge_metadata_hash, metadata_hash, MetadataHash, SlotInputs}, indexing::{ block::BlockPrimaryIndex, cell::Cell, row::{RowTreeKey, ToNonce}, }, values_extraction::{ - identifier_for_mapping_key_column, identifier_for_mapping_value_column, - identifier_single_var_column, + compute_receipt_leaf_metadata_digest, identifier_for_mapping_key_column, + identifier_for_mapping_value_column, identifier_single_var_column, }, }; use rand::{Rng, SeedableRng}; use serde::{Deserialize, Serialize}; use crate::common::{ - cases::indexing::{MappingUpdate, SimpleSingleValue, TableRowValues}, + cases::{ + contract::EventContract, + indexing::{ + MappingUpdate, ReceiptUpdate, SimpleSingleValue, TableRowValues, TX_INDEX_COLUMN, + }, + }, final_extraction::{ExtractionProofInput, ExtractionTableProof, MergeExtractionProof}, proof_storage::{ProofKey, ProofStorage}, rowtree::SecondaryIndexCell, @@ -43,7 +52,7 @@ use crate::common::{ }; use super::{ - contract::Contract, + contract::{Contract, SimpleContract, TestContract}, indexing::{ChangeType, TableRowUpdate, UpdateSimpleStorage, UpdateType}, }; @@ -66,7 +75,7 @@ impl From<(U256, U256)> for UniqueMappingEntry { /// What is the secondary index chosen for the table in the mapping. /// Each entry contains the identifier of the column expected to store in our tree -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Hash, Copy)] pub enum MappingIndex { Key(u64), Value(u64), @@ -182,87 +191,168 @@ impl UniqueMappingEntry { } } -#[derive(Serialize, Deserialize, Debug, Hash, Clone, PartialEq, Eq)] -pub(crate) enum TableSource { - /// Test arguments for single values extraction (C.1) - SingleValues(SingleValuesExtractionArgs), - /// Test arguments for mapping values extraction (C.1) - /// We can test with and without the length - Mapping((MappingValuesExtractionArgs, Option)), - Merge(MergeSource), +pub(crate) trait TableSource: Serialize + for<'de> Deserialize<'de> { + type Metadata; + + fn get_data(&self) -> Self::Metadata; + + fn init_contract_data<'a>( + &'a mut self, + ctx: &'a mut TestContext, + contract: &'a Contract, + ) -> BoxFuture<'a, Vec>>; + + fn generate_extraction_proof_inputs( + &self, + ctx: &mut TestContext, + contract: &Contract, + value_key: ProofKey, + ) -> impl Future>; + + fn random_contract_update<'a>( + &'a mut self, + ctx: &'a mut TestContext, + contract: &'a Contract, + c: ChangeType, + ) -> BoxFuture<'a, Vec>>; + + fn metadata_hash(&self, contract_address: Address, chain_id: u64) -> MetadataHash; + + fn can_query(&self) -> bool; } -impl TableSource { - pub fn slot_input(&self) -> SlotInputs { - match self { - TableSource::SingleValues(single) => SlotInputs::Simple(single.slots.clone()), - TableSource::Mapping((m, _)) => SlotInputs::Mapping(m.slot), - TableSource::Merge(_) => panic!("can't call slot inputs on merge table"), - } +impl TableSource for SingleValuesExtractionArgs { + type Metadata = SlotInputs; + + fn get_data(&self) -> SlotInputs { + SlotInputs::Simple(self.slots.clone()) } - #[allow(elided_named_lifetimes)] - pub fn init_contract_data<'a>( + fn init_contract_data<'a>( &'a mut self, ctx: &'a mut TestContext, contract: &'a Contract, - ) -> BoxFuture>> { - async move { - match self { - TableSource::SingleValues(ref mut s) => s.init_contract_data(ctx, contract).await, - TableSource::Mapping((ref mut m, _)) => m.init_contract_data(ctx, contract).await, - TableSource::Merge(ref mut merge) => merge.init_contract_data(ctx, contract).await, - } - } - .boxed() + ) -> BoxFuture<'a, Vec>> { + async move { SingleValuesExtractionArgs::init_contract_data(self, ctx, contract).await } + .boxed() } - pub async fn generate_extraction_proof_inputs( + async fn generate_extraction_proof_inputs( &self, ctx: &mut TestContext, contract: &Contract, value_key: ProofKey, ) -> Result<(ExtractionProofInput, HashOutput)> { - match self { - // first lets do without length - TableSource::Mapping((ref mapping, _)) => { - mapping - .generate_extraction_proof_inputs(ctx, contract, value_key) - .await - } - TableSource::SingleValues(ref args) => { - args.generate_extraction_proof_inputs(ctx, contract, value_key) - .await - } - TableSource::Merge(ref merge) => { - merge - .generate_extraction_proof_inputs(ctx, contract, value_key) - .await - } - } + SingleValuesExtractionArgs::generate_extraction_proof_inputs(self, ctx, contract, value_key) + .await } - #[allow(elided_named_lifetimes)] - pub fn random_contract_update<'a>( + fn random_contract_update<'a>( &'a mut self, ctx: &'a mut TestContext, contract: &'a Contract, c: ChangeType, - ) -> BoxFuture>> { - async move { - match self { - TableSource::Mapping((ref mut mapping, _)) => { - mapping.random_contract_update(ctx, contract, c).await - } - TableSource::SingleValues(ref v) => { - v.random_contract_update(ctx, contract, c).await - } - TableSource::Merge(ref mut merge) => { - merge.random_contract_update(ctx, contract, c).await - } - } - } - .boxed() + ) -> BoxFuture<'a, Vec>> { + async move { SingleValuesExtractionArgs::random_contract_update(self, ctx, contract, c).await }.boxed() + } + + fn metadata_hash(&self, contract_address: Address, chain_id: u64) -> MetadataHash { + let slot = self.get_data(); + metadata_hash(slot, &contract_address, chain_id, vec![]) + } + + fn can_query(&self) -> bool { + false + } +} + +impl TableSource for MappingValuesExtractionArgs { + type Metadata = SlotInputs; + + fn get_data(&self) -> SlotInputs { + SlotInputs::Mapping(self.slot) + } + + fn init_contract_data<'a>( + &'a mut self, + ctx: &'a mut TestContext, + contract: &'a Contract, + ) -> BoxFuture<'a, Vec>> { + async move { MappingValuesExtractionArgs::init_contract_data(self, ctx, contract).await } + .boxed() + } + + async fn generate_extraction_proof_inputs( + &self, + ctx: &mut TestContext, + contract: &Contract, + value_key: ProofKey, + ) -> Result<(ExtractionProofInput, HashOutput)> { + MappingValuesExtractionArgs::generate_extraction_proof_inputs( + self, ctx, contract, value_key, + ) + .await + } + + fn random_contract_update<'a>( + &'a mut self, + ctx: &'a mut TestContext, + contract: &'a Contract, + c: ChangeType, + ) -> BoxFuture<'a, Vec>> { + async move { MappingValuesExtractionArgs::random_contract_update(self, ctx, contract, c).await }.boxed() + } + + fn metadata_hash(&self, contract_address: Address, chain_id: u64) -> MetadataHash { + let slot = self.get_data(); + metadata_hash(slot, &contract_address, chain_id, vec![]) + } + + fn can_query(&self) -> bool { + true + } +} + +impl TableSource for MergeSource { + type Metadata = (SlotInputs, SlotInputs); + + fn get_data(&self) -> Self::Metadata { + (self.single.get_data(), self.mapping.get_data()) + } + + fn init_contract_data<'a>( + &'a mut self, + ctx: &'a mut TestContext, + contract: &'a Contract, + ) -> BoxFuture<'a, Vec>> { + async move { MergeSource::init_contract_data(self, ctx, contract).await }.boxed() + } + + async fn generate_extraction_proof_inputs( + &self, + ctx: &mut TestContext, + contract: &Contract, + value_key: ProofKey, + ) -> Result<(ExtractionProofInput, HashOutput)> { + MergeSource::generate_extraction_proof_inputs(self, ctx, contract, value_key).await + } + + fn random_contract_update<'a>( + &'a mut self, + ctx: &'a mut TestContext, + contract: &'a Contract, + c: ChangeType, + ) -> BoxFuture<'a, Vec>> { + async move { MergeSource::random_contract_update(self, ctx, contract, c).await }.boxed() + } + + fn metadata_hash(&self, contract_address: Address, chain_id: u64) -> MetadataHash { + let (single, mapping) = self.get_data(); + merge_metadata_hash(contract_address, chain_id, vec![], single, mapping) + } + + fn can_query(&self) -> bool { + true } } @@ -291,7 +381,13 @@ impl SingleValuesExtractionArgs { // diff with the new updated contract storage, the logic will detect it's an initialization // phase let old_table_values = TableRowValues::default(); - contract + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(ctx.wallet()) + .on_http(ctx.rpc_url.parse().unwrap()); + + let simple = SimpleContract::new(contract.address(), provider.root()); + simple .apply_update(ctx, &UpdateSimpleStorage::Single(contract_update)) .await .unwrap(); @@ -320,8 +416,14 @@ impl SingleValuesExtractionArgs { // we can take the first one since we're asking for single value and there is only // one row let old_table_values = &old_table_values[0]; - let mut current_values = contract - .current_single_values(ctx) + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(ctx.wallet()) + .on_http(ctx.rpc_url.parse().unwrap()); + + let simple = SimpleContract::new(contract.address(), provider.root()); + let mut current_values = simple + .current_single_values() .await .expect("can't get current values"); match c { @@ -341,7 +443,7 @@ impl SingleValuesExtractionArgs { }; let contract_update = UpdateSimpleStorage::Single(current_values); - contract.apply_update(ctx, &contract_update).await.unwrap(); + simple.apply_update(ctx, &contract_update).await.unwrap(); let new_table_values = self.current_table_row_values(ctx, contract).await; assert!( new_table_values.len() == 1, @@ -462,6 +564,8 @@ pub(crate) struct MappingValuesExtractionArgs { /// * doing the MPT proofs over, since this test doesn't implement the copy on write for MPT /// (yet), we're just recomputing all the proofs at every block and we need the keys for that. pub(crate) mapping_keys: Vec>, + /// Optional length extraction arguments + pub(crate) length_extraction_args: Option, } impl MappingValuesExtractionArgs { @@ -470,7 +574,7 @@ impl MappingValuesExtractionArgs { ctx: &mut TestContext, contract: &Contract, ) -> Vec> { - let index = self.index.clone(); + let index = self.index; let slot = self.slot; let init_pair = (next_value(), next_address()); // NOTE: here is the same address but for different mapping key (10,11) @@ -490,7 +594,14 @@ impl MappingValuesExtractionArgs { .map(|u| MappingUpdate::Insertion(u.0, u.1.into_word().into())) .collect::>(); - contract + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(ctx.wallet()) + .on_http(ctx.rpc_url.parse().unwrap()); + + let simple = SimpleContract::new(contract.address(), provider.root()); + + simple .apply_update(ctx, &UpdateSimpleStorage::Mapping(mapping_updates.clone())) .await .unwrap(); @@ -529,7 +640,7 @@ impl MappingValuesExtractionArgs { let idx = 0; let mkey = &self.mapping_keys[idx].clone(); let slot = self.slot as usize; - let index_type = self.index.clone(); + let index_type = self.index; let address = &contract.address.clone(); let query = ProofQuery::new_mapping_slot(*address, slot, mkey.to_owned()); let response = ctx @@ -621,7 +732,14 @@ impl MappingValuesExtractionArgs { } } - contract + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(ctx.wallet()) + .on_http(ctx.rpc_url.parse().unwrap()); + + let simple = SimpleContract::new(contract.address(), provider.root()); + + simple .apply_update(ctx, &UpdateSimpleStorage::Mapping(mapping_updates.clone())) .await .unwrap(); @@ -977,13 +1095,9 @@ impl MergeSource { }; // add the metadata hashes together - this is mostly for debugging - let md = merge_metadata_hash( - contract.address, - contract.chain_id, - vec![], - TableSource::SingleValues(self.single.clone()).slot_input(), - TableSource::Mapping((self.mapping.clone(), None)).slot_input(), - ); + let (simple, mapping) = self.get_data(); + let md = + merge_metadata_hash(contract.address, contract.chain_id, vec![], simple, mapping); assert!(extract_a != extract_b); Ok(( ExtractionProofInput::Merge(MergeExtractionProof { @@ -997,7 +1111,7 @@ impl MergeSource { } } /// Length extraction arguments (C.2) -#[derive(Serialize, Deserialize, Debug, Hash, Eq, PartialEq, Clone)] +#[derive(Serialize, Deserialize, Debug, Hash, Eq, PartialEq, Clone, Copy)] pub(crate) struct LengthExtractionArgs { /// Length slot pub(crate) slot: u8, @@ -1005,6 +1119,146 @@ pub(crate) struct LengthExtractionArgs { pub(crate) value: u8, } +pub trait ReceiptExtractionArgs: + Serialize + for<'de> Deserialize<'de> + Debug + Hash + Eq + PartialEq + Clone + Copy +{ + const NO_TOPICS: usize; + const MAX_DATA: usize; + + fn new(address: Address, event_signature: &str) -> Self + where + Self: Sized; + + fn get_event(&self) -> EventLogInfo<{ Self::NO_TOPICS }, { Self::MAX_DATA }>; + + fn get_index(&self) -> u64; +} + +impl ReceiptExtractionArgs + for EventLogInfo +{ + const MAX_DATA: usize = MAX_DATA; + const NO_TOPICS: usize = NO_TOPICS; + + fn new(address: Address, event_signature: &str) -> Self + where + Self: Sized, + { + EventLogInfo::::new(address, event_signature) + } + + fn get_event(&self) -> EventLogInfo<{ Self::NO_TOPICS }, { Self::MAX_DATA }> + where + [(); Self::NO_TOPICS]:, + [(); Self::MAX_DATA]:, + { + let topics: [usize; Self::NO_TOPICS] = self + .topics + .into_iter() + .collect::>() + .try_into() + .unwrap(); + let data: [usize; Self::MAX_DATA] = self + .data + .into_iter() + .collect::>() + .try_into() + .unwrap(); + EventLogInfo::<{ Self::NO_TOPICS }, { Self::MAX_DATA }> { + size: self.size, + address: self.address, + add_rel_offset: self.add_rel_offset, + event_signature: self.event_signature, + sig_rel_offset: self.sig_rel_offset, + topics, + data, + } + } + + fn get_index(&self) -> u64 { + use plonky2::{ + field::types::{Field, PrimeField64}, + plonk::config::Hasher, + }; + + let tx_index_input = [ + self.address.as_slice(), + self.event_signature.as_slice(), + TX_INDEX_COLUMN.as_bytes(), + ] + .concat() + .into_iter() + .map(GFp::from_canonical_u8) + .collect::>(); + H::hash_no_pad(&tx_index_input).elements[0].to_canonical_u64() + } +} + +impl TableSource for R +where + [(); ::NO_TOPICS]:, + [(); ::MAX_DATA]:, +{ + type Metadata = EventLogInfo<{ R::NO_TOPICS }, { R::MAX_DATA }>; + + fn can_query(&self) -> bool { + false + } + + fn get_data(&self) -> Self::Metadata { + self.get_event() + } + + fn init_contract_data<'a>( + &'a mut self, + ctx: &'a mut TestContext, + contract: &'a Contract, + ) -> BoxFuture<'a, Vec>> { + async move { + let contract_update = + ReceiptUpdate::new((R::NO_TOPICS as u8, R::MAX_DATA as u8), 5, 15); + + let provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(ctx.wallet()) + .on_http(ctx.rpc_url.parse().unwrap()); + + let event_emitter = EventContract::new(contract.address(), provider.root()); + event_emitter + .apply_update(ctx, &contract_update) + .await + .unwrap(); + vec![] + } + .boxed() + } + + async fn generate_extraction_proof_inputs( + &self, + _ctx: &mut TestContext, + _contract: &Contract, + _value_key: ProofKey, + ) -> Result<(ExtractionProofInput, HashOutput)> { + todo!("Implement as part of CRY-25") + } + + fn random_contract_update<'a>( + &'a mut self, + _ctx: &'a mut TestContext, + _contract: &'a Contract, + _c: ChangeType, + ) -> BoxFuture<'a, Vec>> { + todo!("Implement as part of CRY-25") + } + + fn metadata_hash(&self, _contract_address: Address, _chain_id: u64) -> MetadataHash { + let digest = compute_receipt_leaf_metadata_digest::<{ R::NO_TOPICS }, { R::MAX_DATA }>( + &self.get_event(), + ); + combine_digest_and_block(digest) + } +} + /// Contract extraction arguments (C.3) #[derive(Debug)] pub(crate) struct ContractExtractionArgs { diff --git a/mp2-v1/tests/common/context.rs b/mp2-v1/tests/common/context.rs index f7ae3e7a0..24497b35c 100644 --- a/mp2-v1/tests/common/context.rs +++ b/mp2-v1/tests/common/context.rs @@ -196,8 +196,13 @@ const INDEX_INFO_FILE: &str = "index.info"; impl TestContext { pub(crate) fn wallet(&self) -> EthereumWallet { - let signer: PrivateKeySigner = self.local_node.as_ref().unwrap().keys()[0].clone().into(); - EthereumWallet::from(signer) + let keys = self.local_node.as_ref().unwrap().keys(); + let signer: PrivateKeySigner = keys[0].clone().into(); + let mut wallet = EthereumWallet::from(signer); + keys.iter().skip(1).for_each(|key| { + wallet.register_signer::(key.clone().into()); + }); + wallet } /// Build the parameters. /// diff --git a/mp2-v1/tests/common/mod.rs b/mp2-v1/tests/common/mod.rs index c604a1424..4e0f68451 100644 --- a/mp2-v1/tests/common/mod.rs +++ b/mp2-v1/tests/common/mod.rs @@ -2,7 +2,7 @@ use alloy::primitives::Address; use anyhow::Result; use cases::table_source::TableSource; -use mp2_v1::api::{merge_metadata_hash, metadata_hash, MetadataHash, SlotInputs}; +use mp2_v1::api::MetadataHash; use serde::{Deserialize, Serialize}; use table::TableColumns; pub mod benchmarker; @@ -65,39 +65,19 @@ pub fn mkdir_all(params_path_str: &str) -> Result<()> { } #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct TableInfo { +pub struct TableInfo { pub columns: TableColumns, // column to do queries over for numerical values, NOT secondary index pub value_column: String, pub public_name: String, pub contract_address: Address, pub chain_id: u64, - pub source: TableSource, + pub source: T, } -impl TableInfo { +impl TableInfo { pub fn metadata_hash(&self) -> MetadataHash { - match &self.source { - TableSource::Mapping((mapping, _)) => { - let slot = SlotInputs::Mapping(mapping.slot); - metadata_hash(slot, &self.contract_address, self.chain_id, vec![]) - } - // mapping with length not tested right now - TableSource::SingleValues(args) => { - let slot = SlotInputs::Simple(args.slots.clone()); - metadata_hash(slot, &self.contract_address, self.chain_id, vec![]) - } - TableSource::Merge(merge) => { - let single = SlotInputs::Simple(merge.single.slots.clone()); - let mapping = SlotInputs::Mapping(merge.mapping.slot); - merge_metadata_hash( - self.contract_address, - self.chain_id, - vec![], - single, - mapping, - ) - } - } + self.source + .metadata_hash(self.contract_address, self.chain_id) } } diff --git a/mp2-v1/tests/integrated_tests.rs b/mp2-v1/tests/integrated_tests.rs index 54694a385..5ec84cc9c 100644 --- a/mp2-v1/tests/integrated_tests.rs +++ b/mp2-v1/tests/integrated_tests.rs @@ -24,6 +24,9 @@ use common::{ MAX_NUM_ITEMS_PER_OUTPUT, MAX_NUM_OUTPUTS, MAX_NUM_PLACEHOLDERS, MAX_NUM_PREDICATE_OPS, MAX_NUM_RESULT_OPS, }, + table_source::{ + MappingValuesExtractionArgs, MergeSource, SingleValuesExtractionArgs, TableSource, + }, TableIndexing, }, context::{self, ParamsType, TestContextConfig}, @@ -34,6 +37,7 @@ use common::{ use envconfig::Envconfig; use log::info; +use mp2_common::eth::EventLogInfo; use parsil::{ assembler::DynamicCircuitPis, parse_and_validate, @@ -86,15 +90,21 @@ async fn integrated_indexing() -> Result<()> { ctx.build_params(ParamsType::Indexing).unwrap(); info!("Params built"); + // For now we test that we can start a receipt case only. + let (_receipt, _genesis) = + TableIndexing::>::receipt_test_case(0, 0, &mut ctx).await?; + // NOTE: to comment to avoid very long tests... - let (mut single, genesis) = TableIndexing::single_value_test_case(&mut ctx).await?; + let (mut single, genesis) = + TableIndexing::::single_value_test_case(&mut ctx).await?; let changes = vec![ ChangeType::Update(UpdateType::Rest), ChangeType::Silent, ChangeType::Update(UpdateType::SecondaryIndex), ]; single.run(&mut ctx, genesis, changes.clone()).await?; - let (mut mapping, genesis) = TableIndexing::mapping_test_case(&mut ctx).await?; + let (mut mapping, genesis) = + TableIndexing::::mapping_test_case(&mut ctx).await?; let changes = vec![ ChangeType::Insertion, ChangeType::Update(UpdateType::Rest), @@ -104,7 +114,8 @@ async fn integrated_indexing() -> Result<()> { ]; mapping.run(&mut ctx, genesis, changes).await?; - let (mut merged, genesis) = TableIndexing::merge_table_test_case(&mut ctx).await?; + let (mut merged, genesis) = + TableIndexing::::merge_table_test_case(&mut ctx).await?; let changes = vec![ ChangeType::Insertion, ChangeType::Update(UpdateType::Rest), @@ -120,7 +131,7 @@ async fn integrated_indexing() -> Result<()> { Ok(()) } -async fn integrated_querying(table_info: TableInfo) -> Result<()> { +async fn integrated_querying(table_info: TableInfo) -> Result<()> { let storage = ProofKV::new_from_env(PROOF_STORE_FILE)?; info!("Loading Anvil and contract"); let mut ctx = context::new_local_chain(storage).await; @@ -138,7 +149,8 @@ async fn integrated_querying(table_info: TableInfo) -> Result<()> { async fn integrated_querying_mapping_table() -> Result<()> { let _ = env_logger::try_init(); info!("Running QUERY test for mapping table"); - let table_info = read_table_info(MAPPING_TABLE_INFO_FILE)?; + let table_info: TableInfo = + read_table_info(MAPPING_TABLE_INFO_FILE)?; integrated_querying(table_info).await } @@ -147,7 +159,7 @@ async fn integrated_querying_mapping_table() -> Result<()> { async fn integrated_querying_merged_table() -> Result<()> { let _ = env_logger::try_init(); info!("Running QUERY test for merged table"); - let table_info = read_table_info(MERGE_TABLE_INFO_FILE)?; + let table_info: TableInfo = read_table_info(MERGE_TABLE_INFO_FILE)?; integrated_querying(table_info).await } @@ -163,7 +175,7 @@ fn table_info_path(f: &str) -> PathBuf { path } -fn write_table_info(f: &str, info: TableInfo) -> Result<()> { +fn write_table_info(f: &str, info: TableInfo) -> Result<()> { let full_path = table_info_path(f); let file = File::create(full_path)?; let writer = BufWriter::new(file); @@ -171,7 +183,7 @@ fn write_table_info(f: &str, info: TableInfo) -> Result<()> { Ok(()) } -fn read_table_info(f: &str) -> Result { +fn read_table_info(f: &str) -> Result> { let full_path = table_info_path(f); let file = File::open(full_path)?; let reader = BufReader::new(file); diff --git a/rust-toolchain b/rust-toolchain index bf867e0ae..a7a456242 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly +nightly-2024-12-03