From ea08e5633fdf92376c43c53c74f79de3b556dd5b Mon Sep 17 00:00:00 2001 From: Ekaterina Broslavskaya Date: Thu, 15 Aug 2024 10:30:45 +0300 Subject: [PATCH] Update add member flow (#26) * don't work async, prepare to remove * new flow works good * refactor --- Cargo.toml | 4 + contracts/lib/openzeppelin-contracts | 2 +- crates/bindings/src/context.rs | 89 +- crates/bindings/src/deploy.rs | 205 ++- crates/bindings/src/deploymentconfig.rs | 479 +++---- crates/bindings/src/foo.rs | 446 ------- crates/bindings/src/ierc165.rs | 190 ++- crates/bindings/src/ierc20.rs | 803 ++++-------- crates/bindings/src/ierc721.rs | 1097 ++++++---------- crates/bindings/src/ierc721enumerable.rs | 1270 +++++++------------ crates/bindings/src/ierc721metadata.rs | 1207 ++++++------------ crates/bindings/src/ierc721tokenreceiver.rs | 195 ++- crates/bindings/src/isckeystore.rs | 278 ++-- crates/bindings/src/lib.rs | 1 - crates/bindings/src/mockerc20.rs | 1007 ++++++--------- crates/bindings/src/mockerc721.rs | 1228 ++++++------------ crates/bindings/src/ownable.rs | 498 +++----- crates/bindings/src/sckeystore.rs | 981 +++++--------- ds/Cargo.toml | 16 +- ds/src/chat_client.rs | 206 +++ ds/src/chat_server.rs | 114 ++ ds/src/ds.rs | 41 +- ds/src/lib.rs | 33 + sc_key_store/src/lib.rs | 80 +- sc_key_store/src/sc_ks.rs | 283 +---- src/cli.rs | 113 +- src/contact.rs | 213 ++++ src/identity.rs | 50 +- src/lib.rs | 168 ++- src/main.rs | 237 ++-- src/user.rs | 317 +++-- 31 files changed, 4622 insertions(+), 7229 deletions(-) delete mode 100644 crates/bindings/src/foo.rs create mode 100644 ds/src/chat_client.rs create mode 100644 ds/src/chat_server.rs create mode 100644 src/contact.rs diff --git a/Cargo.toml b/Cargo.toml index 33bf337..23025fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,8 @@ tokio = { version = "=1.38.0", features = [ "full", ] } tokio-util = "=0.7.11" +tokio-tungstenite = "0.15" +tungstenite = "0.14" alloy = { git = "https://github.com/alloy-rs/alloy", features = [ "providers", "node-bindings", @@ -32,9 +34,11 @@ alloy = { git = "https://github.com/alloy-rs/alloy", features = [ "k256", ] } fred = { version = "=9.0.3", features = ["subscriber-client"] } +console-subscriber = "0.1.5" rand = "=0.8.5" serde_json = "=1.0" +serde = "=1.0.204" url = "=2.5.2" tls_codec = "=0.3.0" hex = "=0.4.3" diff --git a/contracts/lib/openzeppelin-contracts b/contracts/lib/openzeppelin-contracts index 659f306..e3786e6 160000 --- a/contracts/lib/openzeppelin-contracts +++ b/contracts/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit 659f3063f82422cef820de746444e6f6cba6ca7c +Subproject commit e3786e63e6def6f3b71ce7b4b30906123bffe67c diff --git a/crates/bindings/src/context.rs b/crates/bindings/src/context.rs index 88b9577..1079b6d 100644 --- a/crates/bindings/src/context.rs +++ b/crates/bindings/src/context.rs @@ -19,6 +19,7 @@ pub mod Context { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -28,13 +29,14 @@ pub mod Context { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`Context`](self) contract instance. -See the [wrapper's documentation](`ContextInstance`) for more details.*/ + See the [wrapper's documentation](`ContextInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -48,9 +50,9 @@ See the [wrapper's documentation](`ContextInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -58,35 +60,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { ContextInstance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { ContextInstance::::deploy_builder(provider) } /**A [`Context`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Context`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Context`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ContextInstance { address: alloy_sol_types::private::Address, @@ -97,24 +100,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ContextInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ContextInstance").field(&self.address).finish() + f.debug_tuple("ContextInstance") + .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, - > ContextInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ContextInstance + { /**Creates a new wrapper around an on-chain [`Context`](self) contract instance. -See the [wrapper's documentation](`ContextInstance`) for more details.*/ + See the [wrapper's documentation](`ContextInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -123,22 +126,20 @@ See the [wrapper's documentation](`ContextInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -181,10 +182,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ContextInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ContextInstance + { /// 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 @@ -199,10 +201,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ContextInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ContextInstance + { /// 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. diff --git a/crates/bindings/src/deploy.rs b/crates/bindings/src/deploy.rs index 0c49060..57c4d87 100644 --- a/crates/bindings/src/deploy.rs +++ b/crates/bindings/src/deploy.rs @@ -60,6 +60,7 @@ pub mod Deploy { ///0x6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604080516301587f9560e61b8152600481019190915260086044820152674554485f46524f4d60c01b606482015260006024820181905290737109709ecfa91a80626ff3989d68f67f5b1dd12d9063561fe54090608401602060405180830381865afa158015610096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ba9190610365565b90506001600160a01b038116156100f457600c80546301000000600160b81b03191663010000006001600160a01b0384160217905561025e565b6040805160608101909152603b808252737109709ecfa91a80626ff3989d68f67f5b1dd12d9163d145736c916110c560208301396040518263ffffffff1660e01b815260040161014491906103e5565b600060405180830381865afa158015610161573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610189919081019061042d565b600d906101969082610564565b50610232600d80546101a7906104d9565b80601f01602080910402602001604051908101604052809291908181526020018280546101d3906104d9565b80156102205780601f106101f557610100808354040283529160200191610220565b820191906000526020600020905b81548152906001019060200180831161020357829003601f168201915b5050505050600061026460201b60201c565b50600c80546001600160a01b039092166301000000026301000000600160b81b03199092169190911790555b50610664565b604051636229498b60e01b81526000908190737109709ecfa91a80626ff3989d68f67f5b1dd12d90636229498b906102a29087908790600401610623565b602060405180830381865afa1580156102bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e3919061064b565b604051630884001960e21b815260048101829052909150737109709ecfa91a80626ff3989d68f67f5b1dd12d906322100064906024016020604051808303816000875af1158015610338573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035c9190610365565b91509250929050565b60006020828403121561037757600080fd5b81516001600160a01b038116811461038e57600080fd5b9392505050565b60005b838110156103b0578181015183820152602001610398565b50506000910152565b600081518084526103d1816020860160208601610395565b601f01601f19169290920160200192915050565b6040815260086040820152674d4e454d4f4e494360c01b606082015260806020820152600061038e60808301846103b9565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561043f57600080fd5b81516001600160401b038082111561045657600080fd5b818401915084601f83011261046a57600080fd5b81518181111561047c5761047c610417565b604051601f8201601f19908116603f011681019083821181831017156104a4576104a4610417565b816040528281528760208487010111156104bd57600080fd5b6104ce836020830160208801610395565b979650505050505050565b600181811c908216806104ed57607f821691505b60208210810361050d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561055f576000816000526020600020601f850160051c8101602086101561053c5750805b601f850160051c820191505b8181101561055b57828155600101610548565b5050505b505050565b81516001600160401b0381111561057d5761057d610417565b6105918161058b84546104d9565b84610513565b602080601f8311600181146105c657600084156105ae5750858301515b600019600386901b1c1916600185901b17855561055b565b600085815260208120601f198616915b828110156105f5578886015182559484019460019091019084016105d6565b50858210156106135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600061063660408301856103b9565b905063ffffffff831660208301529392505050565b60006020828403121561065d57600080fd5b5051919050565b610a52806106736000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063522bb7041461003b578063f8ccbf4714610080575b600080fd5b61004e61004936600461029b565b6100a3565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b600c546100939062010000900460ff1681565b6040519015158152602001610077565b600c546040517f7fec2a8d000000000000000000000000000000000000000000000000000000008152630100000090910473ffffffffffffffffffffffffffffffffffffffff1660048201526000908190737109709ecfa91a80626ff3989d68f67f5b1dd12d90637fec2a8d90602401600060405180830381600087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b50505050600c60039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161017490610281565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101ad573d6000803e3d6000fd5b509050826040516101bd9061028e565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101f6573d6000803e3d6000fd5b5091507f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d60001c73ffffffffffffffffffffffffffffffffffffffff166376eadd366040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561026457600080fd5b505af1158015610278573d6000803e3d6000fd5b50505050915091565b610223806102d983390190565b610556806104fc83390190565b6000602082840312156102ad57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146102d157600080fd5b939250505056fe6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604051610223380380610223833981016040819052610040916100f0565b6001600160a01b0381166100675760405163201616d160e21b815260040160405180910390fd5b600e80546001600160a01b0319166001600160a01b03831617905546617a69036100cb57604080516020808201835260009091528151908101909152600e546001600160a01b031690819052600d80546001600160a01b03191690911790556100ea565b604051630b13dbff60e01b815246600482015260240160405180910390fd5b50610120565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b60f58061012e6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656608060405234801561001057600080fd5b5060405161055638038061055683398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610459806100fd6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056746573742074657374207465737420746573742074657374207465737420746573742074657374207465737420746573742074657374206a756e6b /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@\x80Qc\x01X\x7F\x95`\xE6\x1B\x81R`\x04\x81\x01\x91\x90\x91R`\x08`D\x82\x01RgETH_FROM`\xC0\x1B`d\x82\x01R`\0`$\x82\x01\x81\x90R\x90sq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90cV\x1F\xE5@\x90`\x84\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\0\x96W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\0\xBA\x91\x90a\x03eV[\x90P`\x01`\x01`\xA0\x1B\x03\x81\x16\x15a\0\xF4W`\x0C\x80Tc\x01\0\0\0`\x01`\xB8\x1B\x03\x19\x16c\x01\0\0\0`\x01`\x01`\xA0\x1B\x03\x84\x16\x02\x17\x90Ua\x02^V[`@\x80Q``\x81\x01\x90\x91R`;\x80\x82Rsq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x91c\xD1Esl\x91a\x10\xC5` \x83\x019`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01a\x01D\x91\x90a\x03\xE5V[`\0`@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x01aW=`\0\x80>=`\0\xFD[PPPP`@Q=`\0\x82>`\x1F=\x90\x81\x01`\x1F\x19\x16\x82\x01`@Ra\x01\x89\x91\x90\x81\x01\x90a\x04-V[`\r\x90a\x01\x96\x90\x82a\x05dV[Pa\x022`\r\x80Ta\x01\xA7\x90a\x04\xD9V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x01\xD3\x90a\x04\xD9V[\x80\x15a\x02 W\x80`\x1F\x10a\x01\xF5Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02 V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\x03W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP`\0a\x02d` \x1B` \x1CV[P`\x0C\x80T`\x01`\x01`\xA0\x1B\x03\x90\x92\x16c\x01\0\0\0\x02c\x01\0\0\0`\x01`\xB8\x1B\x03\x19\x90\x92\x16\x91\x90\x91\x17\x90U[Pa\x06dV[`@Qcb)I\x8B`\xE0\x1B\x81R`\0\x90\x81\x90sq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90cb)I\x8B\x90a\x02\xA2\x90\x87\x90\x87\x90`\x04\x01a\x06#V[` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x02\xBFW=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x02\xE3\x91\x90a\x06KV[`@Qc\x08\x84\0\x19`\xE2\x1B\x81R`\x04\x81\x01\x82\x90R\x90\x91Psq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90c\"\x10\0d\x90`$\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x038W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x03\\\x91\x90a\x03eV[\x91P\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x03wW`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x03\x8EW`\0\x80\xFD[\x93\x92PPPV[`\0[\x83\x81\x10\x15a\x03\xB0W\x81\x81\x01Q\x83\x82\x01R` \x01a\x03\x98V[PP`\0\x91\x01RV[`\0\x81Q\x80\x84Ra\x03\xD1\x81` \x86\x01` \x86\x01a\x03\x95V[`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01` \x01\x92\x91PPV[`@\x81R`\x08`@\x82\x01RgMNEMONIC`\xC0\x1B``\x82\x01R`\x80` \x82\x01R`\0a\x03\x8E`\x80\x83\x01\x84a\x03\xB9V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x04?W`\0\x80\xFD[\x81Q`\x01`\x01`@\x1B\x03\x80\x82\x11\x15a\x04VW`\0\x80\xFD[\x81\x84\x01\x91P\x84`\x1F\x83\x01\x12a\x04jW`\0\x80\xFD[\x81Q\x81\x81\x11\x15a\x04|Wa\x04|a\x04\x17V[`@Q`\x1F\x82\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x83\x82\x11\x81\x83\x10\x17\x15a\x04\xA4Wa\x04\xA4a\x04\x17V[\x81`@R\x82\x81R\x87` \x84\x87\x01\x01\x11\x15a\x04\xBDW`\0\x80\xFD[a\x04\xCE\x83` \x83\x01` \x88\x01a\x03\x95V[\x97\x96PPPPPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x04\xEDW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x05\rWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x05_W`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x05=`\0\xFD[PPPP`\x0C`\x03\x90T\x90a\x01\0\n\x90\x04s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`@Qa\x01t\x90a\x02\x81V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xADW=`\0\x80>=`\0\xFD[P\x90P\x82`@Qa\x01\xBD\x90a\x02\x8EV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xF6W=`\0\x80>=`\0\xFD[P\x91P\x7F\x88\\\xB6\x92@\xA95\xD62\xD7\x9C1q\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-`\0\x1Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16cv\xEA\xDD6`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a\x02dW`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x02xW=`\0\x80>=`\0\xFD[PPPP\x91P\x91V[a\x02#\x80a\x02\xD9\x839\x01\x90V[a\x05V\x80a\x04\xFC\x839\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x02\xADW`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xD1W`\0\x80\xFD[\x93\x92PPPV\xFE`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@Qa\x02#8\x03\x80a\x02#\x839\x81\x01`@\x81\x90Ra\0@\x91a\0\xF0V[`\x01`\x01`\xA0\x1B\x03\x81\x16a\0gW`@Qc \x16\x16\xD1`\xE2\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`\x0E\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x83\x16\x17\x90UFazi\x03a\0\xCBW`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x90\x81\x01\x90\x91R`\x0ET`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x90R`\r\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90\x91\x17\x90Ua\0\xEAV[`@Qc\x0B\x13\xDB\xFF`\xE0\x1B\x81RF`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[Pa\x01 V[`\0` \x82\x84\x03\x12\x15a\x01\x02W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01\x19W`\0\x80\xFD[\x93\x92PPPV[`\xF5\x80a\x01.`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`@Qa\x05V8\x03\x80a\x05V\x839\x81\x01`@\x81\x90Ra\0/\x91a\0\xBEV[\x80`\x01`\x01`\xA0\x1B\x03\x81\x16a\0^W`@Qc\x1EO\xBD\xF7`\xE0\x1B\x81R`\0`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[a\0g\x81a\0nV[PPa\0\xEEV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\0\xD0W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0\xE7W`\0\x80\xFD[\x93\x92PPPV[a\x04Y\x80a\0\xFD`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPVtest test test test test test test test test test test junk", ); @@ -69,13 +70,14 @@ pub mod Deploy { ///0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063522bb7041461003b578063f8ccbf4714610080575b600080fd5b61004e61004936600461029b565b6100a3565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152015b60405180910390f35b600c546100939062010000900460ff1681565b6040519015158152602001610077565b600c546040517f7fec2a8d000000000000000000000000000000000000000000000000000000008152630100000090910473ffffffffffffffffffffffffffffffffffffffff1660048201526000908190737109709ecfa91a80626ff3989d68f67f5b1dd12d90637fec2a8d90602401600060405180830381600087803b15801561012d57600080fd5b505af1158015610141573d6000803e3d6000fd5b50505050600c60039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161017490610281565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101ad573d6000803e3d6000fd5b509050826040516101bd9061028e565b73ffffffffffffffffffffffffffffffffffffffff9091168152602001604051809103906000f0801580156101f6573d6000803e3d6000fd5b5091507f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d60001c73ffffffffffffffffffffffffffffffffffffffff166376eadd366040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561026457600080fd5b505af1158015610278573d6000803e3d6000fd5b50505050915091565b610223806102d983390190565b610556806104fc83390190565b6000602082840312156102ad57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146102d157600080fd5b939250505056fe6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604051610223380380610223833981016040819052610040916100f0565b6001600160a01b0381166100675760405163201616d160e21b815260040160405180910390fd5b600e80546001600160a01b0319166001600160a01b03831617905546617a69036100cb57604080516020808201835260009091528151908101909152600e546001600160a01b031690819052600d80546001600160a01b03191690911790556100ea565b604051630b13dbff60e01b815246600482015260240160405180910390fd5b50610120565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b60f58061012e6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656608060405234801561001057600080fd5b5060405161055638038061055683398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610459806100fd6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056 /// ``` #[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\x10W`\0\x80\xFD[P`\x046\x10a\x006W`\x005`\xE0\x1C\x80cR+\xB7\x04\x14a\0;W\x80c\xF8\xCC\xBFG\x14a\0\x80W[`\0\x80\xFD[a\0Na\0I6`\x04a\x02\x9BV[a\0\xA3V[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x16\x81R\x92\x90\x91\x16` \x83\x01R\x01[`@Q\x80\x91\x03\x90\xF3[`\x0CTa\0\x93\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01a\0wV[`\x0CT`@Q\x7F\x7F\xEC*\x8D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81Rc\x01\0\0\0\x90\x91\x04s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x04\x82\x01R`\0\x90\x81\x90sq\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-\x90c\x7F\xEC*\x8D\x90`$\x01`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a\x01-W`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x01AW=`\0\x80>=`\0\xFD[PPPP`\x0C`\x03\x90T\x90a\x01\0\n\x90\x04s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`@Qa\x01t\x90a\x02\x81V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xADW=`\0\x80>=`\0\xFD[P\x90P\x82`@Qa\x01\xBD\x90a\x02\x8EV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90`\0\xF0\x80\x15\x80\x15a\x01\xF6W=`\0\x80>=`\0\xFD[P\x91P\x7F\x88\\\xB6\x92@\xA95\xD62\xD7\x9C1q\tp\x9E\xCF\xA9\x1A\x80bo\xF3\x98\x9Dh\xF6\x7F[\x1D\xD1-`\0\x1Cs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16cv\xEA\xDD6`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a\x02dW`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x02xW=`\0\x80>=`\0\xFD[PPPP\x91P\x91V[a\x02#\x80a\x02\xD9\x839\x01\x90V[a\x05V\x80a\x04\xFC\x839\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x02\xADW`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xD1W`\0\x80\xFD[\x93\x92PPPV\xFE`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@Qa\x02#8\x03\x80a\x02#\x839\x81\x01`@\x81\x90Ra\0@\x91a\0\xF0V[`\x01`\x01`\xA0\x1B\x03\x81\x16a\0gW`@Qc \x16\x16\xD1`\xE2\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`\x0E\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x83\x16\x17\x90UFazi\x03a\0\xCBW`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x90\x81\x01\x90\x91R`\x0ET`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x90R`\r\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90\x91\x17\x90Ua\0\xEAV[`@Qc\x0B\x13\xDB\xFF`\xE0\x1B\x81RF`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[Pa\x01 V[`\0` \x82\x84\x03\x12\x15a\x01\x02W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01\x19W`\0\x80\xFD[\x93\x92PPPV[`\xF5\x80a\x01.`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`@Qa\x05V8\x03\x80a\x05V\x839\x81\x01`@\x81\x90Ra\0/\x91a\0\xBEV[\x80`\x01`\x01`\xA0\x1B\x03\x81\x16a\0^W`@Qc\x1EO\xBD\xF7`\xE0\x1B\x81R`\0`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[a\0g\x81a\0nV[PPa\0\xEEV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\0\xD0W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0\xE7W`\0\x80\xFD[\x93\x92PPPV[a\x04Y\x80a\0\xFD`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPV", ); /**Function with signature `IS_SCRIPT()` and selector `0xf8ccbf47`. -```solidity -function IS_SCRIPT() external view returns (bool); -```*/ + ```solidity + function IS_SCRIPT() external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct IS_SCRIPTCall {} @@ -95,9 +97,7 @@ function IS_SCRIPT() external view returns (bool); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -126,9 +126,7 @@ function IS_SCRIPT() external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -153,14 +151,10 @@ function IS_SCRIPT() external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for IS_SCRIPTCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = IS_SCRIPTReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "IS_SCRIPT()"; const SELECTOR: [u8; 4] = [248u8, 204u8, 191u8, 71u8]; #[inline] @@ -178,17 +172,17 @@ function IS_SCRIPT() external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `run(address)` and selector `0x522bb704`. -```solidity -function run(address initialOwner) external returns (address scKeystore, address deploymentConfig); -```*/ + ```solidity + function run(address initialOwner) external returns (address scKeystore, address deploymentConfig); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct runCall { @@ -211,9 +205,7 @@ function run(address initialOwner) external returns (address scKeystore, address type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -231,7 +223,9 @@ function run(address initialOwner) external returns (address scKeystore, address #[doc(hidden)] impl ::core::convert::From> for runCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { initialOwner: tuple.0 } + Self { + initialOwner: tuple.0, + } } } } @@ -248,9 +242,7 @@ function run(address initialOwner) external returns (address scKeystore, address ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -278,17 +270,13 @@ function run(address initialOwner) external returns (address scKeystore, address #[automatically_derived] impl alloy_sol_types::SolCall for runCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = runReturn; type ReturnTuple<'a> = ( alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Address, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "run(address)"; const SELECTOR: [u8; 4] = [82u8, 43u8, 183u8, 4u8]; #[inline] @@ -310,10 +298,10 @@ function run(address initialOwner) external returns (address scKeystore, address data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -330,10 +318,8 @@ function run(address initialOwner) external returns (address scKeystore, address /// No guarantees are made about the order of the selectors. /// /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [82u8, 43u8, 183u8, 4u8], - [248u8, 204u8, 191u8, 71u8], - ]; + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[82u8, 43u8, 183u8, 4u8], [248u8, 204u8, 191u8, 71u8]]; } #[automatically_derived] impl alloy_sol_types::SolInterface for DeployCalls { @@ -343,9 +329,7 @@ function run(address initialOwner) external returns (address scKeystore, address #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::IS_SCRIPT(_) => { - ::SELECTOR - } + Self::IS_SCRIPT(_) => ::SELECTOR, Self::run(_) => ::SELECTOR, } } @@ -364,19 +348,10 @@ function run(address initialOwner) external returns (address scKeystore, address data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { - fn run( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + fn run(data: &[u8], validate: bool) -> alloy_sol_types::Result { + ::abi_decode_raw(data, validate) .map(DeployCalls::run) } run @@ -386,22 +361,17 @@ function run(address initialOwner) external returns (address scKeystore, address data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(DeployCalls::IS_SCRIPT) } IS_SCRIPT }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -411,19 +381,14 @@ function run(address initialOwner) external returns (address scKeystore, address Self::IS_SCRIPT(inner) => { ::abi_encoded_size(inner) } - Self::run(inner) => { - ::abi_encoded_size(inner) - } + Self::run(inner) => ::abi_encoded_size(inner), } } #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::IS_SCRIPT(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::run(inner) => { ::abi_encode_raw(inner, out) @@ -434,7 +399,7 @@ function run(address initialOwner) external returns (address scKeystore, address use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`Deploy`](self) contract instance. -See the [wrapper's documentation](`DeployInstance`) for more details.*/ + See the [wrapper's documentation](`DeployInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -448,9 +413,9 @@ See the [wrapper's documentation](`DeployInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -458,35 +423,35 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { DeployInstance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { DeployInstance::::deploy_builder(provider) } /**A [`Deploy`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Deploy`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Deploy`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct DeployInstance { address: alloy_sol_types::private::Address, @@ -497,24 +462,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for DeployInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("DeployInstance").field(&self.address).finish() + f.debug_tuple("DeployInstance") + .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, - > DeployInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > DeployInstance + { /**Creates a new wrapper around an on-chain [`Deploy`](self) contract instance. -See the [wrapper's documentation](`DeployInstance`) for more details.*/ + See the [wrapper's documentation](`DeployInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -523,22 +488,20 @@ See the [wrapper's documentation](`DeployInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -581,10 +544,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeployInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > DeployInstance + { /// 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 @@ -596,9 +560,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) } ///Creates a new call builder for the [`IS_SCRIPT`] function. - pub fn IS_SCRIPT( - &self, - ) -> alloy_contract::SolCallBuilder { + pub fn IS_SCRIPT(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&IS_SCRIPTCall {}) } ///Creates a new call builder for the [`run`] function. @@ -612,10 +574,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeployInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > DeployInstance + { /// 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. diff --git a/crates/bindings/src/deploymentconfig.rs b/crates/bindings/src/deploymentconfig.rs index 9252881..cbe3687 100644 --- a/crates/bindings/src/deploymentconfig.rs +++ b/crates/bindings/src/deploymentconfig.rs @@ -114,6 +114,7 @@ pub mod DeploymentConfig { ///0x6080604052600c805462ff00ff19166201000117905534801561002157600080fd5b50604051610223380380610223833981016040819052610040916100f0565b6001600160a01b0381166100675760405163201616d160e21b815260040160405180910390fd5b600e80546001600160a01b0319166001600160a01b03831617905546617a69036100cb57604080516020808201835260009091528151908101909152600e546001600160a01b031690819052600d80546001600160a01b03191690911790556100ea565b604051630b13dbff60e01b815246600482015260240160405180910390fd5b50610120565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b60f58061012e6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656 /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"`\x80`@R`\x0C\x80Tb\xFF\0\xFF\x19\x16b\x01\0\x01\x17\x90U4\x80\x15a\0!W`\0\x80\xFD[P`@Qa\x02#8\x03\x80a\x02#\x839\x81\x01`@\x81\x90Ra\0@\x91a\0\xF0V[`\x01`\x01`\xA0\x1B\x03\x81\x16a\0gW`@Qc \x16\x16\xD1`\xE2\x1B\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[`\x0E\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x83\x16\x17\x90UFazi\x03a\0\xCBW`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x90\x81\x01\x90\x91R`\x0ET`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x90R`\r\x80T`\x01`\x01`\xA0\x1B\x03\x19\x16\x90\x91\x17\x90Ua\0\xEAV[`@Qc\x0B\x13\xDB\xFF`\xE0\x1B\x81RF`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[Pa\x01 V[`\0` \x82\x84\x03\x12\x15a\x01\x02W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x01\x19W`\0\x80\xFD[\x93\x92PPPV[`\xF5\x80a\x01.`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V", ); @@ -123,12 +124,13 @@ pub mod DeploymentConfig { ///0x6080604052348015600f57600080fd5b506004361060465760003560e01c806312900da814604b578063d7b6574514608f578063f8a8fd6d1460d2578063f8ccbf471460d4575b600080fd5b6040805160208082018352600090915281518082018352600e5473ffffffffffffffffffffffffffffffffffffffff16908190529151918252015b60405180910390f35b600d5460ae9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016086565b005b600c5460e69062010000900460ff1681565b6040519015158152602001608656 /// ``` #[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\x15`\x0FW`\0\x80\xFD[P`\x046\x10`FW`\x005`\xE0\x1C\x80c\x12\x90\r\xA8\x14`KW\x80c\xD7\xB6WE\x14`\x8FW\x80c\xF8\xA8\xFDm\x14`\xD2W\x80c\xF8\xCC\xBFG\x14`\xD4W[`\0\x80\xFD[`@\x80Q` \x80\x82\x01\x83R`\0\x90\x91R\x81Q\x80\x82\x01\x83R`\x0ETs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x81\x90R\x91Q\x91\x82R\x01[`@Q\x80\x91\x03\x90\xF3[`\rT`\xAE\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`\x86V[\0[`\x0CT`\xE6\x90b\x01\0\0\x90\x04`\xFF\x16\x81V[`@Q\x90\x15\x15\x81R` \x01`\x86V", ); /**```solidity -struct NetworkConfig { address deployer; } -```*/ + struct NetworkConfig { address deployer; } + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct NetworkConfig { @@ -143,9 +145,7 @@ struct NetworkConfig { address deployer; } type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -182,49 +182,53 @@ struct NetworkConfig { address deployer; } } #[inline] fn stv_abi_encoded_size(&self) -> usize { - let tuple = as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = + as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) } #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { ::eip712_hash_struct(self) } #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { - let tuple = as ::core::convert::From>::from(self.clone()); - as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { + let tuple = + as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to( + &tuple, out, + ) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = + as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size( + &tuple, + ) } } #[automatically_derived] impl alloy_sol_types::SolType for NetworkConfig { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SOL_NAME: &'static str = ::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { as alloy_sol_types::SolType>::valid_token(token) } #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - let tuple = as alloy_sol_types::SolType>::detokenize(token); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } @@ -233,14 +237,12 @@ struct NetworkConfig { address deployer; } const NAME: &'static str = "NetworkConfig"; #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { - alloy_sol_types::private::Cow::Borrowed( - "NetworkConfig(address deployer)", - ) + alloy_sol_types::private::Cow::Borrowed("NetworkConfig(address deployer)") } #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components( + ) -> alloy_sol_types::private::Vec> + { alloy_sol_types::private::Vec::new() } #[inline] @@ -250,10 +252,10 @@ struct NetworkConfig { address deployer; } #[inline] fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { ::eip712_data_word( - &self.deployer, - ) - .0 - .to_vec() + &self.deployer, + ) + .0 + .to_vec() } } #[automatically_derived] @@ -270,33 +272,24 @@ struct NetworkConfig { address deployer; } rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.deployer, out, ); } #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { let mut out = alloy_sol_types::private::Vec::new(); - ::encode_topic_preimage( - rust, - &mut out, - ); - alloy_sol_types::abi::token::WordToken( - alloy_sol_types::private::keccak256(out), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; /**Custom error with signature `DeploymentConfig_InvalidDeployerAddress()` and selector `0x80585b44`. -```solidity -error DeploymentConfig_InvalidDeployerAddress(); -```*/ + ```solidity + error DeploymentConfig_InvalidDeployerAddress(); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct DeploymentConfig_InvalidDeployerAddress {} @@ -309,9 +302,7 @@ error DeploymentConfig_InvalidDeployerAddress(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -320,16 +311,14 @@ error DeploymentConfig_InvalidDeployerAddress(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DeploymentConfig_InvalidDeployerAddress) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DeploymentConfig_InvalidDeployerAddress { + impl ::core::convert::From> for DeploymentConfig_InvalidDeployerAddress { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -337,9 +326,7 @@ error DeploymentConfig_InvalidDeployerAddress(); #[automatically_derived] impl alloy_sol_types::SolError for DeploymentConfig_InvalidDeployerAddress { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "DeploymentConfig_InvalidDeployerAddress()"; const SELECTOR: [u8; 4] = [128u8, 88u8, 91u8, 68u8]; #[inline] @@ -355,9 +342,9 @@ error DeploymentConfig_InvalidDeployerAddress(); } }; /**Custom error with signature `DeploymentConfig_NoConfigForChain(uint256)` and selector `0x0b13dbff`. -```solidity -error DeploymentConfig_NoConfigForChain(uint256); -```*/ + ```solidity + error DeploymentConfig_NoConfigForChain(uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct DeploymentConfig_NoConfigForChain { @@ -372,9 +359,7 @@ error DeploymentConfig_NoConfigForChain(uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -383,16 +368,14 @@ error DeploymentConfig_NoConfigForChain(uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DeploymentConfig_NoConfigForChain) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DeploymentConfig_NoConfigForChain { + impl ::core::convert::From> for DeploymentConfig_NoConfigForChain { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -400,9 +383,7 @@ error DeploymentConfig_NoConfigForChain(uint256); #[automatically_derived] impl alloy_sol_types::SolError for DeploymentConfig_NoConfigForChain { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "DeploymentConfig_NoConfigForChain(uint256)"; const SELECTOR: [u8; 4] = [11u8, 19u8, 219u8, 255u8]; #[inline] @@ -414,17 +395,17 @@ error DeploymentConfig_NoConfigForChain(uint256); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._0), + as alloy_sol_types::SolType>::tokenize( + &self._0, + ), ) } } }; /**Constructor`. -```solidity -constructor(address _broadcaster); -```*/ + ```solidity + constructor(address _broadcaster); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct constructorCall { @@ -439,9 +420,7 @@ constructor(address _broadcaster); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -459,16 +438,16 @@ constructor(address _broadcaster); #[doc(hidden)] impl ::core::convert::From> for constructorCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _broadcaster: tuple.0 } + Self { + _broadcaster: tuple.0, + } } } } #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -486,9 +465,9 @@ constructor(address _broadcaster); } }; /**Function with signature `IS_SCRIPT()` and selector `0xf8ccbf47`. -```solidity -function IS_SCRIPT() external view returns (bool); -```*/ + ```solidity + function IS_SCRIPT() external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct IS_SCRIPTCall {} @@ -508,9 +487,7 @@ function IS_SCRIPT() external view returns (bool); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -539,9 +516,7 @@ function IS_SCRIPT() external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -566,14 +541,10 @@ function IS_SCRIPT() external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for IS_SCRIPTCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = IS_SCRIPTReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "IS_SCRIPT()"; const SELECTOR: [u8; 4] = [248u8, 204u8, 191u8, 71u8]; #[inline] @@ -591,17 +562,17 @@ function IS_SCRIPT() external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `activeNetworkConfig()` and selector `0xd7b65745`. -```solidity -function activeNetworkConfig() external view returns (address deployer); -```*/ + ```solidity + function activeNetworkConfig() external view returns (address deployer); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct activeNetworkConfigCall {} @@ -621,9 +592,7 @@ function activeNetworkConfig() external view returns (address deployer); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -632,16 +601,14 @@ function activeNetworkConfig() external view returns (address deployer); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: activeNetworkConfigCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for activeNetworkConfigCall { + impl ::core::convert::From> for activeNetworkConfigCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -654,9 +621,7 @@ function activeNetworkConfig() external view returns (address deployer); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -665,16 +630,14 @@ function activeNetworkConfig() external view returns (address deployer); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: activeNetworkConfigReturn) -> Self { (value.deployer,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for activeNetworkConfigReturn { + impl ::core::convert::From> for activeNetworkConfigReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { deployer: tuple.0 } } @@ -683,14 +646,10 @@ function activeNetworkConfig() external view returns (address deployer); #[automatically_derived] impl alloy_sol_types::SolCall for activeNetworkConfigCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = activeNetworkConfigReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "activeNetworkConfig()"; const SELECTOR: [u8; 4] = [215u8, 182u8, 87u8, 69u8]; #[inline] @@ -708,17 +667,17 @@ function activeNetworkConfig() external view returns (address deployer); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `getOrCreateAnvilEthConfig()` and selector `0x12900da8`. -```solidity -function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory); -```*/ + ```solidity + function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct getOrCreateAnvilEthConfigCall {} @@ -738,9 +697,7 @@ function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -749,16 +706,14 @@ function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getOrCreateAnvilEthConfigCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getOrCreateAnvilEthConfigCall { + impl ::core::convert::From> for getOrCreateAnvilEthConfigCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -768,14 +723,11 @@ function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory #[doc(hidden)] type UnderlyingSolTuple<'a> = (NetworkConfig,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -784,16 +736,14 @@ function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getOrCreateAnvilEthConfigReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getOrCreateAnvilEthConfigReturn { + impl ::core::convert::From> for getOrCreateAnvilEthConfigReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -802,14 +752,10 @@ function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory #[automatically_derived] impl alloy_sol_types::SolCall for getOrCreateAnvilEthConfigCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getOrCreateAnvilEthConfigReturn; type ReturnTuple<'a> = (NetworkConfig,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "getOrCreateAnvilEthConfig()"; const SELECTOR: [u8; 4] = [18u8, 144u8, 13u8, 168u8]; #[inline] @@ -827,17 +773,17 @@ function getOrCreateAnvilEthConfig() external view returns (NetworkConfig memory data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `test()` and selector `0xf8a8fd6d`. -```solidity -function test() external; -```*/ + ```solidity + function test() external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct testCall {} @@ -855,9 +801,7 @@ function test() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -886,9 +830,7 @@ function test() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -913,14 +855,10 @@ function test() external; #[automatically_derived] impl alloy_sol_types::SolCall for testCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = testReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "test()"; const SELECTOR: [u8; 4] = [248u8, 168u8, 253u8, 109u8]; #[inline] @@ -938,10 +876,10 @@ function test() external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -975,9 +913,7 @@ function test() external; #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::IS_SCRIPT(_) => { - ::SELECTOR - } + Self::IS_SCRIPT(_) => ::SELECTOR, Self::activeNetworkConfig(_) => { ::SELECTOR } @@ -1005,17 +941,17 @@ function test() external; static DECODE_SHIMS: &[fn( &[u8], bool, - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn getOrCreateAnvilEthConfig( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(DeploymentConfigCalls::getOrCreateAnvilEthConfig) + data, validate, + ) + .map(DeploymentConfigCalls::getOrCreateAnvilEthConfig) } getOrCreateAnvilEthConfig }, @@ -1025,10 +961,9 @@ function test() external; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(DeploymentConfigCalls::activeNetworkConfig) + data, validate, + ) + .map(DeploymentConfigCalls::activeNetworkConfig) } activeNetworkConfig }, @@ -1037,10 +972,7 @@ function test() external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(DeploymentConfigCalls::test) } test @@ -1050,22 +982,17 @@ function test() external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(DeploymentConfigCalls::IS_SCRIPT) } IS_SCRIPT }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -1076,9 +1003,7 @@ function test() external; ::abi_encoded_size(inner) } Self::activeNetworkConfig(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getOrCreateAnvilEthConfig(inner) => { ::abi_encoded_size( @@ -1094,21 +1019,16 @@ function test() external; fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::IS_SCRIPT(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::activeNetworkConfig(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::getOrCreateAnvilEthConfig(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::test(inner) => { @@ -1130,10 +1050,8 @@ function test() external; /// No guarantees are made about the order of the selectors. /// /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [11u8, 19u8, 219u8, 255u8], - [128u8, 88u8, 91u8, 68u8], - ]; + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[11u8, 19u8, 219u8, 255u8], [128u8, 88u8, 91u8, 68u8]]; } #[automatically_derived] impl alloy_sol_types::SolInterface for DeploymentConfigErrors { @@ -1169,7 +1087,8 @@ function test() external; static DECODE_SHIMS: &[fn( &[u8], bool, - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn DeploymentConfig_NoConfigForChain( data: &[u8], @@ -1202,12 +1121,10 @@ function test() external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -1247,7 +1164,7 @@ function test() external; use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`DeploymentConfig`](self) contract instance. -See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.*/ + See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -1261,9 +1178,9 @@ See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.* } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -1272,16 +1189,15 @@ For more fine-grained control over the deployment process, use [`deploy_builder` >( provider: P, _broadcaster: alloy::sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { DeploymentConfigInstance::::deploy(provider, _broadcaster) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1295,15 +1211,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`DeploymentConfig`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`DeploymentConfig`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`DeploymentConfig`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct DeploymentConfigInstance { address: alloy_sol_types::private::Address, @@ -1314,24 +1230,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for DeploymentConfigInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("DeploymentConfigInstance").field(&self.address).finish() + f.debug_tuple("DeploymentConfigInstance") + .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, - > DeploymentConfigInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > DeploymentConfigInstance + { /**Creates a new wrapper around an on-chain [`DeploymentConfig`](self) contract instance. -See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.*/ + See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -1340,9 +1256,9 @@ See the [wrapper's documentation](`DeploymentConfigInstance`) for more details.* } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( provider: P, @@ -1353,10 +1269,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` Ok(Self::new(contract_address, call_builder.provider)) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1366,12 +1282,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { _broadcaster }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { _broadcaster }) + [..], ] - .concat() - .into(), + .concat() + .into(), ) } /// Returns a reference to the address. @@ -1409,10 +1324,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeploymentConfigInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > DeploymentConfigInstance + { /// 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 @@ -1424,9 +1340,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) } ///Creates a new call builder for the [`IS_SCRIPT`] function. - pub fn IS_SCRIPT( - &self, - ) -> alloy_contract::SolCallBuilder { + pub fn IS_SCRIPT(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&IS_SCRIPTCall {}) } ///Creates a new call builder for the [`activeNetworkConfig`] function. @@ -1449,10 +1363,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > DeploymentConfigInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > DeploymentConfigInstance + { /// 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. diff --git a/crates/bindings/src/foo.rs b/crates/bindings/src/foo.rs deleted file mode 100644 index 887daa2..0000000 --- a/crates/bindings/src/foo.rs +++ /dev/null @@ -1,446 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface Foo { - function id(uint256 value) external pure returns (uint256); -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "function", - "name": "id", - "inputs": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - } -] -```*/ -#[allow(non_camel_case_types, non_snake_case, clippy::style)] -pub mod Foo { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x6080604052348015600f57600080fd5b5060658061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80637d3c40c814602d575b600080fd5b603b6038366004604d565b90565b60405190815260200160405180910390f35b600060208284031215605e57600080fd5b503591905056 - /// ``` - #[rustfmt::skip] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`e\x80a\0\x1E`\09`\0\xF3\xFE`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`(W`\x005`\xE0\x1C\x80c}<@\xC8\x14`-W[`\0\x80\xFD[`;`86`\x04`MV[\x90V[`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3[`\0` \x82\x84\x03\x12\x15`^W`\0\x80\xFD[P5\x91\x90PV", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x6080604052348015600f57600080fd5b506004361060285760003560e01c80637d3c40c814602d575b600080fd5b603b6038366004604d565b90565b60405190815260200160405180910390f35b600060208284031215605e57600080fd5b503591905056 - /// ``` - #[rustfmt::skip] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[P`\x046\x10`(W`\x005`\xE0\x1C\x80c}<@\xC8\x14`-W[`\0\x80\xFD[`;`86`\x04`MV[\x90V[`@Q\x90\x81R` \x01`@Q\x80\x91\x03\x90\xF3[`\0` \x82\x84\x03\x12\x15`^W`\0\x80\xFD[P5\x91\x90PV", - ); - /**Function with signature `id(uint256)` and selector `0x7d3c40c8`. -```solidity -function id(uint256 value) external pure returns (uint256); -```*/ - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct idCall { - pub value: alloy::sol_types::private::U256, - } - ///Container type for the return parameters of the [`id(uint256)`](idCall) function. - #[allow(non_camel_case_types, non_snake_case)] - #[derive(Clone)] - pub struct idReturn { - pub _0: alloy::sol_types::private::U256, - } - #[allow(non_camel_case_types, non_snake_case, 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,); - #[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: idCall) -> Self { - (value.value,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for idCall { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { value: tuple.0 } - } - } - } - { - #[doc(hidden)] - type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - #[doc(hidden)] - type UnderlyingRustTuple<'a> = (alloy::sol_types::private::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: idReturn) -> Self { - (value._0,) - } - } - #[automatically_derived] - #[doc(hidden)] - impl ::core::convert::From> for idReturn { - fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0 } - } - } - } - #[automatically_derived] - impl alloy_sol_types::SolCall for idCall { - type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = idReturn; - type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "id(uint256)"; - const SELECTOR: [u8; 4] = [125u8, 60u8, 64u8, 200u8]; - #[inline] - fn new<'a>( - tuple: as alloy_sol_types::SolType>::RustType, - ) -> Self { - tuple.into() - } - #[inline] - fn tokenize(&self) -> Self::Token<'_> { - ( - as alloy_sol_types::SolType>::tokenize(&self.value), - ) - } - #[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 [`Foo`](self) function calls. - pub enum FooCalls { - id(idCall), - } - #[automatically_derived] - impl FooCalls { - /// 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]] = &[[125u8, 60u8, 64u8, 200u8]]; - } - #[automatically_derived] - impl alloy_sol_types::SolInterface for FooCalls { - const NAME: &'static str = "FooCalls"; - const MIN_DATA_LENGTH: usize = 32usize; - const COUNT: usize = 1usize; - #[inline] - fn selector(&self) -> [u8; 4] { - match self { - Self::id(_) => ::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(unsafe_code, 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 id( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) - .map(FooCalls::id) - } - id - }, - ]; - let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); - }; - (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) - } - #[inline] - fn abi_encoded_size(&self) -> usize { - match self { - Self::id(inner) => { - ::abi_encoded_size(inner) - } - } - } - #[inline] - fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { - match self { - Self::id(inner) => { - ::abi_encode_raw(inner, out) - } - } - } - } - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`Foo`](self) contract instance. - -See the [wrapper's documentation](`FooInstance`) 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) -> FooInstance { - FooInstance::::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< - Output = alloy_contract::Result>, - > { - FooInstance::::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 { - FooInstance::::deploy_builder(provider) - } - /**A [`Foo`](self) instance. - -Contains type-safe methods for interacting with an on-chain instance of the -[`Foo`](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 FooInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for FooInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("FooInstance").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, - > FooInstance { - /**Creates a new wrapper around an on-chain [`Foo`](self) contract instance. - -See the [wrapper's documentation](`FooInstance`) 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 FooInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> FooInstance { - FooInstance { - 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, - > FooInstance { - /// 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 [`id`] function. - pub fn id( - &self, - value: alloy::sol_types::private::U256, - ) -> alloy_contract::SolCallBuilder { - self.call_builder(&idCall { value }) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > FooInstance { - /// 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) - } - } -} diff --git a/crates/bindings/src/ierc165.rs b/crates/bindings/src/ierc165.rs index 3ed1611..e550395 100644 --- a/crates/bindings/src/ierc165.rs +++ b/crates/bindings/src/ierc165.rs @@ -41,6 +41,7 @@ pub mod IERC165 { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -50,13 +51,14 @@ pub mod IERC165 { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. -```solidity -function supportsInterface(bytes4 interfaceID) external view returns (bool); -```*/ + ```solidity + function supportsInterface(bytes4 interfaceID) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct supportsInterfaceCall { @@ -78,9 +80,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -89,18 +89,18 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceCall) -> Self { (value.interfaceID,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceCall { + impl ::core::convert::From> for supportsInterfaceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { interfaceID: tuple.0 } + Self { + interfaceID: tuple.0, + } } } } @@ -111,9 +111,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -122,16 +120,14 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceReturn { + impl ::core::convert::From> for supportsInterfaceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -140,14 +136,10 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for supportsInterfaceCall { type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = supportsInterfaceReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "supportsInterface(bytes4)"; const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; #[inline] @@ -169,10 +161,10 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -218,31 +210,23 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ - { - fn supportsInterface( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) - .map(IERC165Calls::supportsInterface) - } - supportsInterface - }, - ]; + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[{ + fn supportsInterface( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(IERC165Calls::supportsInterface) + } + supportsInterface + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -250,9 +234,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); fn abi_encoded_size(&self) -> usize { match self { Self::supportsInterface(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -260,10 +242,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::supportsInterface(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -271,7 +250,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`IERC165`](self) contract instance. -See the [wrapper's documentation](`IERC165Instance`) for more details.*/ + See the [wrapper's documentation](`IERC165Instance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -285,9 +264,9 @@ See the [wrapper's documentation](`IERC165Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -295,35 +274,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { IERC165Instance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { IERC165Instance::::deploy_builder(provider) } /**A [`IERC165`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IERC165`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IERC165`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IERC165Instance { address: alloy_sol_types::private::Address, @@ -334,24 +314,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IERC165Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC165Instance").field(&self.address).finish() + f.debug_tuple("IERC165Instance") + .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, - > IERC165Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC165Instance + { /**Creates a new wrapper around an on-chain [`IERC165`](self) contract instance. -See the [wrapper's documentation](`IERC165Instance`) for more details.*/ + See the [wrapper's documentation](`IERC165Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -360,22 +340,20 @@ See the [wrapper's documentation](`IERC165Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -418,10 +396,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC165Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC165Instance + { /// 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 @@ -437,20 +416,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ &self, interfaceID: alloy::sol_types::private::FixedBytes<4>, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &supportsInterfaceCall { - interfaceID, - }, - ) + self.call_builder(&supportsInterfaceCall { interfaceID }) } } /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC165Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC165Instance + { /// 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. diff --git a/crates/bindings/src/ierc20.rs b/crates/bindings/src/ierc20.rs index f00b9e3..580ca17 100644 --- a/crates/bindings/src/ierc20.rs +++ b/crates/bindings/src/ierc20.rs @@ -255,6 +255,7 @@ pub mod IERC20 { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -264,13 +265,14 @@ pub mod IERC20 { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. -```solidity -event Approval(address indexed owner, address indexed spender, uint256 value); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Approval { @@ -287,49 +289,19 @@ event Approval(address indexed owner, address indexed spender, uint256 value); #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, + 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -346,14 +318,18 @@ event Approval(address indexed owner, address indexed spender, uint256 value); #[inline] fn tokenize_body(&self) -> Self::DataToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } #[inline] fn encode_topics_raw( @@ -363,9 +339,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -375,22 +349,27 @@ event Approval(address indexed owner, address indexed spender, uint256 value); Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + 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<&Approval> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Approval) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. -```solidity -event Transfer(address indexed from, address indexed to, uint256 value); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Transfer { @@ -407,49 +386,19 @@ event Transfer(address indexed from, address indexed to, uint256 value); #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, + 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, + 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -466,14 +415,18 @@ event Transfer(address indexed from, address indexed to, uint256 value); #[inline] fn tokenize_body(&self) -> Self::DataToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } #[inline] fn encode_topics_raw( @@ -483,9 +436,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -495,22 +446,27 @@ event Transfer(address indexed from, address indexed to, uint256 value); Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + 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<&Transfer> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. -```solidity -function allowance(address owner, address spender) external view returns (uint256); -```*/ + ```solidity + function allowance(address owner, address spender) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct allowanceCall { @@ -539,9 +495,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -573,9 +527,7 @@ function allowance(address owner, address spender) external view returns (uint25 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -603,14 +555,10 @@ function allowance(address owner, address spender) external view returns (uint25 alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = allowanceReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "allowance(address,address)"; const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; #[inline] @@ -635,17 +583,17 @@ function allowance(address owner, address spender) external view returns (uint25 data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct approveCall { @@ -674,9 +622,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -708,9 +654,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -738,14 +682,10 @@ function approve(address spender, uint256 amount) external returns (bool); alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = approveReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "approve(address,uint256)"; const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; #[inline] @@ -760,9 +700,9 @@ function approve(address spender, uint256 amount) external returns (bool); ::tokenize( &self.spender, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } #[inline] @@ -770,17 +710,17 @@ function approve(address spender, uint256 amount) external returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address account) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct balanceOfCall { @@ -802,9 +742,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -833,9 +771,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -860,14 +796,10 @@ function balanceOf(address account) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for balanceOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = balanceOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "balanceOf(address)"; const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; #[inline] @@ -889,17 +821,17 @@ function balanceOf(address account) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```solidity + function decimals() external view returns (uint8); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct decimalsCall {} @@ -919,9 +851,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -950,9 +880,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -977,14 +905,10 @@ function decimals() external view returns (uint8); #[automatically_derived] impl alloy_sol_types::SolCall for decimalsCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = decimalsReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "decimals()"; const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; #[inline] @@ -1002,17 +926,17 @@ function decimals() external view returns (uint8); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```solidity + function name() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct nameCall {} @@ -1032,9 +956,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1063,9 +985,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1090,14 +1010,10 @@ function name() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for nameCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = nameReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "name()"; const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; #[inline] @@ -1115,17 +1031,17 @@ function name() external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```solidity + function symbol() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct symbolCall {} @@ -1145,9 +1061,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1176,9 +1090,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1203,14 +1115,10 @@ function symbol() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for symbolCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = symbolReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "symbol()"; const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; #[inline] @@ -1228,17 +1136,17 @@ function symbol() external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `totalSupply()` and selector `0x18160ddd`. -```solidity -function totalSupply() external view returns (uint256); -```*/ + ```solidity + function totalSupply() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct totalSupplyCall {} @@ -1258,9 +1166,7 @@ function totalSupply() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1289,9 +1195,7 @@ function totalSupply() external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1316,14 +1220,10 @@ function totalSupply() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for totalSupplyCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = totalSupplyReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "totalSupply()"; const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; #[inline] @@ -1341,17 +1241,17 @@ function totalSupply() external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address to, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address to, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferCall { @@ -1380,9 +1280,7 @@ function transfer(address to, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1414,9 +1312,7 @@ function transfer(address to, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1444,14 +1340,10 @@ function transfer(address to, uint256 amount) external returns (bool); alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transfer(address,uint256)"; const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; #[inline] @@ -1466,9 +1358,9 @@ function transfer(address to, uint256 amount) external returns (bool); ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } #[inline] @@ -1476,17 +1368,17 @@ function transfer(address to, uint256 amount) external returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address from, address to, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address from, address to, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferFromCall { @@ -1518,9 +1410,7 @@ function transferFrom(address from, address to, uint256 amount) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1553,9 +1443,7 @@ function transferFrom(address from, address to, uint256 amount) external returns type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1584,14 +1472,10 @@ function transferFrom(address from, address to, uint256 amount) external returns alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferFromReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; #[inline] @@ -1609,9 +1493,9 @@ function transferFrom(address from, address to, uint256 amount) external returns ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } #[inline] @@ -1619,10 +1503,10 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -1666,23 +1550,15 @@ function transferFrom(address from, address to, uint256 amount) external returns #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, - Self::totalSupply(_) => { - ::SELECTOR - } + Self::totalSupply(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::SELECTOR, } } #[inline] @@ -1700,19 +1576,10 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { - fn name( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + fn name(data: &[u8], validate: bool) -> alloy_sol_types::Result { + ::abi_decode_raw(data, validate) .map(IERC20Calls::name) } name @@ -1722,10 +1589,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC20Calls::approve) } approve @@ -1736,10 +1600,9 @@ function transferFrom(address from, address to, uint256 amount) external returns validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC20Calls::totalSupply) + data, validate, + ) + .map(IERC20Calls::totalSupply) } totalSupply }, @@ -1749,10 +1612,9 @@ function transferFrom(address from, address to, uint256 amount) external returns validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC20Calls::transferFrom) + data, validate, + ) + .map(IERC20Calls::transferFrom) } transferFrom }, @@ -1761,10 +1623,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC20Calls::decimals) } decimals @@ -1774,23 +1633,14 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC20Calls::balanceOf) } balanceOf }, { - fn symbol( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + fn symbol(data: &[u8], validate: bool) -> alloy_sol_types::Result { + ::abi_decode_raw(data, validate) .map(IERC20Calls::symbol) } symbol @@ -1800,10 +1650,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC20Calls::transfer) } transfer @@ -1813,22 +1660,17 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC20Calls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -1854,17 +1696,13 @@ function transferFrom(address from, address to, uint256 amount) external returns ::abi_encoded_size(inner) } Self::totalSupply(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::transfer(inner) => { ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -1872,25 +1710,16 @@ function transferFrom(address from, address to, uint256 amount) external returns fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::name(inner) => { ::abi_encode_raw(inner, out) @@ -1899,22 +1728,13 @@ function transferFrom(address from, address to, uint256 amount) external returns ::abi_encode_raw(inner, out) } Self::totalSupply(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -1934,72 +1754,14 @@ function transferFrom(address from, address to, uint256 amount) external returns /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 32usize]] = &[ [ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, + 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, ], [ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, + 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, + 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, ], ]; } @@ -2014,31 +1776,40 @@ function transferFrom(address from, address to, uint256 amount) external returns ) -> alloy_sol_types::Result { match topics.first().copied() { Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Approval) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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 IERC20Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -2046,7 +1817,7 @@ function transferFrom(address from, address to, uint256 amount) external returns use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`IERC20`](self) contract instance. -See the [wrapper's documentation](`IERC20Instance`) for more details.*/ + See the [wrapper's documentation](`IERC20Instance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -2060,9 +1831,9 @@ See the [wrapper's documentation](`IERC20Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -2070,35 +1841,35 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { IERC20Instance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { IERC20Instance::::deploy_builder(provider) } /**A [`IERC20`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IERC20`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IERC20`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IERC20Instance { address: alloy_sol_types::private::Address, @@ -2109,24 +1880,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IERC20Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC20Instance").field(&self.address).finish() + f.debug_tuple("IERC20Instance") + .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, - > IERC20Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC20Instance + { /**Creates a new wrapper around an on-chain [`IERC20`](self) contract instance. -See the [wrapper's documentation](`IERC20Instance`) for more details.*/ + See the [wrapper's documentation](`IERC20Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -2135,22 +1906,20 @@ See the [wrapper's documentation](`IERC20Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -2193,10 +1962,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC20Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC20Instance + { /// 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 @@ -2231,9 +2001,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.call_builder(&balanceOfCall { account }) } ///Creates a new call builder for the [`decimals`] function. - pub fn decimals( - &self, - ) -> alloy_contract::SolCallBuilder { + pub fn decimals(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&decimalsCall {}) } ///Creates a new call builder for the [`name`] function. @@ -2245,9 +2013,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.call_builder(&symbolCall {}) } ///Creates a new call builder for the [`totalSupply`] function. - pub fn totalSupply( - &self, - ) -> alloy_contract::SolCallBuilder { + pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&totalSupplyCall {}) } ///Creates a new call builder for the [`transfer`] function. @@ -2265,22 +2031,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy::sol_types::private::Address, amount: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &transferFromCall { - from, - to, - amount, - }, - ) + self.call_builder(&transferFromCall { from, to, amount }) } } /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC20Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC20Instance + { /// 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. diff --git a/crates/bindings/src/ierc721.rs b/crates/bindings/src/ierc721.rs index 0670c9f..2719bcf 100644 --- a/crates/bindings/src/ierc721.rs +++ b/crates/bindings/src/ierc721.rs @@ -320,6 +320,7 @@ pub mod IERC721 { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -329,13 +330,14 @@ pub mod IERC721 { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. -```solidity -event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); -```*/ + ```solidity + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Approval { @@ -352,9 +354,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -362,40 +362,12 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, + 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -430,9 +402,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -445,22 +415,27 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + 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<&Approval> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Approval) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. -```solidity -event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); -```*/ + ```solidity + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct ApprovalForAll { @@ -477,49 +452,19 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap #[automatically_derived] impl alloy_sol_types::SolEvent for ApprovalForAll { type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, + 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, + 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -557,9 +502,7 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -569,22 +512,27 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + 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<&ApprovalForAll> for alloy_sol_types::private::LogData { #[inline] fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. -```solidity -event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); -```*/ + ```solidity + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Transfer { @@ -601,9 +549,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -611,40 +557,12 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, + 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, + 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -679,9 +597,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._from, ); @@ -694,22 +610,27 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + 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<&Transfer> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address _approved, uint256 _tokenId) external payable; -```*/ + ```solidity + function approve(address _approved, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct approveCall { @@ -736,9 +657,7 @@ function approve(address _approved, uint256 _tokenId) external payable; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -770,9 +689,7 @@ function approve(address _approved, uint256 _tokenId) external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -800,14 +717,10 @@ function approve(address _approved, uint256 _tokenId) external payable; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = approveReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "approve(address,uint256)"; const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; #[inline] @@ -822,9 +735,9 @@ function approve(address _approved, uint256 _tokenId) external payable; ::tokenize( &self._approved, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -832,17 +745,17 @@ function approve(address _approved, uint256 _tokenId) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address _owner) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address _owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct balanceOfCall { @@ -864,9 +777,7 @@ function balanceOf(address _owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -895,9 +806,7 @@ function balanceOf(address _owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -922,14 +831,10 @@ function balanceOf(address _owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for balanceOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = balanceOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "balanceOf(address)"; const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; #[inline] @@ -951,17 +856,17 @@ function balanceOf(address _owner) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. -```solidity -function getApproved(uint256 _tokenId) external view returns (address); -```*/ + ```solidity + function getApproved(uint256 _tokenId) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct getApprovedCall { @@ -983,9 +888,7 @@ function getApproved(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1014,9 +917,7 @@ function getApproved(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1041,14 +942,10 @@ function getApproved(uint256 _tokenId) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for getApprovedCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getApprovedReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "getApproved(uint256)"; const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; #[inline] @@ -1060,9 +957,9 @@ function getApproved(uint256 _tokenId) external view returns (address); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1070,17 +967,17 @@ function getApproved(uint256 _tokenId) external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. -```solidity -function isApprovedForAll(address _owner, address _operator) external view returns (bool); -```*/ + ```solidity + function isApprovedForAll(address _owner, address _operator) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct isApprovedForAllCall { @@ -1109,9 +1006,7 @@ function isApprovedForAll(address _owner, address _operator) external view retur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1120,16 +1015,14 @@ function isApprovedForAll(address _owner, address _operator) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllCall) -> Self { (value._owner, value._operator) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllCall { + impl ::core::convert::From> for isApprovedForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _owner: tuple.0, @@ -1145,9 +1038,7 @@ function isApprovedForAll(address _owner, address _operator) external view retur type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1156,16 +1047,14 @@ function isApprovedForAll(address _owner, address _operator) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllReturn { + impl ::core::convert::From> for isApprovedForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1177,14 +1066,10 @@ function isApprovedForAll(address _owner, address _operator) external view retur alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = isApprovedForAllReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; #[inline] @@ -1209,17 +1094,17 @@ function isApprovedForAll(address _owner, address _operator) external view retur data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. -```solidity -function ownerOf(uint256 _tokenId) external view returns (address); -```*/ + ```solidity + function ownerOf(uint256 _tokenId) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct ownerOfCall { @@ -1241,9 +1126,7 @@ function ownerOf(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1272,9 +1155,7 @@ function ownerOf(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1299,14 +1180,10 @@ function ownerOf(uint256 _tokenId) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ownerOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "ownerOf(uint256)"; const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; #[inline] @@ -1318,9 +1195,9 @@ function ownerOf(uint256 _tokenId) external view returns (address); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1328,17 +1205,17 @@ function ownerOf(uint256 _tokenId) external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. -```solidity -function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; -```*/ + ```solidity + function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_0Call { @@ -1368,9 +1245,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1379,16 +1254,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Call) -> Self { (value._from, value._to, value._tokenId) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Call { + impl ::core::convert::From> for safeTransferFrom_0Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _from: tuple.0, @@ -1405,9 +1278,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1416,16 +1287,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Return { + impl ::core::convert::From> for safeTransferFrom_0Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1438,14 +1307,10 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_0Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; #[inline] @@ -1463,9 +1328,9 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1473,17 +1338,17 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. -```solidity -function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; -```*/ + ```solidity + function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_1Call { @@ -1516,9 +1381,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1527,16 +1390,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Call) -> Self { (value._from, value._to, value._tokenId, value.data) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Call { + impl ::core::convert::From> for safeTransferFrom_1Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _from: tuple.0, @@ -1554,9 +1415,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1565,16 +1424,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Return { + impl ::core::convert::From> for safeTransferFrom_1Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1588,14 +1445,10 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me alloy::sol_types::sol_data::Uint<256>, alloy::sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_1Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; #[inline] @@ -1613,9 +1466,9 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ::tokenize( &self.data, ), @@ -1626,17 +1479,17 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. -```solidity -function setApprovalForAll(address _operator, bool _approved) external; -```*/ + ```solidity + function setApprovalForAll(address _operator, bool _approved) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct setApprovalForAllCall { @@ -1660,9 +1513,7 @@ function setApprovalForAll(address _operator, bool _approved) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1671,16 +1522,14 @@ function setApprovalForAll(address _operator, bool _approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllCall) -> Self { (value._operator, value._approved) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllCall { + impl ::core::convert::From> for setApprovalForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _operator: tuple.0, @@ -1696,9 +1545,7 @@ function setApprovalForAll(address _operator, bool _approved) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1707,16 +1554,14 @@ function setApprovalForAll(address _operator, bool _approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllReturn { + impl ::core::convert::From> for setApprovalForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1728,14 +1573,10 @@ function setApprovalForAll(address _operator, bool _approved) external; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setApprovalForAllReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; #[inline] @@ -1760,17 +1601,17 @@ function setApprovalForAll(address _operator, bool _approved) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. -```solidity -function supportsInterface(bytes4 interfaceID) external view returns (bool); -```*/ + ```solidity + function supportsInterface(bytes4 interfaceID) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct supportsInterfaceCall { @@ -1792,9 +1633,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1803,18 +1642,18 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceCall) -> Self { (value.interfaceID,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceCall { + impl ::core::convert::From> for supportsInterfaceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { interfaceID: tuple.0 } + Self { + interfaceID: tuple.0, + } } } } @@ -1825,9 +1664,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1836,16 +1673,14 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceReturn { + impl ::core::convert::From> for supportsInterfaceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1854,14 +1689,10 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for supportsInterfaceCall { type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = supportsInterfaceReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "supportsInterface(bytes4)"; const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; #[inline] @@ -1883,17 +1714,17 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address _from, address _to, uint256 _tokenId) external payable; -```*/ + ```solidity + function transferFrom(address _from, address _to, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferFromCall { @@ -1923,9 +1754,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1958,9 +1787,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1989,14 +1816,10 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferFromReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; #[inline] @@ -2014,9 +1837,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -2024,10 +1847,10 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -2074,12 +1897,8 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay fn selector(&self) -> [u8; 4] { match self { Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } - Self::getApproved(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, + Self::getApproved(_) => ::SELECTOR, Self::isApprovedForAll(_) => { ::SELECTOR } @@ -2096,9 +1915,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay Self::supportsInterface(_) => { ::SELECTOR } - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::SELECTOR, } } #[inline] @@ -2116,20 +1933,16 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { fn supportsInterface( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721Calls::supportsInterface) + data, validate, + ) + .map(IERC721Calls::supportsInterface) } supportsInterface }, @@ -2139,10 +1952,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721Calls::getApproved) + data, validate, + ) + .map(IERC721Calls::getApproved) } getApproved }, @@ -2151,10 +1963,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721Calls::approve) } approve @@ -2165,10 +1974,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721Calls::transferFrom) + data, validate, + ) + .map(IERC721Calls::transferFrom) } transferFrom }, @@ -2178,10 +1986,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721Calls::safeTransferFrom_0) + data, validate, + ) + .map(IERC721Calls::safeTransferFrom_0) } safeTransferFrom_0 }, @@ -2190,10 +1997,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721Calls::ownerOf) } ownerOf @@ -2203,10 +2007,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721Calls::balanceOf) } balanceOf @@ -2217,10 +2018,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721Calls::setApprovalForAll) + data, validate, + ) + .map(IERC721Calls::setApprovalForAll) } setApprovalForAll }, @@ -2230,10 +2030,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721Calls::safeTransferFrom_1) + data, validate, + ) + .map(IERC721Calls::safeTransferFrom_1) } safeTransferFrom_1 }, @@ -2243,21 +2042,18 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721Calls::isApprovedForAll) + data, validate, + ) + .map(IERC721Calls::isApprovedForAll) } isApprovedForAll }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -2271,42 +2067,28 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encoded_size(inner) } Self::getApproved(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::isApprovedForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::ownerOf(inner) => { ::abi_encoded_size(inner) } Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setApprovalForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::supportsInterface(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -2317,55 +2099,31 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getApproved(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::isApprovedForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::ownerOf(inner) => { ::abi_encode_raw(inner, out) } Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setApprovalForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::supportsInterface(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -2386,106 +2144,19 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 32usize]] = &[ [ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, + 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, + 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, ], [ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, + 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, ], [ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, + 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, + 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, ], ]; } @@ -2500,39 +2171,52 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ) -> alloy_sol_types::Result { match topics.first().copied() { Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Approval) } Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - validate, - ) - .map(Self::ApprovalForAll) + topics, data, validate, + ) + .map(Self::ApprovalForAll) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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 IERC721Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -2540,7 +2224,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`IERC721`](self) contract instance. -See the [wrapper's documentation](`IERC721Instance`) for more details.*/ + See the [wrapper's documentation](`IERC721Instance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -2554,9 +2238,9 @@ See the [wrapper's documentation](`IERC721Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -2564,35 +2248,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { IERC721Instance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { IERC721Instance::::deploy_builder(provider) } /**A [`IERC721`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IERC721`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IERC721`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IERC721Instance { address: alloy_sol_types::private::Address, @@ -2603,24 +2288,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IERC721Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721Instance").field(&self.address).finish() + f.debug_tuple("IERC721Instance") + .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, - > IERC721Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721Instance + { /**Creates a new wrapper around an on-chain [`IERC721`](self) contract instance. -See the [wrapper's documentation](`IERC721Instance`) for more details.*/ + See the [wrapper's documentation](`IERC721Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -2629,22 +2314,20 @@ See the [wrapper's documentation](`IERC721Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -2687,10 +2370,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721Instance + { /// 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 @@ -2707,7 +2391,10 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _approved: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { _approved, _tokenId }) + self.call_builder(&approveCall { + _approved, + _tokenId, + }) } ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( @@ -2729,12 +2416,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _owner: alloy::sol_types::private::Address, _operator: alloy::sol_types::private::Address, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &isApprovedForAllCall { - _owner, - _operator, - }, - ) + self.call_builder(&isApprovedForAllCall { _owner, _operator }) } ///Creates a new call builder for the [`ownerOf`] function. pub fn ownerOf( @@ -2750,13 +2432,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _to: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_0Call { - _from, - _to, - _tokenId, - }, - ) + self.call_builder(&safeTransferFrom_0Call { + _from, + _to, + _tokenId, + }) } ///Creates a new call builder for the [`safeTransferFrom_1`] function. pub fn safeTransferFrom_1( @@ -2766,14 +2446,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _tokenId: alloy::sol_types::private::U256, data: alloy::sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_1Call { - _from, - _to, - _tokenId, - data, - }, - ) + self.call_builder(&safeTransferFrom_1Call { + _from, + _to, + _tokenId, + data, + }) } ///Creates a new call builder for the [`setApprovalForAll`] function. pub fn setApprovalForAll( @@ -2781,23 +2459,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _operator: alloy::sol_types::private::Address, _approved: bool, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &setApprovalForAllCall { - _operator, - _approved, - }, - ) + self.call_builder(&setApprovalForAllCall { + _operator, + _approved, + }) } ///Creates a new call builder for the [`supportsInterface`] function. pub fn supportsInterface( &self, interfaceID: alloy::sol_types::private::FixedBytes<4>, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &supportsInterfaceCall { - interfaceID, - }, - ) + self.call_builder(&supportsInterfaceCall { interfaceID }) } ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( @@ -2806,22 +2478,21 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _to: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &transferFromCall { - _from, - _to, - _tokenId, - }, - ) + self.call_builder(&transferFromCall { + _from, + _to, + _tokenId, + }) } } /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721Instance + { /// 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. @@ -2836,9 +2507,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.event_filter::() } ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter( - &self, - ) -> alloy_contract::Event { + pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { self.event_filter::() } ///Creates a new event filter for the [`Transfer`] event. diff --git a/crates/bindings/src/ierc721enumerable.rs b/crates/bindings/src/ierc721enumerable.rs index 9b97067..d655e61 100644 --- a/crates/bindings/src/ierc721enumerable.rs +++ b/crates/bindings/src/ierc721enumerable.rs @@ -379,6 +379,7 @@ pub mod IERC721Enumerable { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -388,13 +389,14 @@ pub mod IERC721Enumerable { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. -```solidity -event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); -```*/ + ```solidity + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Approval { @@ -411,9 +413,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -421,40 +421,12 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, + 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -489,9 +461,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -504,22 +474,27 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + 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<&Approval> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Approval) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. -```solidity -event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); -```*/ + ```solidity + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct ApprovalForAll { @@ -536,49 +511,19 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap #[automatically_derived] impl alloy_sol_types::SolEvent for ApprovalForAll { type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, + 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, + 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -616,9 +561,7 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -628,22 +571,27 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + 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<&ApprovalForAll> for alloy_sol_types::private::LogData { #[inline] fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. -```solidity -event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); -```*/ + ```solidity + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Transfer { @@ -660,9 +608,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -670,40 +616,12 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, + 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, + 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -738,9 +656,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._from, ); @@ -753,22 +669,27 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + 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<&Transfer> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address _approved, uint256 _tokenId) external payable; -```*/ + ```solidity + function approve(address _approved, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct approveCall { @@ -795,9 +716,7 @@ function approve(address _approved, uint256 _tokenId) external payable; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -829,9 +748,7 @@ function approve(address _approved, uint256 _tokenId) external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -859,14 +776,10 @@ function approve(address _approved, uint256 _tokenId) external payable; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = approveReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "approve(address,uint256)"; const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; #[inline] @@ -881,9 +794,9 @@ function approve(address _approved, uint256 _tokenId) external payable; ::tokenize( &self._approved, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -891,17 +804,17 @@ function approve(address _approved, uint256 _tokenId) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address _owner) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address _owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct balanceOfCall { @@ -923,9 +836,7 @@ function balanceOf(address _owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -954,9 +865,7 @@ function balanceOf(address _owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -981,14 +890,10 @@ function balanceOf(address _owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for balanceOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = balanceOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "balanceOf(address)"; const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; #[inline] @@ -1010,17 +915,17 @@ function balanceOf(address _owner) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. -```solidity -function getApproved(uint256 _tokenId) external view returns (address); -```*/ + ```solidity + function getApproved(uint256 _tokenId) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct getApprovedCall { @@ -1042,9 +947,7 @@ function getApproved(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1073,9 +976,7 @@ function getApproved(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1100,14 +1001,10 @@ function getApproved(uint256 _tokenId) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for getApprovedCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getApprovedReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "getApproved(uint256)"; const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; #[inline] @@ -1119,9 +1016,9 @@ function getApproved(uint256 _tokenId) external view returns (address); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1129,17 +1026,17 @@ function getApproved(uint256 _tokenId) external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. -```solidity -function isApprovedForAll(address _owner, address _operator) external view returns (bool); -```*/ + ```solidity + function isApprovedForAll(address _owner, address _operator) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct isApprovedForAllCall { @@ -1168,9 +1065,7 @@ function isApprovedForAll(address _owner, address _operator) external view retur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1179,16 +1074,14 @@ function isApprovedForAll(address _owner, address _operator) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllCall) -> Self { (value._owner, value._operator) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllCall { + impl ::core::convert::From> for isApprovedForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _owner: tuple.0, @@ -1204,9 +1097,7 @@ function isApprovedForAll(address _owner, address _operator) external view retur type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1215,16 +1106,14 @@ function isApprovedForAll(address _owner, address _operator) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllReturn { + impl ::core::convert::From> for isApprovedForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1236,14 +1125,10 @@ function isApprovedForAll(address _owner, address _operator) external view retur alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = isApprovedForAllReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; #[inline] @@ -1268,17 +1153,17 @@ function isApprovedForAll(address _owner, address _operator) external view retur data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. -```solidity -function ownerOf(uint256 _tokenId) external view returns (address); -```*/ + ```solidity + function ownerOf(uint256 _tokenId) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct ownerOfCall { @@ -1300,9 +1185,7 @@ function ownerOf(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1331,9 +1214,7 @@ function ownerOf(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1358,14 +1239,10 @@ function ownerOf(uint256 _tokenId) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ownerOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "ownerOf(uint256)"; const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; #[inline] @@ -1377,9 +1254,9 @@ function ownerOf(uint256 _tokenId) external view returns (address); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1387,17 +1264,17 @@ function ownerOf(uint256 _tokenId) external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. -```solidity -function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; -```*/ + ```solidity + function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_0Call { @@ -1427,9 +1304,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1438,16 +1313,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Call) -> Self { (value._from, value._to, value._tokenId) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Call { + impl ::core::convert::From> for safeTransferFrom_0Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _from: tuple.0, @@ -1464,9 +1337,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1475,16 +1346,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Return { + impl ::core::convert::From> for safeTransferFrom_0Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1497,14 +1366,10 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_0Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; #[inline] @@ -1522,9 +1387,9 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1532,17 +1397,17 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. -```solidity -function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; -```*/ + ```solidity + function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_1Call { @@ -1575,9 +1440,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1586,16 +1449,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Call) -> Self { (value._from, value._to, value._tokenId, value.data) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Call { + impl ::core::convert::From> for safeTransferFrom_1Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _from: tuple.0, @@ -1613,9 +1474,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1624,16 +1483,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Return { + impl ::core::convert::From> for safeTransferFrom_1Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1647,14 +1504,10 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me alloy::sol_types::sol_data::Uint<256>, alloy::sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_1Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; #[inline] @@ -1672,9 +1525,9 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ::tokenize( &self.data, ), @@ -1685,17 +1538,17 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. -```solidity -function setApprovalForAll(address _operator, bool _approved) external; -```*/ + ```solidity + function setApprovalForAll(address _operator, bool _approved) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct setApprovalForAllCall { @@ -1719,9 +1572,7 @@ function setApprovalForAll(address _operator, bool _approved) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1730,16 +1581,14 @@ function setApprovalForAll(address _operator, bool _approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllCall) -> Self { (value._operator, value._approved) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllCall { + impl ::core::convert::From> for setApprovalForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _operator: tuple.0, @@ -1755,9 +1604,7 @@ function setApprovalForAll(address _operator, bool _approved) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1766,16 +1613,14 @@ function setApprovalForAll(address _operator, bool _approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllReturn { + impl ::core::convert::From> for setApprovalForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1787,14 +1632,10 @@ function setApprovalForAll(address _operator, bool _approved) external; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setApprovalForAllReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; #[inline] @@ -1819,17 +1660,17 @@ function setApprovalForAll(address _operator, bool _approved) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. -```solidity -function supportsInterface(bytes4 interfaceID) external view returns (bool); -```*/ + ```solidity + function supportsInterface(bytes4 interfaceID) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct supportsInterfaceCall { @@ -1851,9 +1692,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1862,18 +1701,18 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceCall) -> Self { (value.interfaceID,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceCall { + impl ::core::convert::From> for supportsInterfaceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { interfaceID: tuple.0 } + Self { + interfaceID: tuple.0, + } } } } @@ -1884,9 +1723,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1895,16 +1732,14 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceReturn { + impl ::core::convert::From> for supportsInterfaceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1913,14 +1748,10 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for supportsInterfaceCall { type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = supportsInterfaceReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "supportsInterface(bytes4)"; const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; #[inline] @@ -1942,17 +1773,17 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7`. -```solidity -function tokenByIndex(uint256 _index) external view returns (uint256); -```*/ + ```solidity + function tokenByIndex(uint256 _index) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct tokenByIndexCall { @@ -1974,9 +1805,7 @@ function tokenByIndex(uint256 _index) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2005,9 +1834,7 @@ function tokenByIndex(uint256 _index) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2032,14 +1859,10 @@ function tokenByIndex(uint256 _index) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for tokenByIndexCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = tokenByIndexReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "tokenByIndex(uint256)"; const SELECTOR: [u8; 4] = [79u8, 108u8, 204u8, 231u8]; #[inline] @@ -2051,9 +1874,9 @@ function tokenByIndex(uint256 _index) external view returns (uint256); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._index), + as alloy_sol_types::SolType>::tokenize( + &self._index, + ), ) } #[inline] @@ -2061,17 +1884,17 @@ function tokenByIndex(uint256 _index) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59`. -```solidity -function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); -```*/ + ```solidity + function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct tokenOfOwnerByIndexCall { @@ -2100,9 +1923,7 @@ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view retur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2111,16 +1932,14 @@ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: tokenOfOwnerByIndexCall) -> Self { (value._owner, value._index) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for tokenOfOwnerByIndexCall { + impl ::core::convert::From> for tokenOfOwnerByIndexCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _owner: tuple.0, @@ -2136,9 +1955,7 @@ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view retur type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2147,16 +1964,14 @@ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: tokenOfOwnerByIndexReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for tokenOfOwnerByIndexReturn { + impl ::core::convert::From> for tokenOfOwnerByIndexReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2168,14 +1983,10 @@ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view retur alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = tokenOfOwnerByIndexReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "tokenOfOwnerByIndex(address,uint256)"; const SELECTOR: [u8; 4] = [47u8, 116u8, 92u8, 89u8]; #[inline] @@ -2190,9 +2001,9 @@ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view retur ::tokenize( &self._owner, ), - as alloy_sol_types::SolType>::tokenize(&self._index), + as alloy_sol_types::SolType>::tokenize( + &self._index, + ), ) } #[inline] @@ -2200,17 +2011,17 @@ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view retur data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `totalSupply()` and selector `0x18160ddd`. -```solidity -function totalSupply() external view returns (uint256); -```*/ + ```solidity + function totalSupply() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct totalSupplyCall {} @@ -2230,9 +2041,7 @@ function totalSupply() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2261,9 +2070,7 @@ function totalSupply() external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2288,14 +2095,10 @@ function totalSupply() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for totalSupplyCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = totalSupplyReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "totalSupply()"; const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; #[inline] @@ -2313,17 +2116,17 @@ function totalSupply() external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address _from, address _to, uint256 _tokenId) external payable; -```*/ + ```solidity + function transferFrom(address _from, address _to, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferFromCall { @@ -2353,9 +2156,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2388,9 +2189,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2419,14 +2218,10 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferFromReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; #[inline] @@ -2444,9 +2239,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -2454,10 +2249,10 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -2510,12 +2305,8 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay fn selector(&self) -> [u8; 4] { match self { Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } - Self::getApproved(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, + Self::getApproved(_) => ::SELECTOR, Self::isApprovedForAll(_) => { ::SELECTOR } @@ -2532,18 +2323,12 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay Self::supportsInterface(_) => { ::SELECTOR } - Self::tokenByIndex(_) => { - ::SELECTOR - } + Self::tokenByIndex(_) => ::SELECTOR, Self::tokenOfOwnerByIndex(_) => { ::SELECTOR } - Self::totalSupply(_) => { - ::SELECTOR - } - Self::transferFrom(_) => { - ::SELECTOR - } + Self::totalSupply(_) => ::SELECTOR, + Self::transferFrom(_) => ::SELECTOR, } } #[inline] @@ -2564,17 +2349,17 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay static DECODE_SHIMS: &[fn( &[u8], bool, - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn supportsInterface( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::supportsInterface) + data, validate, + ) + .map(IERC721EnumerableCalls::supportsInterface) } supportsInterface }, @@ -2584,10 +2369,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::getApproved) + data, validate, + ) + .map(IERC721EnumerableCalls::getApproved) } getApproved }, @@ -2596,10 +2380,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721EnumerableCalls::approve) } approve @@ -2610,10 +2391,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::totalSupply) + data, validate, + ) + .map(IERC721EnumerableCalls::totalSupply) } totalSupply }, @@ -2623,10 +2403,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::transferFrom) + data, validate, + ) + .map(IERC721EnumerableCalls::transferFrom) } transferFrom }, @@ -2636,10 +2415,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::tokenOfOwnerByIndex) + data, validate, + ) + .map(IERC721EnumerableCalls::tokenOfOwnerByIndex) } tokenOfOwnerByIndex }, @@ -2649,10 +2427,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::safeTransferFrom_0) + data, validate, + ) + .map(IERC721EnumerableCalls::safeTransferFrom_0) } safeTransferFrom_0 }, @@ -2662,10 +2439,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::tokenByIndex) + data, validate, + ) + .map(IERC721EnumerableCalls::tokenByIndex) } tokenByIndex }, @@ -2674,10 +2450,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721EnumerableCalls::ownerOf) } ownerOf @@ -2687,10 +2460,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721EnumerableCalls::balanceOf) } balanceOf @@ -2701,10 +2471,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::setApprovalForAll) + data, validate, + ) + .map(IERC721EnumerableCalls::setApprovalForAll) } setApprovalForAll }, @@ -2714,10 +2483,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::safeTransferFrom_1) + data, validate, + ) + .map(IERC721EnumerableCalls::safeTransferFrom_1) } safeTransferFrom_1 }, @@ -2727,21 +2495,18 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721EnumerableCalls::isApprovedForAll) + data, validate, + ) + .map(IERC721EnumerableCalls::isApprovedForAll) } isApprovedForAll }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -2755,57 +2520,37 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encoded_size(inner) } Self::getApproved(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::isApprovedForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::ownerOf(inner) => { ::abi_encoded_size(inner) } Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setApprovalForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::supportsInterface(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::tokenByIndex(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::tokenOfOwnerByIndex(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::totalSupply(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -2816,73 +2561,42 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getApproved(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::isApprovedForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::ownerOf(inner) => { ::abi_encode_raw(inner, out) } Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setApprovalForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::supportsInterface(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::tokenByIndex(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::tokenOfOwnerByIndex(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::totalSupply(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -2903,106 +2617,19 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 32usize]] = &[ [ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, + 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, + 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, ], [ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, + 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, ], [ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, + 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, + 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, ], ]; } @@ -3017,39 +2644,52 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ) -> alloy_sol_types::Result { match topics.first().copied() { Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Approval) } Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - validate, - ) - .map(Self::ApprovalForAll) + topics, data, validate, + ) + .map(Self::ApprovalForAll) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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 IERC721EnumerableEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -3057,7 +2697,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`IERC721Enumerable`](self) contract instance. -See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ + See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -3071,9 +2711,9 @@ See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details. } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -3081,35 +2721,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { IERC721EnumerableInstance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { IERC721EnumerableInstance::::deploy_builder(provider) } /**A [`IERC721Enumerable`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IERC721Enumerable`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IERC721Enumerable`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IERC721EnumerableInstance { address: alloy_sol_types::private::Address, @@ -3120,24 +2761,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IERC721EnumerableInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721EnumerableInstance").field(&self.address).finish() + f.debug_tuple("IERC721EnumerableInstance") + .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, - > IERC721EnumerableInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721EnumerableInstance + { /**Creates a new wrapper around an on-chain [`IERC721Enumerable`](self) contract instance. -See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ + See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -3146,9 +2787,9 @@ See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details. } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( provider: P, @@ -3158,10 +2799,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` Ok(Self::new(contract_address, call_builder.provider)) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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( @@ -3204,10 +2845,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721EnumerableInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721EnumerableInstance + { /// 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 @@ -3224,7 +2866,10 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _approved: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { _approved, _tokenId }) + self.call_builder(&approveCall { + _approved, + _tokenId, + }) } ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( @@ -3246,12 +2891,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _owner: alloy::sol_types::private::Address, _operator: alloy::sol_types::private::Address, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &isApprovedForAllCall { - _owner, - _operator, - }, - ) + self.call_builder(&isApprovedForAllCall { _owner, _operator }) } ///Creates a new call builder for the [`ownerOf`] function. pub fn ownerOf( @@ -3267,13 +2907,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _to: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_0Call { - _from, - _to, - _tokenId, - }, - ) + self.call_builder(&safeTransferFrom_0Call { + _from, + _to, + _tokenId, + }) } ///Creates a new call builder for the [`safeTransferFrom_1`] function. pub fn safeTransferFrom_1( @@ -3283,14 +2921,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _tokenId: alloy::sol_types::private::U256, data: alloy::sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_1Call { - _from, - _to, - _tokenId, - data, - }, - ) + self.call_builder(&safeTransferFrom_1Call { + _from, + _to, + _tokenId, + data, + }) } ///Creates a new call builder for the [`setApprovalForAll`] function. pub fn setApprovalForAll( @@ -3298,23 +2934,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _operator: alloy::sol_types::private::Address, _approved: bool, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &setApprovalForAllCall { - _operator, - _approved, - }, - ) + self.call_builder(&setApprovalForAllCall { + _operator, + _approved, + }) } ///Creates a new call builder for the [`supportsInterface`] function. pub fn supportsInterface( &self, interfaceID: alloy::sol_types::private::FixedBytes<4>, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &supportsInterfaceCall { - interfaceID, - }, - ) + self.call_builder(&supportsInterfaceCall { interfaceID }) } ///Creates a new call builder for the [`tokenByIndex`] function. pub fn tokenByIndex( @@ -3329,17 +2959,10 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _owner: alloy::sol_types::private::Address, _index: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &tokenOfOwnerByIndexCall { - _owner, - _index, - }, - ) + self.call_builder(&tokenOfOwnerByIndexCall { _owner, _index }) } ///Creates a new call builder for the [`totalSupply`] function. - pub fn totalSupply( - &self, - ) -> alloy_contract::SolCallBuilder { + pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&totalSupplyCall {}) } ///Creates a new call builder for the [`transferFrom`] function. @@ -3349,22 +2972,21 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _to: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &transferFromCall { - _from, - _to, - _tokenId, - }, - ) + self.call_builder(&transferFromCall { + _from, + _to, + _tokenId, + }) } } /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721EnumerableInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721EnumerableInstance + { /// 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. @@ -3379,9 +3001,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.event_filter::() } ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter( - &self, - ) -> alloy_contract::Event { + pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { self.event_filter::() } ///Creates a new event filter for the [`Transfer`] event. diff --git a/crates/bindings/src/ierc721metadata.rs b/crates/bindings/src/ierc721metadata.rs index 08aeaeb..4e8353e 100644 --- a/crates/bindings/src/ierc721metadata.rs +++ b/crates/bindings/src/ierc721metadata.rs @@ -368,6 +368,7 @@ pub mod IERC721Metadata { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -377,13 +378,14 @@ pub mod IERC721Metadata { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. -```solidity -event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); -```*/ + ```solidity + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Approval { @@ -400,9 +402,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -410,40 +410,12 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, + 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -478,9 +450,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -493,22 +463,27 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + 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<&Approval> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Approval) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. -```solidity -event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); -```*/ + ```solidity + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct ApprovalForAll { @@ -525,49 +500,19 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap #[automatically_derived] impl alloy_sol_types::SolEvent for ApprovalForAll { type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, + 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, + 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -605,9 +550,7 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -617,22 +560,27 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + 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<&ApprovalForAll> for alloy_sol_types::private::LogData { #[inline] fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. -```solidity -event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); -```*/ + ```solidity + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Transfer { @@ -649,9 +597,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -659,40 +605,12 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, + 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, + 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -727,9 +645,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._from, ); @@ -742,22 +658,27 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + 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<&Transfer> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address _approved, uint256 _tokenId) external payable; -```*/ + ```solidity + function approve(address _approved, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct approveCall { @@ -784,9 +705,7 @@ function approve(address _approved, uint256 _tokenId) external payable; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -818,9 +737,7 @@ function approve(address _approved, uint256 _tokenId) external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -848,14 +765,10 @@ function approve(address _approved, uint256 _tokenId) external payable; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = approveReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "approve(address,uint256)"; const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; #[inline] @@ -870,9 +783,9 @@ function approve(address _approved, uint256 _tokenId) external payable; ::tokenize( &self._approved, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -880,17 +793,17 @@ function approve(address _approved, uint256 _tokenId) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address _owner) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address _owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct balanceOfCall { @@ -912,9 +825,7 @@ function balanceOf(address _owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -943,9 +854,7 @@ function balanceOf(address _owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -970,14 +879,10 @@ function balanceOf(address _owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for balanceOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = balanceOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "balanceOf(address)"; const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; #[inline] @@ -999,17 +904,17 @@ function balanceOf(address _owner) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. -```solidity -function getApproved(uint256 _tokenId) external view returns (address); -```*/ + ```solidity + function getApproved(uint256 _tokenId) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct getApprovedCall { @@ -1031,9 +936,7 @@ function getApproved(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1062,9 +965,7 @@ function getApproved(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1089,14 +990,10 @@ function getApproved(uint256 _tokenId) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for getApprovedCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getApprovedReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "getApproved(uint256)"; const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; #[inline] @@ -1108,9 +1005,9 @@ function getApproved(uint256 _tokenId) external view returns (address); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1118,17 +1015,17 @@ function getApproved(uint256 _tokenId) external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. -```solidity -function isApprovedForAll(address _owner, address _operator) external view returns (bool); -```*/ + ```solidity + function isApprovedForAll(address _owner, address _operator) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct isApprovedForAllCall { @@ -1157,9 +1054,7 @@ function isApprovedForAll(address _owner, address _operator) external view retur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1168,16 +1063,14 @@ function isApprovedForAll(address _owner, address _operator) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllCall) -> Self { (value._owner, value._operator) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllCall { + impl ::core::convert::From> for isApprovedForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _owner: tuple.0, @@ -1193,9 +1086,7 @@ function isApprovedForAll(address _owner, address _operator) external view retur type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1204,16 +1095,14 @@ function isApprovedForAll(address _owner, address _operator) external view retur } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllReturn { + impl ::core::convert::From> for isApprovedForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1225,14 +1114,10 @@ function isApprovedForAll(address _owner, address _operator) external view retur alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = isApprovedForAllReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; #[inline] @@ -1257,17 +1142,17 @@ function isApprovedForAll(address _owner, address _operator) external view retur data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory _name); -```*/ + ```solidity + function name() external view returns (string memory _name); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct nameCall {} @@ -1287,9 +1172,7 @@ function name() external view returns (string memory _name); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1318,9 +1201,7 @@ function name() external view returns (string memory _name); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1345,14 +1226,10 @@ function name() external view returns (string memory _name); #[automatically_derived] impl alloy_sol_types::SolCall for nameCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = nameReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "name()"; const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; #[inline] @@ -1370,17 +1247,17 @@ function name() external view returns (string memory _name); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. -```solidity -function ownerOf(uint256 _tokenId) external view returns (address); -```*/ + ```solidity + function ownerOf(uint256 _tokenId) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct ownerOfCall { @@ -1402,9 +1279,7 @@ function ownerOf(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1433,9 +1308,7 @@ function ownerOf(uint256 _tokenId) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1460,14 +1333,10 @@ function ownerOf(uint256 _tokenId) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ownerOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "ownerOf(uint256)"; const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; #[inline] @@ -1479,9 +1348,9 @@ function ownerOf(uint256 _tokenId) external view returns (address); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1489,17 +1358,17 @@ function ownerOf(uint256 _tokenId) external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. -```solidity -function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; -```*/ + ```solidity + function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_0Call { @@ -1529,9 +1398,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1540,16 +1407,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Call) -> Self { (value._from, value._to, value._tokenId) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Call { + impl ::core::convert::From> for safeTransferFrom_0Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _from: tuple.0, @@ -1566,9 +1431,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1577,16 +1440,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Return { + impl ::core::convert::From> for safeTransferFrom_0Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1599,14 +1460,10 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_0Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; #[inline] @@ -1624,9 +1481,9 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -1634,17 +1491,17 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. -```solidity -function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; -```*/ + ```solidity + function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_1Call { @@ -1677,9 +1534,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1688,16 +1543,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Call) -> Self { (value._from, value._to, value._tokenId, value.data) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Call { + impl ::core::convert::From> for safeTransferFrom_1Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _from: tuple.0, @@ -1715,9 +1568,7 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1726,16 +1577,14 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Return { + impl ::core::convert::From> for safeTransferFrom_1Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1749,14 +1598,10 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me alloy::sol_types::sol_data::Uint<256>, alloy::sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_1Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; #[inline] @@ -1774,9 +1619,9 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ::tokenize( &self.data, ), @@ -1787,17 +1632,17 @@ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes me data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. -```solidity -function setApprovalForAll(address _operator, bool _approved) external; -```*/ + ```solidity + function setApprovalForAll(address _operator, bool _approved) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct setApprovalForAllCall { @@ -1821,9 +1666,7 @@ function setApprovalForAll(address _operator, bool _approved) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1832,16 +1675,14 @@ function setApprovalForAll(address _operator, bool _approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllCall) -> Self { (value._operator, value._approved) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllCall { + impl ::core::convert::From> for setApprovalForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _operator: tuple.0, @@ -1857,9 +1698,7 @@ function setApprovalForAll(address _operator, bool _approved) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1868,16 +1707,14 @@ function setApprovalForAll(address _operator, bool _approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllReturn { + impl ::core::convert::From> for setApprovalForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1889,14 +1726,10 @@ function setApprovalForAll(address _operator, bool _approved) external; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setApprovalForAllReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; #[inline] @@ -1921,17 +1754,17 @@ function setApprovalForAll(address _operator, bool _approved) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. -```solidity -function supportsInterface(bytes4 interfaceID) external view returns (bool); -```*/ + ```solidity + function supportsInterface(bytes4 interfaceID) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct supportsInterfaceCall { @@ -1953,9 +1786,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1964,18 +1795,18 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceCall) -> Self { (value.interfaceID,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceCall { + impl ::core::convert::From> for supportsInterfaceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { interfaceID: tuple.0 } + Self { + interfaceID: tuple.0, + } } } } @@ -1986,9 +1817,7 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1997,16 +1826,14 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceReturn { + impl ::core::convert::From> for supportsInterfaceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2015,14 +1842,10 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for supportsInterfaceCall { type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = supportsInterfaceReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "supportsInterface(bytes4)"; const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; #[inline] @@ -2044,17 +1867,17 @@ function supportsInterface(bytes4 interfaceID) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory _symbol); -```*/ + ```solidity + function symbol() external view returns (string memory _symbol); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct symbolCall {} @@ -2074,9 +1897,7 @@ function symbol() external view returns (string memory _symbol); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2105,9 +1926,7 @@ function symbol() external view returns (string memory _symbol); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2132,14 +1951,10 @@ function symbol() external view returns (string memory _symbol); #[automatically_derived] impl alloy_sol_types::SolCall for symbolCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = symbolReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "symbol()"; const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; #[inline] @@ -2157,17 +1972,17 @@ function symbol() external view returns (string memory _symbol); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `tokenURI(uint256)` and selector `0xc87b56dd`. -```solidity -function tokenURI(uint256 _tokenId) external view returns (string memory); -```*/ + ```solidity + function tokenURI(uint256 _tokenId) external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct tokenURICall { @@ -2189,9 +2004,7 @@ function tokenURI(uint256 _tokenId) external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2220,9 +2033,7 @@ function tokenURI(uint256 _tokenId) external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2247,14 +2058,10 @@ function tokenURI(uint256 _tokenId) external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for tokenURICall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = tokenURIReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "tokenURI(uint256)"; const SELECTOR: [u8; 4] = [200u8, 123u8, 86u8, 221u8]; #[inline] @@ -2266,9 +2073,9 @@ function tokenURI(uint256 _tokenId) external view returns (string memory); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -2276,17 +2083,17 @@ function tokenURI(uint256 _tokenId) external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address _from, address _to, uint256 _tokenId) external payable; -```*/ + ```solidity + function transferFrom(address _from, address _to, uint256 _tokenId) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferFromCall { @@ -2316,9 +2123,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2351,9 +2156,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2382,14 +2185,10 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferFromReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; #[inline] @@ -2407,9 +2206,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::tokenize( &self._to, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ) } #[inline] @@ -2417,10 +2216,10 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -2473,12 +2272,8 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay fn selector(&self) -> [u8; 4] { match self { Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } - Self::getApproved(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, + Self::getApproved(_) => ::SELECTOR, Self::isApprovedForAll(_) => { ::SELECTOR } @@ -2498,9 +2293,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay } Self::symbol(_) => ::SELECTOR, Self::tokenURI(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::SELECTOR, } } #[inline] @@ -2521,17 +2314,17 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay static DECODE_SHIMS: &[fn( &[u8], bool, - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn supportsInterface( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721MetadataCalls::supportsInterface) + data, validate, + ) + .map(IERC721MetadataCalls::supportsInterface) } supportsInterface }, @@ -2540,10 +2333,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721MetadataCalls::name) } name @@ -2554,10 +2344,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721MetadataCalls::getApproved) + data, validate, + ) + .map(IERC721MetadataCalls::getApproved) } getApproved }, @@ -2566,10 +2355,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721MetadataCalls::approve) } approve @@ -2580,10 +2366,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721MetadataCalls::transferFrom) + data, validate, + ) + .map(IERC721MetadataCalls::transferFrom) } transferFrom }, @@ -2593,10 +2378,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721MetadataCalls::safeTransferFrom_0) + data, validate, + ) + .map(IERC721MetadataCalls::safeTransferFrom_0) } safeTransferFrom_0 }, @@ -2605,10 +2389,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721MetadataCalls::ownerOf) } ownerOf @@ -2618,10 +2399,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721MetadataCalls::balanceOf) } balanceOf @@ -2631,10 +2409,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721MetadataCalls::symbol) } symbol @@ -2645,10 +2420,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721MetadataCalls::setApprovalForAll) + data, validate, + ) + .map(IERC721MetadataCalls::setApprovalForAll) } setApprovalForAll }, @@ -2658,10 +2432,9 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721MetadataCalls::safeTransferFrom_1) + data, validate, + ) + .map(IERC721MetadataCalls::safeTransferFrom_1) } safeTransferFrom_1 }, @@ -2670,10 +2443,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(IERC721MetadataCalls::tokenURI) } tokenURI @@ -2684,21 +2454,18 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(IERC721MetadataCalls::isApprovedForAll) + data, validate, + ) + .map(IERC721MetadataCalls::isApprovedForAll) } isApprovedForAll }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -2712,14 +2479,10 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encoded_size(inner) } Self::getApproved(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::isApprovedForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -2728,24 +2491,16 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encoded_size(inner) } Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setApprovalForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::supportsInterface(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::symbol(inner) => { ::abi_encoded_size(inner) @@ -2754,9 +2509,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -2767,22 +2520,13 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getApproved(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::isApprovedForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::name(inner) => { ::abi_encode_raw(inner, out) @@ -2791,43 +2535,25 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ::abi_encode_raw(inner, out) } Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setApprovalForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::supportsInterface(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::symbol(inner) => { ::abi_encode_raw(inner, out) } Self::tokenURI(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -2848,106 +2574,19 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 32usize]] = &[ [ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, + 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, + 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, ], [ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, + 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, ], [ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, + 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, + 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, ], ]; } @@ -2962,39 +2601,52 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay ) -> alloy_sol_types::Result { match topics.first().copied() { Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Approval) } Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - validate, - ) - .map(Self::ApprovalForAll) + topics, data, validate, + ) + .map(Self::ApprovalForAll) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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 IERC721MetadataEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -3002,7 +2654,7 @@ function transferFrom(address _from, address _to, uint256 _tokenId) external pay use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`IERC721Metadata`](self) contract instance. -See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ + See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -3016,9 +2668,9 @@ See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -3026,35 +2678,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { IERC721MetadataInstance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { IERC721MetadataInstance::::deploy_builder(provider) } /**A [`IERC721Metadata`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IERC721Metadata`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IERC721Metadata`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IERC721MetadataInstance { address: alloy_sol_types::private::Address, @@ -3065,24 +2718,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IERC721MetadataInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721MetadataInstance").field(&self.address).finish() + f.debug_tuple("IERC721MetadataInstance") + .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, - > IERC721MetadataInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721MetadataInstance + { /**Creates a new wrapper around an on-chain [`IERC721Metadata`](self) contract instance. -See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ + See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -3091,9 +2744,9 @@ See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( provider: P, @@ -3103,10 +2756,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` Ok(Self::new(contract_address, call_builder.provider)) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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( @@ -3149,10 +2802,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721MetadataInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721MetadataInstance + { /// 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 @@ -3169,7 +2823,10 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _approved: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder(&approveCall { _approved, _tokenId }) + self.call_builder(&approveCall { + _approved, + _tokenId, + }) } ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( @@ -3191,12 +2848,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _owner: alloy::sol_types::private::Address, _operator: alloy::sol_types::private::Address, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &isApprovedForAllCall { - _owner, - _operator, - }, - ) + self.call_builder(&isApprovedForAllCall { _owner, _operator }) } ///Creates a new call builder for the [`name`] function. pub fn name(&self) -> alloy_contract::SolCallBuilder { @@ -3216,13 +2868,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _to: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_0Call { - _from, - _to, - _tokenId, - }, - ) + self.call_builder(&safeTransferFrom_0Call { + _from, + _to, + _tokenId, + }) } ///Creates a new call builder for the [`safeTransferFrom_1`] function. pub fn safeTransferFrom_1( @@ -3232,14 +2882,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _tokenId: alloy::sol_types::private::U256, data: alloy::sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_1Call { - _from, - _to, - _tokenId, - data, - }, - ) + self.call_builder(&safeTransferFrom_1Call { + _from, + _to, + _tokenId, + data, + }) } ///Creates a new call builder for the [`setApprovalForAll`] function. pub fn setApprovalForAll( @@ -3247,23 +2895,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _operator: alloy::sol_types::private::Address, _approved: bool, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &setApprovalForAllCall { - _operator, - _approved, - }, - ) + self.call_builder(&setApprovalForAllCall { + _operator, + _approved, + }) } ///Creates a new call builder for the [`supportsInterface`] function. pub fn supportsInterface( &self, interfaceID: alloy::sol_types::private::FixedBytes<4>, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &supportsInterfaceCall { - interfaceID, - }, - ) + self.call_builder(&supportsInterfaceCall { interfaceID }) } ///Creates a new call builder for the [`symbol`] function. pub fn symbol(&self) -> alloy_contract::SolCallBuilder { @@ -3283,22 +2925,21 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _to: alloy::sol_types::private::Address, _tokenId: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &transferFromCall { - _from, - _to, - _tokenId, - }, - ) + self.call_builder(&transferFromCall { + _from, + _to, + _tokenId, + }) } } /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721MetadataInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721MetadataInstance + { /// 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. @@ -3313,9 +2954,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.event_filter::() } ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter( - &self, - ) -> alloy_contract::Event { + pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { self.event_filter::() } ///Creates a new event filter for the [`Transfer`] event. diff --git a/crates/bindings/src/ierc721tokenreceiver.rs b/crates/bindings/src/ierc721tokenreceiver.rs index d234367..784e4f2 100644 --- a/crates/bindings/src/ierc721tokenreceiver.rs +++ b/crates/bindings/src/ierc721tokenreceiver.rs @@ -56,6 +56,7 @@ pub mod IERC721TokenReceiver { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -65,13 +66,14 @@ pub mod IERC721TokenReceiver { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Function with signature `onERC721Received(address,address,uint256,bytes)` and selector `0x150b7a02`. -```solidity -function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4); -```*/ + ```solidity + function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct onERC721ReceivedCall { @@ -106,9 +108,7 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -117,16 +117,14 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: onERC721ReceivedCall) -> Self { (value._operator, value._from, value._tokenId, value._data) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for onERC721ReceivedCall { + impl ::core::convert::From> for onERC721ReceivedCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _operator: tuple.0, @@ -144,9 +142,7 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -155,16 +151,14 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: onERC721ReceivedReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for onERC721ReceivedReturn { + impl ::core::convert::From> for onERC721ReceivedReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -178,14 +172,10 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by alloy::sol_types::sol_data::Uint<256>, alloy::sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = onERC721ReceivedReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "onERC721Received(address,address,uint256,bytes)"; const SELECTOR: [u8; 4] = [21u8, 11u8, 122u8, 2u8]; #[inline] @@ -203,9 +193,9 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by ::tokenize( &self._from, ), - as alloy_sol_types::SolType>::tokenize(&self._tokenId), + as alloy_sol_types::SolType>::tokenize( + &self._tokenId, + ), ::tokenize( &self._data, ), @@ -216,10 +206,10 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -268,28 +258,24 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by static DECODE_SHIMS: &[fn( &[u8], bool, - ) -> alloy_sol_types::Result] = &[ - { - fn onERC721Received( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) - .map(IERC721TokenReceiverCalls::onERC721Received) - } - onERC721Received - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn onERC721Received( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, + ) + .map(IERC721TokenReceiverCalls::onERC721Received) + } + onERC721Received + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -297,9 +283,7 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by fn abi_encoded_size(&self) -> usize { match self { Self::onERC721Received(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -307,10 +291,7 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::onERC721Received(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -318,7 +299,7 @@ function onERC721Received(address _operator, address _from, uint256 _tokenId, by use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`IERC721TokenReceiver`](self) contract instance. -See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ + See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -332,9 +313,9 @@ See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more detai } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -348,35 +329,33 @@ For more fine-grained control over the deployment process, use [`deploy_builder` IERC721TokenReceiverInstance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { IERC721TokenReceiverInstance::::deploy_builder(provider) } /**A [`IERC721TokenReceiver`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IERC721TokenReceiver`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IERC721TokenReceiver`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct IERC721TokenReceiverInstance< - T, - P, - N = alloy_contract::private::Ethereum, - > { + pub struct IERC721TokenReceiverInstance { address: alloy_sol_types::private::Address, provider: P, _network_transport: ::core::marker::PhantomData<(N, T)>, @@ -385,24 +364,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IERC721TokenReceiverInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC721TokenReceiverInstance").field(&self.address).finish() + f.debug_tuple("IERC721TokenReceiverInstance") + .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, - > IERC721TokenReceiverInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721TokenReceiverInstance + { /**Creates a new wrapper around an on-chain [`IERC721TokenReceiver`](self) contract instance. -See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ + See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -411,9 +390,9 @@ See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more detai } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( provider: P, @@ -423,10 +402,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` Ok(Self::new(contract_address, call_builder.provider)) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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( @@ -469,10 +448,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721TokenReceiverInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721TokenReceiverInstance + { /// 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 @@ -491,23 +471,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _tokenId: alloy::sol_types::private::U256, _data: alloy::sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &onERC721ReceivedCall { - _operator, - _from, - _tokenId, - _data, - }, - ) + self.call_builder(&onERC721ReceivedCall { + _operator, + _from, + _tokenId, + _data, + }) } } /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC721TokenReceiverInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721TokenReceiverInstance + { /// 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. diff --git a/crates/bindings/src/isckeystore.rs b/crates/bindings/src/isckeystore.rs index e9f24c6..2a5bde8 100644 --- a/crates/bindings/src/isckeystore.rs +++ b/crates/bindings/src/isckeystore.rs @@ -69,6 +69,7 @@ pub mod IScKeystore { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -78,13 +79,14 @@ pub mod IScKeystore { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Function with signature `addUser(address)` and selector `0x421b2d8b`. -```solidity -function addUser(address user) external; -```*/ + ```solidity + function addUser(address user) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct addUserCall { @@ -104,9 +106,7 @@ function addUser(address user) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -135,9 +135,7 @@ function addUser(address user) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -162,14 +160,10 @@ function addUser(address user) external; #[automatically_derived] impl alloy_sol_types::SolCall for addUserCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = addUserReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "addUser(address)"; const SELECTOR: [u8; 4] = [66u8, 27u8, 45u8, 139u8]; #[inline] @@ -191,17 +185,17 @@ function addUser(address user) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `removeUser(address)` and selector `0x98575188`. -```solidity -function removeUser(address user) external; -```*/ + ```solidity + function removeUser(address user) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct removeUserCall { @@ -221,9 +215,7 @@ function removeUser(address user) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -252,9 +244,7 @@ function removeUser(address user) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -279,14 +269,10 @@ function removeUser(address user) external; #[automatically_derived] impl alloy_sol_types::SolCall for removeUserCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = removeUserReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "removeUser(address)"; const SELECTOR: [u8; 4] = [152u8, 87u8, 81u8, 136u8]; #[inline] @@ -308,17 +294,17 @@ function removeUser(address user) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `userExists(address)` and selector `0x0e666e49`. -```solidity -function userExists(address user) external view returns (bool); -```*/ + ```solidity + function userExists(address user) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct userExistsCall { @@ -340,9 +326,7 @@ function userExists(address user) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -371,9 +355,7 @@ function userExists(address user) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -398,14 +380,10 @@ function userExists(address user) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for userExistsCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = userExistsReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "userExists(address)"; const SELECTOR: [u8; 4] = [14u8, 102u8, 110u8, 73u8]; #[inline] @@ -427,10 +405,10 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -463,12 +441,8 @@ function userExists(address user) external view returns (bool); fn selector(&self) -> [u8; 4] { match self { Self::addUser(_) => ::SELECTOR, - Self::removeUser(_) => { - ::SELECTOR - } - Self::userExists(_) => { - ::SELECTOR - } + Self::removeUser(_) => ::SELECTOR, + Self::userExists(_) => ::SELECTOR, } } #[inline] @@ -486,57 +460,50 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ - { - fn userExists( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = + &[ + { + fn userExists( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, ) .map(IScKeystoreCalls::userExists) - } - userExists - }, - { - fn addUser( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, + } + userExists + }, + { + fn addUser( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, ) .map(IScKeystoreCalls::addUser) - } - addUser - }, - { - fn removeUser( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, + } + addUser + }, + { + fn removeUser( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, ) .map(IScKeystoreCalls::removeUser) - } - removeUser - }, - ]; + } + removeUser + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -561,16 +528,10 @@ function userExists(address user) external view returns (bool); ::abi_encode_raw(inner, out) } Self::removeUser(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::userExists(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -578,7 +539,7 @@ function userExists(address user) external view returns (bool); use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`IScKeystore`](self) contract instance. -See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ + See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -592,9 +553,9 @@ See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -602,35 +563,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { IScKeystoreInstance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { IScKeystoreInstance::::deploy_builder(provider) } /**A [`IScKeystore`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IScKeystore`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IScKeystore`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IScKeystoreInstance { address: alloy_sol_types::private::Address, @@ -641,24 +603,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IScKeystoreInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IScKeystoreInstance").field(&self.address).finish() + f.debug_tuple("IScKeystoreInstance") + .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, - > IScKeystoreInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IScKeystoreInstance + { /**Creates a new wrapper around an on-chain [`IScKeystore`](self) contract instance. -See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ + See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -667,22 +629,20 @@ See the [wrapper's documentation](`IScKeystoreInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -725,10 +685,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IScKeystoreInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IScKeystoreInstance + { /// 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 @@ -764,10 +725,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IScKeystoreInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IScKeystoreInstance + { /// 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. diff --git a/crates/bindings/src/lib.rs b/crates/bindings/src/lib.rs index 9e7df0c..dec5b05 100644 --- a/crates/bindings/src/lib.rs +++ b/crates/bindings/src/lib.rs @@ -6,7 +6,6 @@ pub mod context; pub mod deploy; pub mod deploymentconfig; -pub mod foo; pub mod ierc165; pub mod ierc20; pub mod ierc721; diff --git a/crates/bindings/src/mockerc20.rs b/crates/bindings/src/mockerc20.rs index 0306c75..ac1b1ca 100644 --- a/crates/bindings/src/mockerc20.rs +++ b/crates/bindings/src/mockerc20.rs @@ -357,6 +357,7 @@ pub mod MockERC20 { ///0x608060405234801561001057600080fd5b50611199806100206000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101d2578063a9059cbb146101da578063d505accf146101ed578063dd62ed3e1461020057600080fd5b80633644e5151461017457806370a082311461017c5780637ecebe00146101b257600080fd5b806318160ddd116100bd57806318160ddd1461013a57806323b872dd1461014c578063313ce5671461015f57600080fd5b806306fdde03146100e4578063095ea7b3146101025780631624f6c614610125575b600080fd5b6100ec610246565b6040516100f99190610ba7565b60405180910390f35b610115610110366004610c3d565b6102d8565b60405190151581526020016100f9565b610138610133366004610d52565b610352565b005b6003545b6040519081526020016100f9565b61011561015a366004610dc6565b610451565b60025460405160ff90911681526020016100f9565b61013e6105c5565b61013e61018a366004610e02565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b61013e6101c0366004610e02565b60086020526000908152604090205481565b6100ec6105eb565b6101156101e8366004610c3d565b6105fa565b6101386101fb366004610e1d565b6106ab565b61013e61020e366004610e87565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205490565b60606000805461025590610eba565b80601f016020809104026020016040519081016040528092919081815260200182805461028190610eba565b80156102ce5780601f106102a3576101008083540402835291602001916102ce565b820191906000526020600020905b8154815290600101906020018083116102b157829003601f168201915b5050505050905090565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103409086815260200190565b60405180910390a35060015b92915050565b60095460ff16156103c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a45440000000000000000000000000060448201526064015b60405180910390fd5b60006103d08482610f5e565b5060016103dd8382610f5e565b50600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff83161790556104136109f1565b60065561041e610a0a565b6007555050600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146104e5576104b38184610aad565b73ffffffffffffffffffffffffffffffffffffffff861660009081526005602090815260408083203384529091529020555b73ffffffffffffffffffffffffffffffffffffffff85166000908152600460205260409020546105159084610aad565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526004602052604080822093909355908616815220546105519084610b2a565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526004602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105b29087815260200190565b60405180910390a3506001949350505050565b60006006546105d26109f1565b146105e4576105df610a0a565b905090565b5060075490565b60606001805461025590610eba565b336000908152600460205260408120546106149083610aad565b336000908152600460205260408082209290925573ffffffffffffffffffffffffffffffffffffffff85168152205461064d9083610b2a565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103409086815260200190565b42841015610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016103bb565b600060016107216105c5565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260086020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9290919061077c836110a7565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161081d9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610899573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061091457508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff81811660009081526005602090815260408083208b8516808552908352928190208a90555189815291928b16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35050505050505050565b6000610ba380610a0363ffffffff8216565b9250505090565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610a3c91906110df565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6610a6d6109f1565b604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600081831015610b19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332303a207375627472616374696f6e20756e646572666c6f770000000060448201526064016103bb565b610b238284611173565b9392505050565b600080610b378385611186565b905083811015610b23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45524332303a206164646974696f6e206f766572666c6f77000000000000000060448201526064016103bb565b4690565b60006020808352835180602085015260005b81811015610bd557858101830151858201604001528201610bb9565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c3857600080fd5b919050565b60008060408385031215610c5057600080fd5b610c5983610c14565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610ca757600080fd5b813567ffffffffffffffff80821115610cc257610cc2610c67565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610d0857610d08610c67565b81604052838152866020858801011115610d2157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff81168114610c3857600080fd5b600080600060608486031215610d6757600080fd5b833567ffffffffffffffff80821115610d7f57600080fd5b610d8b87838801610c96565b94506020860135915080821115610da157600080fd5b50610dae86828701610c96565b925050610dbd60408501610d41565b90509250925092565b600080600060608486031215610ddb57600080fd5b610de484610c14565b9250610df260208501610c14565b9150604084013590509250925092565b600060208284031215610e1457600080fd5b610b2382610c14565b600080600080600080600060e0888a031215610e3857600080fd5b610e4188610c14565b9650610e4f60208901610c14565b95506040880135945060608801359350610e6b60808901610d41565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215610e9a57600080fd5b610ea383610c14565b9150610eb160208401610c14565b90509250929050565b600181811c90821680610ece57607f821691505b602082108103610f07577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610f59576000816000526020600020601f850160051c81016020861015610f365750805b601f850160051c820191505b81811015610f5557828155600101610f42565b5050505b505050565b815167ffffffffffffffff811115610f7857610f78610c67565b610f8c81610f868454610eba565b84610f0d565b602080601f831160018114610fdf5760008415610fa95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610f55565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561102c5788860151825594840194600190910190840161100d565b508582101561106857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110d8576110d8611078565b5060010190565b60008083546110ed81610eba565b60018281168015611105576001811461113857611167565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450611167565b8760005260208060002060005b8581101561115e5781548a820152908401908201611145565b50505082870194505b50929695505050505050565b8181038181111561034c5761034c611078565b8082018082111561034c5761034c61107856 /// ``` #[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\x10W`\0\x80\xFD[Pa\x11\x99\x80a\0 `\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xDFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xD2W\x80c\xA9\x05\x9C\xBB\x14a\x01\xDAW\x80c\xD5\x05\xAC\xCF\x14a\x01\xEDW\x80c\xDDb\xED>\x14a\x02\0W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01tW\x80cp\xA0\x821\x14a\x01|W\x80c~\xCE\xBE\0\x14a\x01\xB2W`\0\x80\xFD[\x80c\x18\x16\r\xDD\x11a\0\xBDW\x80c\x18\x16\r\xDD\x14a\x01:W\x80c#\xB8r\xDD\x14a\x01LW\x80c1<\xE5g\x14a\x01_W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xE4W\x80c\t^\xA7\xB3\x14a\x01\x02W\x80c\x16$\xF6\xC6\x14a\x01%W[`\0\x80\xFD[a\0\xECa\x02FV[`@Qa\0\xF9\x91\x90a\x0B\xA7V[`@Q\x80\x91\x03\x90\xF3[a\x01\x15a\x01\x106`\x04a\x0C=V[a\x02\xD8V[`@Q\x90\x15\x15\x81R` \x01a\0\xF9V[a\x018a\x0136`\x04a\rRV[a\x03RV[\0[`\x03T[`@Q\x90\x81R` \x01a\0\xF9V[a\x01\x15a\x01Z6`\x04a\r\xC6V[a\x04QV[`\x02T`@Q`\xFF\x90\x91\x16\x81R` \x01a\0\xF9V[a\x01>a\x05\xC5V[a\x01>a\x01\x8A6`\x04a\x0E\x02V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x04` R`@\x90 T\x90V[a\x01>a\x01\xC06`\x04a\x0E\x02V[`\x08` R`\0\x90\x81R`@\x90 T\x81V[a\0\xECa\x05\xEBV[a\x01\x15a\x01\xE86`\x04a\x0C=V[a\x05\xFAV[a\x018a\x01\xFB6`\x04a\x0E\x1DV[a\x06\xABV[a\x01>a\x02\x0E6`\x04a\x0E\x87V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[```\0\x80Ta\x02U\x90a\x0E\xBAV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02\x81\x90a\x0E\xBAV[\x80\x15a\x02\xCEW\x80`\x1F\x10a\x02\xA3Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\xCEV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\xB1W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x92R\x80\x83 \x85\x90UQ\x91\x92\x90\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x90a\x03@\x90\x86\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01[\x92\x91PPV[`\tT`\xFF\x16\x15a\x03\xC4W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0a\x03\xD0\x84\x82a\x0F^V[P`\x01a\x03\xDD\x83\x82a\x0F^V[P`\x02\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\xFF\x83\x16\x17\x90Ua\x04\x13a\t\xF1V[`\x06Ua\x04\x1Ea\n\nV[`\x07UPP`\t\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x81 T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x14a\x04\xE5Wa\x04\xB3\x81\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 U[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16`\0\x90\x81R`\x04` R`@\x90 Ta\x05\x15\x90\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16`\0\x90\x81R`\x04` R`@\x80\x82 \x93\x90\x93U\x90\x86\x16\x81R Ta\x05Q\x90\x84a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x93\x90\x93U\x91Q\x90\x87\x16\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x05\xB2\x90\x87\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01\x94\x93PPPPV[`\0`\x06Ta\x05\xD2a\t\xF1V[\x14a\x05\xE4Wa\x05\xDFa\n\nV[\x90P\x90V[P`\x07T\x90V[```\x01\x80Ta\x02U\x90a\x0E\xBAV[3`\0\x90\x81R`\x04` R`@\x81 Ta\x06\x14\x90\x83a\n\xADV[3`\0\x90\x81R`\x04` R`@\x80\x82 \x92\x90\x92Us\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x81R Ta\x06M\x90\x83a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x92\x90\x92U\x90Q3\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x03@\x90\x86\x81R` \x01\x90V[B\x84\x10\x15a\x07\x15W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x17`$\x82\x01R\x7FPERMIT_DEADLINE_EXPIRED\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[`\0`\x01a\x07!a\x05\xC5V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x16`\0\x90\x81R`\x08` R`@\x81 \x80T\x7Fnq\xED\xAE\x12\xB1\xB9\x7FM\x1F`7\x0F\xEF\x10\x10_\xA2\xFA\xAE\x01&\x11J\x16\x9Cd\x84]a&\xC9\x92\x8D\x92\x8D\x92\x8D\x92\x90\x91\x90a\x07|\x83a\x10\xA7V[\x90\x91UP`@\x80Q` \x81\x01\x96\x90\x96Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x16\x90\x86\x01R\x92\x90\x91\x16``\x84\x01R`\x80\x83\x01R`\xA0\x82\x01R`\xC0\x81\x01\x88\x90R`\xE0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 `@Q` \x01a\x08\x1D\x92\x91\x90\x7F\x19\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x02\x81\x01\x92\x90\x92R`\"\x82\x01R`B\x01\x90V[`@\x80Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x84\x03\x01\x81R\x82\x82R\x80Q` \x91\x82\x01 `\0\x84R\x90\x83\x01\x80\x83RR`\xFF\x87\x16\x90\x82\x01R``\x81\x01\x85\x90R`\x80\x81\x01\x84\x90R`\xA0\x01` `@Q` \x81\x03\x90\x80\x84\x03\x90\x85Z\xFA\x15\x80\x15a\x08\x99W=`\0\x80>=`\0\xFD[PP`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x01Q\x91PPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x15\x80\x15\x90a\t\x14WP\x87s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14[a\tzW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0E`$\x82\x01R\x7FINVALID_SIGNER\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\x0B\xA3\x80a\n\x03c\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\n<\x91\x90a\x10\xDFV[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\nma\t\xF1V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\x0B\x19W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[a\x0B#\x82\x84a\x11sV[\x93\x92PPPV[`\0\x80a\x0B7\x83\x85a\x11\x86V[\x90P\x83\x81\x10\x15a\x0B#W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[F\x90V[`\0` \x80\x83R\x83Q\x80` \x85\x01R`\0[\x81\x81\x10\x15a\x0B\xD5W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x0B\xB9V[P`\0`@\x82\x86\x01\x01R`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0CPW`\0\x80\xFD[a\x0CY\x83a\x0C\x14V[\x94` \x93\x90\x93\x015\x93PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\x0C\xA7W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\xC2Wa\x0C\xC2a\x0CgV[`@Q`\x1F\x83\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\r\x08Wa\r\x08a\x0CgV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\r!W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\rgW`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\r\x7FW`\0\x80\xFD[a\r\x8B\x87\x83\x88\x01a\x0C\x96V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\r\xA1W`\0\x80\xFD[Pa\r\xAE\x86\x82\x87\x01a\x0C\x96V[\x92PPa\r\xBD`@\x85\x01a\rAV[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\r\xDBW`\0\x80\xFD[a\r\xE4\x84a\x0C\x14V[\x92Pa\r\xF2` \x85\x01a\x0C\x14V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0E\x14W`\0\x80\xFD[a\x0B#\x82a\x0C\x14V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0E8W`\0\x80\xFD[a\x0EA\x88a\x0C\x14V[\x96Pa\x0EO` \x89\x01a\x0C\x14V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0Ek`\x80\x89\x01a\rAV[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0E\x9AW`\0\x80\xFD[a\x0E\xA3\x83a\x0C\x14V[\x91Pa\x0E\xB1` \x84\x01a\x0C\x14V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0E\xCEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0F\x07W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0FYW`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0F6WP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0FUW\x82\x81U`\x01\x01a\x0FBV[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FxWa\x0Fxa\x0CgV[a\x0F\x8C\x81a\x0F\x86\x84Ta\x0E\xBAV[\x84a\x0F\rV[` \x80`\x1F\x83\x11`\x01\x81\x14a\x0F\xDFW`\0\x84\x15a\x0F\xA9WP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0FUV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x10,W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x10\rV[P\x85\x82\x10\x15a\x10hW\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x10\xD8Wa\x10\xD8a\x10xV[P`\x01\x01\x90V[`\0\x80\x83Ta\x10\xED\x81a\x0E\xBAV[`\x01\x82\x81\x16\x80\x15a\x11\x05W`\x01\x81\x14a\x118Wa\x11gV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x11gV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x11^W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\x11EV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03LWa\x03La\x10xV[\x80\x82\x01\x80\x82\x11\x15a\x03LWa\x03La\x10xV", ); @@ -366,13 +367,14 @@ pub mod MockERC20 { ///0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101d2578063a9059cbb146101da578063d505accf146101ed578063dd62ed3e1461020057600080fd5b80633644e5151461017457806370a082311461017c5780637ecebe00146101b257600080fd5b806318160ddd116100bd57806318160ddd1461013a57806323b872dd1461014c578063313ce5671461015f57600080fd5b806306fdde03146100e4578063095ea7b3146101025780631624f6c614610125575b600080fd5b6100ec610246565b6040516100f99190610ba7565b60405180910390f35b610115610110366004610c3d565b6102d8565b60405190151581526020016100f9565b610138610133366004610d52565b610352565b005b6003545b6040519081526020016100f9565b61011561015a366004610dc6565b610451565b60025460405160ff90911681526020016100f9565b61013e6105c5565b61013e61018a366004610e02565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b61013e6101c0366004610e02565b60086020526000908152604090205481565b6100ec6105eb565b6101156101e8366004610c3d565b6105fa565b6101386101fb366004610e1d565b6106ab565b61013e61020e366004610e87565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205490565b60606000805461025590610eba565b80601f016020809104026020016040519081016040528092919081815260200182805461028190610eba565b80156102ce5780601f106102a3576101008083540402835291602001916102ce565b820191906000526020600020905b8154815290600101906020018083116102b157829003601f168201915b5050505050905090565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103409086815260200190565b60405180910390a35060015b92915050565b60095460ff16156103c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a45440000000000000000000000000060448201526064015b60405180910390fd5b60006103d08482610f5e565b5060016103dd8382610f5e565b50600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff83161790556104136109f1565b60065561041e610a0a565b6007555050600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146104e5576104b38184610aad565b73ffffffffffffffffffffffffffffffffffffffff861660009081526005602090815260408083203384529091529020555b73ffffffffffffffffffffffffffffffffffffffff85166000908152600460205260409020546105159084610aad565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526004602052604080822093909355908616815220546105519084610b2a565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526004602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105b29087815260200190565b60405180910390a3506001949350505050565b60006006546105d26109f1565b146105e4576105df610a0a565b905090565b5060075490565b60606001805461025590610eba565b336000908152600460205260408120546106149083610aad565b336000908152600460205260408082209290925573ffffffffffffffffffffffffffffffffffffffff85168152205461064d9083610b2a565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103409086815260200190565b42841015610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016103bb565b600060016107216105c5565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260086020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9290919061077c836110a7565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161081d9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610899573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061091457508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016103bb565b73ffffffffffffffffffffffffffffffffffffffff81811660009081526005602090815260408083208b8516808552908352928190208a90555189815291928b16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35050505050505050565b6000610ba380610a0363ffffffff8216565b9250505090565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610a3c91906110df565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6610a6d6109f1565b604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600081831015610b19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332303a207375627472616374696f6e20756e646572666c6f770000000060448201526064016103bb565b610b238284611173565b9392505050565b600080610b378385611186565b905083811015610b23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45524332303a206164646974696f6e206f766572666c6f77000000000000000060448201526064016103bb565b4690565b60006020808352835180602085015260005b81811015610bd557858101830151858201604001528201610bb9565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c3857600080fd5b919050565b60008060408385031215610c5057600080fd5b610c5983610c14565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610ca757600080fd5b813567ffffffffffffffff80821115610cc257610cc2610c67565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610d0857610d08610c67565b81604052838152866020858801011115610d2157600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff81168114610c3857600080fd5b600080600060608486031215610d6757600080fd5b833567ffffffffffffffff80821115610d7f57600080fd5b610d8b87838801610c96565b94506020860135915080821115610da157600080fd5b50610dae86828701610c96565b925050610dbd60408501610d41565b90509250925092565b600080600060608486031215610ddb57600080fd5b610de484610c14565b9250610df260208501610c14565b9150604084013590509250925092565b600060208284031215610e1457600080fd5b610b2382610c14565b600080600080600080600060e0888a031215610e3857600080fd5b610e4188610c14565b9650610e4f60208901610c14565b95506040880135945060608801359350610e6b60808901610d41565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215610e9a57600080fd5b610ea383610c14565b9150610eb160208401610c14565b90509250929050565b600181811c90821680610ece57607f821691505b602082108103610f07577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610f59576000816000526020600020601f850160051c81016020861015610f365750805b601f850160051c820191505b81811015610f5557828155600101610f42565b5050505b505050565b815167ffffffffffffffff811115610f7857610f78610c67565b610f8c81610f868454610eba565b84610f0d565b602080601f831160018114610fdf5760008415610fa95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610f55565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561102c5788860151825594840194600190910190840161100d565b508582101561106857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110d8576110d8611078565b5060010190565b60008083546110ed81610eba565b60018281168015611105576001811461113857611167565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450611167565b8760005260208060002060005b8581101561115e5781548a820152908401908201611145565b50505082870194505b50929695505050505050565b8181038181111561034c5761034c611078565b8082018082111561034c5761034c61107856 /// ``` #[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\x10W`\0\x80\xFD[P`\x046\x10a\0\xDFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xD2W\x80c\xA9\x05\x9C\xBB\x14a\x01\xDAW\x80c\xD5\x05\xAC\xCF\x14a\x01\xEDW\x80c\xDDb\xED>\x14a\x02\0W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01tW\x80cp\xA0\x821\x14a\x01|W\x80c~\xCE\xBE\0\x14a\x01\xB2W`\0\x80\xFD[\x80c\x18\x16\r\xDD\x11a\0\xBDW\x80c\x18\x16\r\xDD\x14a\x01:W\x80c#\xB8r\xDD\x14a\x01LW\x80c1<\xE5g\x14a\x01_W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xE4W\x80c\t^\xA7\xB3\x14a\x01\x02W\x80c\x16$\xF6\xC6\x14a\x01%W[`\0\x80\xFD[a\0\xECa\x02FV[`@Qa\0\xF9\x91\x90a\x0B\xA7V[`@Q\x80\x91\x03\x90\xF3[a\x01\x15a\x01\x106`\x04a\x0C=V[a\x02\xD8V[`@Q\x90\x15\x15\x81R` \x01a\0\xF9V[a\x018a\x0136`\x04a\rRV[a\x03RV[\0[`\x03T[`@Q\x90\x81R` \x01a\0\xF9V[a\x01\x15a\x01Z6`\x04a\r\xC6V[a\x04QV[`\x02T`@Q`\xFF\x90\x91\x16\x81R` \x01a\0\xF9V[a\x01>a\x05\xC5V[a\x01>a\x01\x8A6`\x04a\x0E\x02V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x04` R`@\x90 T\x90V[a\x01>a\x01\xC06`\x04a\x0E\x02V[`\x08` R`\0\x90\x81R`@\x90 T\x81V[a\0\xECa\x05\xEBV[a\x01\x15a\x01\xE86`\x04a\x0C=V[a\x05\xFAV[a\x018a\x01\xFB6`\x04a\x0E\x1DV[a\x06\xABV[a\x01>a\x02\x0E6`\x04a\x0E\x87V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[```\0\x80Ta\x02U\x90a\x0E\xBAV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02\x81\x90a\x0E\xBAV[\x80\x15a\x02\xCEW\x80`\x1F\x10a\x02\xA3Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\xCEV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02\xB1W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x92R\x80\x83 \x85\x90UQ\x91\x92\x90\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x90a\x03@\x90\x86\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01[\x92\x91PPV[`\tT`\xFF\x16\x15a\x03\xC4W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0a\x03\xD0\x84\x82a\x0F^V[P`\x01a\x03\xDD\x83\x82a\x0F^V[P`\x02\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\xFF\x83\x16\x17\x90Ua\x04\x13a\t\xF1V[`\x06Ua\x04\x1Ea\n\nV[`\x07UPP`\t\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x81 T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x14a\x04\xE5Wa\x04\xB3\x81\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x86\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 U[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16`\0\x90\x81R`\x04` R`@\x90 Ta\x05\x15\x90\x84a\n\xADV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16`\0\x90\x81R`\x04` R`@\x80\x82 \x93\x90\x93U\x90\x86\x16\x81R Ta\x05Q\x90\x84a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x86\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x93\x90\x93U\x91Q\x90\x87\x16\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x05\xB2\x90\x87\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA3P`\x01\x94\x93PPPPV[`\0`\x06Ta\x05\xD2a\t\xF1V[\x14a\x05\xE4Wa\x05\xDFa\n\nV[\x90P\x90V[P`\x07T\x90V[```\x01\x80Ta\x02U\x90a\x0E\xBAV[3`\0\x90\x81R`\x04` R`@\x81 Ta\x06\x14\x90\x83a\n\xADV[3`\0\x90\x81R`\x04` R`@\x80\x82 \x92\x90\x92Us\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x81R Ta\x06M\x90\x83a\x0B*V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16`\0\x81\x81R`\x04` R`@\x90\x81\x90 \x92\x90\x92U\x90Q3\x90\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x90a\x03@\x90\x86\x81R` \x01\x90V[B\x84\x10\x15a\x07\x15W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x17`$\x82\x01R\x7FPERMIT_DEADLINE_EXPIRED\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[`\0`\x01a\x07!a\x05\xC5V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x16`\0\x90\x81R`\x08` R`@\x81 \x80T\x7Fnq\xED\xAE\x12\xB1\xB9\x7FM\x1F`7\x0F\xEF\x10\x10_\xA2\xFA\xAE\x01&\x11J\x16\x9Cd\x84]a&\xC9\x92\x8D\x92\x8D\x92\x8D\x92\x90\x91\x90a\x07|\x83a\x10\xA7V[\x90\x91UP`@\x80Q` \x81\x01\x96\x90\x96Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x85\x16\x90\x86\x01R\x92\x90\x91\x16``\x84\x01R`\x80\x83\x01R`\xA0\x82\x01R`\xC0\x81\x01\x88\x90R`\xE0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 `@Q` \x01a\x08\x1D\x92\x91\x90\x7F\x19\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x02\x81\x01\x92\x90\x92R`\"\x82\x01R`B\x01\x90V[`@\x80Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x81\x84\x03\x01\x81R\x82\x82R\x80Q` \x91\x82\x01 `\0\x84R\x90\x83\x01\x80\x83RR`\xFF\x87\x16\x90\x82\x01R``\x81\x01\x85\x90R`\x80\x81\x01\x84\x90R`\xA0\x01` `@Q` \x81\x03\x90\x80\x84\x03\x90\x85Z\xFA\x15\x80\x15a\x08\x99W=`\0\x80>=`\0\xFD[PP`@Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x01Q\x91PPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x15\x80\x15\x90a\t\x14WP\x87s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14[a\tzW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0E`$\x82\x01R\x7FINVALID_SIGNER\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\x0B\xA3\x80a\n\x03c\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\n<\x91\x90a\x10\xDFV[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\nma\t\xF1V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\x0B\x19W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[a\x0B#\x82\x84a\x11sV[\x93\x92PPPV[`\0\x80a\x0B7\x83\x85a\x11\x86V[\x90P\x83\x81\x10\x15a\x0B#W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03\xBBV[F\x90V[`\0` \x80\x83R\x83Q\x80` \x85\x01R`\0[\x81\x81\x10\x15a\x0B\xD5W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x0B\xB9V[P`\0`@\x82\x86\x01\x01R`@\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0CPW`\0\x80\xFD[a\x0CY\x83a\x0C\x14V[\x94` \x93\x90\x93\x015\x93PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\x0C\xA7W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\xC2Wa\x0C\xC2a\x0CgV[`@Q`\x1F\x83\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\r\x08Wa\r\x08a\x0CgV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\r!W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\x0C8W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\rgW`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\r\x7FW`\0\x80\xFD[a\r\x8B\x87\x83\x88\x01a\x0C\x96V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\r\xA1W`\0\x80\xFD[Pa\r\xAE\x86\x82\x87\x01a\x0C\x96V[\x92PPa\r\xBD`@\x85\x01a\rAV[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\r\xDBW`\0\x80\xFD[a\r\xE4\x84a\x0C\x14V[\x92Pa\r\xF2` \x85\x01a\x0C\x14V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0E\x14W`\0\x80\xFD[a\x0B#\x82a\x0C\x14V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0E8W`\0\x80\xFD[a\x0EA\x88a\x0C\x14V[\x96Pa\x0EO` \x89\x01a\x0C\x14V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0Ek`\x80\x89\x01a\rAV[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0E\x9AW`\0\x80\xFD[a\x0E\xA3\x83a\x0C\x14V[\x91Pa\x0E\xB1` \x84\x01a\x0C\x14V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0E\xCEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0F\x07W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0FYW`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0F6WP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0FUW\x82\x81U`\x01\x01a\x0FBV[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FxWa\x0Fxa\x0CgV[a\x0F\x8C\x81a\x0F\x86\x84Ta\x0E\xBAV[\x84a\x0F\rV[` \x80`\x1F\x83\x11`\x01\x81\x14a\x0F\xDFW`\0\x84\x15a\x0F\xA9WP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0FUV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x10,W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x10\rV[P\x85\x82\x10\x15a\x10hW\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x10\xD8Wa\x10\xD8a\x10xV[P`\x01\x01\x90V[`\0\x80\x83Ta\x10\xED\x81a\x0E\xBAV[`\x01\x82\x81\x16\x80\x15a\x11\x05W`\x01\x81\x14a\x118Wa\x11gV[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x11gV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x11^W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\x11EV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03LWa\x03La\x10xV[\x80\x82\x01\x80\x82\x11\x15a\x03LWa\x03La\x10xV", ); /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. -```solidity -event Approval(address indexed owner, address indexed spender, uint256 value); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Approval { @@ -389,49 +391,19 @@ event Approval(address indexed owner, address indexed spender, uint256 value); #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, + 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -448,14 +420,18 @@ event Approval(address indexed owner, address indexed spender, uint256 value); #[inline] fn tokenize_body(&self) -> Self::DataToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } #[inline] fn encode_topics_raw( @@ -465,9 +441,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -477,22 +451,27 @@ event Approval(address indexed owner, address indexed spender, uint256 value); Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + 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<&Approval> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Approval) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. -```solidity -event Transfer(address indexed from, address indexed to, uint256 value); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Transfer { @@ -509,49 +488,19 @@ event Transfer(address indexed from, address indexed to, uint256 value); #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, + 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, + 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -568,14 +517,18 @@ event Transfer(address indexed from, address indexed to, uint256 value); #[inline] fn tokenize_body(&self) -> Self::DataToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } #[inline] fn encode_topics_raw( @@ -585,9 +538,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -597,22 +548,27 @@ event Transfer(address indexed from, address indexed to, uint256 value); Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + 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<&Transfer> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall {} @@ -632,9 +588,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -643,16 +597,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -665,9 +617,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -676,16 +626,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -694,14 +642,10 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = DOMAIN_SEPARATORReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; #[inline] @@ -719,17 +663,17 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. -```solidity -function allowance(address owner, address spender) external view returns (uint256); -```*/ + ```solidity + function allowance(address owner, address spender) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct allowanceCall { @@ -758,9 +702,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -792,9 +734,7 @@ function allowance(address owner, address spender) external view returns (uint25 type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -822,14 +762,10 @@ function allowance(address owner, address spender) external view returns (uint25 alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = allowanceReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "allowance(address,address)"; const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; #[inline] @@ -854,17 +790,17 @@ function allowance(address owner, address spender) external view returns (uint25 data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct approveCall { @@ -893,9 +829,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -927,9 +861,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -957,14 +889,10 @@ function approve(address spender, uint256 amount) external returns (bool); alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = approveReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "approve(address,uint256)"; const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; #[inline] @@ -979,9 +907,9 @@ function approve(address spender, uint256 amount) external returns (bool); ::tokenize( &self.spender, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } #[inline] @@ -989,17 +917,17 @@ function approve(address spender, uint256 amount) external returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address owner) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct balanceOfCall { @@ -1021,9 +949,7 @@ function balanceOf(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1052,9 +978,7 @@ function balanceOf(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1079,14 +1003,10 @@ function balanceOf(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for balanceOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = balanceOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "balanceOf(address)"; const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; #[inline] @@ -1108,17 +1028,17 @@ function balanceOf(address owner) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```solidity + function decimals() external view returns (uint8); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct decimalsCall {} @@ -1138,9 +1058,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1169,9 +1087,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1196,14 +1112,10 @@ function decimals() external view returns (uint8); #[automatically_derived] impl alloy_sol_types::SolCall for decimalsCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = decimalsReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "decimals()"; const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; #[inline] @@ -1221,17 +1133,17 @@ function decimals() external view returns (uint8); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `initialize(string,string,uint8)` and selector `0x1624f6c6`. -```solidity -function initialize(string memory name_, string memory symbol_, uint8 decimals_) external; -```*/ + ```solidity + function initialize(string memory name_, string memory symbol_, uint8 decimals_) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct initializeCall { @@ -1261,9 +1173,7 @@ function initialize(string memory name_, string memory symbol_, uint8 decimals_) ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1296,9 +1206,7 @@ function initialize(string memory name_, string memory symbol_, uint8 decimals_) type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1327,14 +1235,10 @@ function initialize(string memory name_, string memory symbol_, uint8 decimals_) alloy::sol_types::sol_data::String, alloy::sol_types::sol_data::Uint<8>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = initializeReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "initialize(string,string,uint8)"; const SELECTOR: [u8; 4] = [22u8, 36u8, 246u8, 198u8]; #[inline] @@ -1352,9 +1256,9 @@ function initialize(string memory name_, string memory symbol_, uint8 decimals_) ::tokenize( &self.symbol_, ), - as alloy_sol_types::SolType>::tokenize(&self.decimals_), + as alloy_sol_types::SolType>::tokenize( + &self.decimals_, + ), ) } #[inline] @@ -1362,17 +1266,17 @@ function initialize(string memory name_, string memory symbol_, uint8 decimals_) data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```solidity + function name() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct nameCall {} @@ -1392,9 +1296,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1423,9 +1325,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1450,14 +1350,10 @@ function name() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for nameCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = nameReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "name()"; const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; #[inline] @@ -1475,17 +1371,17 @@ function name() external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address) external view returns (uint256); -```*/ + ```solidity + function nonces(address) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct noncesCall { @@ -1507,9 +1403,7 @@ function nonces(address) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1538,9 +1432,7 @@ function nonces(address) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1565,14 +1457,10 @@ function nonces(address) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = noncesReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "nonces(address)"; const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; #[inline] @@ -1594,17 +1482,17 @@ function nonces(address) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct permitCall { @@ -1646,9 +1534,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1693,9 +1579,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1728,15 +1612,12 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy::sol_types::sol_data::FixedBytes<32>, alloy::sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; #[inline] fn new<'a>( @@ -1775,17 +1656,17 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```solidity + function symbol() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct symbolCall {} @@ -1805,9 +1686,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1836,9 +1715,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1863,14 +1740,10 @@ function symbol() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for symbolCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = symbolReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "symbol()"; const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; #[inline] @@ -1888,17 +1761,17 @@ function symbol() external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `totalSupply()` and selector `0x18160ddd`. -```solidity -function totalSupply() external view returns (uint256); -```*/ + ```solidity + function totalSupply() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct totalSupplyCall {} @@ -1918,9 +1791,7 @@ function totalSupply() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1949,9 +1820,7 @@ function totalSupply() external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1976,14 +1845,10 @@ function totalSupply() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for totalSupplyCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = totalSupplyReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "totalSupply()"; const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; #[inline] @@ -2001,17 +1866,17 @@ function totalSupply() external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address to, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address to, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferCall { @@ -2040,9 +1905,7 @@ function transfer(address to, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2074,9 +1937,7 @@ function transfer(address to, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2104,14 +1965,10 @@ function transfer(address to, uint256 amount) external returns (bool); alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transfer(address,uint256)"; const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; #[inline] @@ -2126,9 +1983,9 @@ function transfer(address to, uint256 amount) external returns (bool); ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } #[inline] @@ -2136,17 +1993,17 @@ function transfer(address to, uint256 amount) external returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address from, address to, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address from, address to, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferFromCall { @@ -2178,9 +2035,7 @@ function transferFrom(address from, address to, uint256 amount) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2213,9 +2068,7 @@ function transferFrom(address from, address to, uint256 amount) external returns type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2244,14 +2097,10 @@ function transferFrom(address from, address to, uint256 amount) external returns alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferFromReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; #[inline] @@ -2269,9 +2118,9 @@ function transferFrom(address from, address to, uint256 amount) external returns ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } #[inline] @@ -2279,10 +2128,10 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -2337,28 +2186,18 @@ function transferFrom(address from, address to, uint256 amount) external returns Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, - Self::initialize(_) => { - ::SELECTOR - } + Self::initialize(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, Self::nonces(_) => ::SELECTOR, Self::permit(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, - Self::totalSupply(_) => { - ::SELECTOR - } + Self::totalSupply(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::SELECTOR, } } #[inline] @@ -2376,19 +2215,13 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { fn name( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::name) } name @@ -2398,10 +2231,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::approve) } approve @@ -2411,10 +2241,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::initialize) } initialize @@ -2425,10 +2252,9 @@ function transferFrom(address from, address to, uint256 amount) external returns validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC20Calls::totalSupply) + data, validate, + ) + .map(MockERC20Calls::totalSupply) } totalSupply }, @@ -2438,10 +2264,9 @@ function transferFrom(address from, address to, uint256 amount) external returns validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC20Calls::transferFrom) + data, validate, + ) + .map(MockERC20Calls::transferFrom) } transferFrom }, @@ -2450,10 +2275,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::decimals) } decimals @@ -2464,10 +2286,9 @@ function transferFrom(address from, address to, uint256 amount) external returns validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC20Calls::DOMAIN_SEPARATOR) + data, validate, + ) + .map(MockERC20Calls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, @@ -2476,10 +2297,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::balanceOf) } balanceOf @@ -2489,10 +2307,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::nonces) } nonces @@ -2502,10 +2317,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::symbol) } symbol @@ -2515,10 +2327,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::transfer) } transfer @@ -2528,10 +2337,7 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::permit) } permit @@ -2541,22 +2347,17 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC20Calls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -2564,9 +2365,7 @@ function transferFrom(address from, address to, uint256 amount) external returns fn abi_encoded_size(&self) -> usize { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -2596,17 +2395,13 @@ function transferFrom(address from, address to, uint256 amount) external returns ::abi_encoded_size(inner) } Self::totalSupply(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::transfer(inner) => { ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -2614,37 +2409,22 @@ function transferFrom(address from, address to, uint256 amount) external returns fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::initialize(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::name(inner) => { ::abi_encode_raw(inner, out) @@ -2659,22 +2439,13 @@ function transferFrom(address from, address to, uint256 amount) external returns ::abi_encode_raw(inner, out) } Self::totalSupply(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -2694,72 +2465,14 @@ function transferFrom(address from, address to, uint256 amount) external returns /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 32usize]] = &[ [ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, + 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, ], [ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, + 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, + 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, ], ]; } @@ -2774,31 +2487,40 @@ function transferFrom(address from, address to, uint256 amount) external returns ) -> alloy_sol_types::Result { match topics.first().copied() { Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Approval) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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 MockERC20Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -2806,7 +2528,7 @@ function transferFrom(address from, address to, uint256 amount) external returns use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance. -See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ + See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -2820,9 +2542,9 @@ See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -2830,35 +2552,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { MockERC20Instance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { MockERC20Instance::::deploy_builder(provider) } /**A [`MockERC20`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`MockERC20`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`MockERC20`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct MockERC20Instance { address: alloy_sol_types::private::Address, @@ -2869,24 +2592,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for MockERC20Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockERC20Instance").field(&self.address).finish() + f.debug_tuple("MockERC20Instance") + .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, - > MockERC20Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC20Instance + { /**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance. -See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ + See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -2895,22 +2618,20 @@ See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -2953,10 +2674,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC20Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC20Instance + { /// 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 @@ -2997,9 +2719,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.call_builder(&balanceOfCall { owner }) } ///Creates a new call builder for the [`decimals`] function. - pub fn decimals( - &self, - ) -> alloy_contract::SolCallBuilder { + pub fn decimals(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&decimalsCall {}) } ///Creates a new call builder for the [`initialize`] function. @@ -3009,13 +2729,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ symbol_: alloy::sol_types::private::String, decimals_: u8, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &initializeCall { - name_, - symbol_, - decimals_, - }, - ) + self.call_builder(&initializeCall { + name_, + symbol_, + decimals_, + }) } ///Creates a new call builder for the [`name`] function. pub fn name(&self) -> alloy_contract::SolCallBuilder { @@ -3039,26 +2757,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ r: alloy::sol_types::private::FixedBytes<32>, s: alloy::sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } ///Creates a new call builder for the [`symbol`] function. pub fn symbol(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&symbolCall {}) } ///Creates a new call builder for the [`totalSupply`] function. - pub fn totalSupply( - &self, - ) -> alloy_contract::SolCallBuilder { + pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder { self.call_builder(&totalSupplyCall {}) } ///Creates a new call builder for the [`transfer`] function. @@ -3076,22 +2790,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy::sol_types::private::Address, amount: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &transferFromCall { - from, - to, - amount, - }, - ) + self.call_builder(&transferFromCall { from, to, amount }) } } /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC20Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC20Instance + { /// 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. diff --git a/crates/bindings/src/mockerc721.rs b/crates/bindings/src/mockerc721.rs index 9cc1402..7a4e4b7 100644 --- a/crates/bindings/src/mockerc721.rs +++ b/crates/bindings/src/mockerc721.rs @@ -387,6 +387,7 @@ pub mod MockERC721 { ///0x608060405234801561001057600080fd5b50611469806100206000396000f3fe6080604052600436106100dd5760003560e01c80636352211e1161007f578063a22cb46511610059578063a22cb4651461025f578063b88d4fde1461027f578063c87b56dd14610292578063e985e9c5146102b357600080fd5b80636352211e146101fc57806370a082311461021c57806395d89b411461024a57600080fd5b8063095ea7b3116100bb578063095ea7b3146101a157806323b872dd146101b657806342842e0e146101c95780634cd88b76146101dc57600080fd5b806301ffc9a7146100e257806306fdde0314610117578063081812fc14610139575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610e1f565b610309565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b5061012c6103ee565b60405161010e9190610ea7565b34801561014557600080fd5b5061017c610154366004610eba565b60009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010e565b6101b46101af366004610ef7565b610480565b005b6101b46101c4366004610f21565b6105cf565b6101b46101d7366004610f21565b6108c4565b3480156101e857600080fd5b506101b46101f7366004611040565b610a18565b34801561020857600080fd5b5061017c610217366004610eba565b610ace565b34801561022857600080fd5b5061023c6102373660046110a4565b610b5f565b60405190815260200161010e565b34801561025657600080fd5b5061012c610c07565b34801561026b57600080fd5b506101b461027a3660046110bf565b610c16565b6101b461028d3660046110fb565b610cad565b34801561029e57600080fd5b5061012c6102ad366004610eba565b50606090565b3480156102bf57600080fd5b506101026102ce366004611177565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061039c57507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806103e857507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600080546103fd906111aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610429906111aa565b80156104765780601f1061044b57610100808354040283529160200191610476565b820191906000526020600020905b81548152906001019060200180831161045957829003601f168201915b5050505050905090565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16338114806104e3575073ffffffffffffffffffffffffffffffffffffffff8116600090815260056020908152604080832033845290915290205460ff165b61054e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064015b60405180910390fd5b60008281526004602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff84811691161461065f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f57524f4e475f46524f4d000000000000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff82166106dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f494e56414c49445f524543495049454e540000000000000000000000000000006044820152606401610545565b3373ffffffffffffffffffffffffffffffffffffffff84161480610730575073ffffffffffffffffffffffffffffffffffffffff8316600090815260056020908152604080832033845290915290205460ff165b8061075e575060008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1633145b6107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054916107f58361122c565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040812080549161082b83611261565b90915550506000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff8088167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556004909452828520805490911690559051849391928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8383836105cf565b813b15806109ad57506040517f150b7a020000000000000000000000000000000000000000000000000000000080825233600483015273ffffffffffffffffffffffffffffffffffffffff858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109899190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610a13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b505050565b60065460ff1615610a85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610545565b6000610a918382611306565b506001610a9e8282611306565b5050600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e4f545f4d494e544544000000000000000000000000000000000000000000006044820152606401610545565b919050565b600073ffffffffffffffffffffffffffffffffffffffff8216610bde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5a45524f5f4144445245535300000000000000000000000000000000000000006044820152606401610545565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6060600180546103fd906111aa565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cb88484846105cf565b823b1580610d8257506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290610d1b903390899088908890600401611420565b6020604051808303816000875af1158015610d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5e9190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610de8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b50505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e1c57600080fd5b50565b600060208284031215610e3157600080fd5b8135610e3c81610dee565b9392505050565b6000815180845260005b81811015610e6957602081850181015186830182015201610e4d565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610e3c6020830184610e43565b600060208284031215610ecc57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5a57600080fd5b60008060408385031215610f0a57600080fd5b610f1383610ed3565b946020939093013593505050565b600080600060608486031215610f3657600080fd5b610f3f84610ed3565b9250610f4d60208501610ed3565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115610fa757610fa7610f5d565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610fed57610fed610f5d565b8160405280935085815286868601111561100657600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261103157600080fd5b610e3c83833560208501610f8c565b6000806040838503121561105357600080fd5b823567ffffffffffffffff8082111561106b57600080fd5b61107786838701611020565b9350602085013591508082111561108d57600080fd5b5061109a85828601611020565b9150509250929050565b6000602082840312156110b657600080fd5b610e3c82610ed3565b600080604083850312156110d257600080fd5b6110db83610ed3565b9150602083013580151581146110f057600080fd5b809150509250929050565b6000806000806080858703121561111157600080fd5b61111a85610ed3565b935061112860208601610ed3565b925060408501359150606085013567ffffffffffffffff81111561114b57600080fd5b8501601f8101871361115c57600080fd5b61116b87823560208401610f8c565b91505092959194509250565b6000806040838503121561118a57600080fd5b61119383610ed3565b91506111a160208401610ed3565b90509250929050565b600181811c908216806111be57607f821691505b6020821081036111f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008161123b5761123b6111fd565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611292576112926111fd565b5060010190565b6000602082840312156112ab57600080fd5b8151610e3c81610dee565b601f821115610a13576000816000526020600020601f850160051c810160208610156112df5750805b601f850160051c820191505b818110156112fe578281556001016112eb565b505050505050565b815167ffffffffffffffff81111561132057611320610f5d565b6113348161132e84546111aa565b846112b6565b602080601f83116001811461138757600084156113515750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112fe565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113d4578886015182559484019460019091019084016113b5565b508582101561141057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261145f6080830184610e43565b969550505050505056 /// ``` #[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\x10W`\0\x80\xFD[Pa\x14i\x80a\0 `\09`\0\xF3\xFE`\x80`@R`\x046\x10a\0\xDDW`\x005`\xE0\x1C\x80ccR!\x1E\x11a\0\x7FW\x80c\xA2,\xB4e\x11a\0YW\x80c\xA2,\xB4e\x14a\x02_W\x80c\xB8\x8DO\xDE\x14a\x02\x7FW\x80c\xC8{V\xDD\x14a\x02\x92W\x80c\xE9\x85\xE9\xC5\x14a\x02\xB3W`\0\x80\xFD[\x80ccR!\x1E\x14a\x01\xFCW\x80cp\xA0\x821\x14a\x02\x1CW\x80c\x95\xD8\x9BA\x14a\x02JW`\0\x80\xFD[\x80c\t^\xA7\xB3\x11a\0\xBBW\x80c\t^\xA7\xB3\x14a\x01\xA1W\x80c#\xB8r\xDD\x14a\x01\xB6W\x80cB\x84.\x0E\x14a\x01\xC9W\x80cL\xD8\x8Bv\x14a\x01\xDCW`\0\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xE2W\x80c\x06\xFD\xDE\x03\x14a\x01\x17W\x80c\x08\x18\x12\xFC\x14a\x019W[`\0\x80\xFD[4\x80\x15a\0\xEEW`\0\x80\xFD[Pa\x01\x02a\0\xFD6`\x04a\x0E\x1FV[a\x03\tV[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x01#W`\0\x80\xFD[Pa\x01,a\x03\xEEV[`@Qa\x01\x0E\x91\x90a\x0E\xA7V[4\x80\x15a\x01EW`\0\x80\xFD[Pa\x01|a\x01T6`\x04a\x0E\xBAV[`\0\x90\x81R`\x04` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\x01\x0EV[a\x01\xB4a\x01\xAF6`\x04a\x0E\xF7V[a\x04\x80V[\0[a\x01\xB4a\x01\xC46`\x04a\x0F!V[a\x05\xCFV[a\x01\xB4a\x01\xD76`\x04a\x0F!V[a\x08\xC4V[4\x80\x15a\x01\xE8W`\0\x80\xFD[Pa\x01\xB4a\x01\xF76`\x04a\x10@V[a\n\x18V[4\x80\x15a\x02\x08W`\0\x80\xFD[Pa\x01|a\x02\x176`\x04a\x0E\xBAV[a\n\xCEV[4\x80\x15a\x02(W`\0\x80\xFD[Pa\x02=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\x89\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\n\x13W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPV[`\x06T`\xFF\x16\x15a\n\x85W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[`\0a\n\x91\x83\x82a\x13\x06V[P`\x01a\n\x9E\x82\x82a\x13\x06V[PP`\x06\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x80a\x0BZW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\n`$\x82\x01R\x7FNOT_MINTED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[\x91\x90PV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16a\x0B\xDEW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0C`$\x82\x01R\x7FZERO_ADDRESS\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03\xFD\x90a\x11\xAAV[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\x0C\xB8\x84\x84\x84a\x05\xCFV[\x82;\x15\x80a\r\x82WP`@Q\x7F\x15\x0Bz\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80\x82R\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x90c\x15\x0Bz\x02\x90a\r\x1B\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x14 V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\r:W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\r^\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\r\xE8W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPPV[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81\x16\x81\x14a\x0E\x1CW`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\x0E1W`\0\x80\xFD[\x815a\x0E<\x81a\r\xEEV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0EiW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0EMV[P`\0` \x82\x86\x01\x01R` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\x0E<` \x83\x01\x84a\x0ECV[`\0` \x82\x84\x03\x12\x15a\x0E\xCCW`\0\x80\xFD[P5\x91\x90PV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0BZW`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\nW`\0\x80\xFD[a\x0F\x13\x83a\x0E\xD3V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0F6W`\0\x80\xFD[a\x0F?\x84a\x0E\xD3V[\x92Pa\x0FM` \x85\x01a\x0E\xD3V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0F\xA7Wa\x0F\xA7a\x0F]V[`@Q`\x1F\x85\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0F\xEDWa\x0F\xEDa\x0F]V[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x10\x06W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x101W`\0\x80\xFD[a\x0E<\x83\x835` \x85\x01a\x0F\x8CV[`\0\x80`@\x83\x85\x03\x12\x15a\x10SW`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x10kW`\0\x80\xFD[a\x10w\x86\x83\x87\x01a\x10 V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x10\x8DW`\0\x80\xFD[Pa\x10\x9A\x85\x82\x86\x01a\x10 V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x10\xB6W`\0\x80\xFD[a\x0E<\x82a\x0E\xD3V[`\0\x80`@\x83\x85\x03\x12\x15a\x10\xD2W`\0\x80\xFD[a\x10\xDB\x83a\x0E\xD3V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x10\xF0W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x11\x11W`\0\x80\xFD[a\x11\x1A\x85a\x0E\xD3V[\x93Pa\x11(` \x86\x01a\x0E\xD3V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x11KW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\x11\\W`\0\x80\xFD[a\x11k\x87\x825` \x84\x01a\x0F\x8CV[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\x11\x8AW`\0\x80\xFD[a\x11\x93\x83a\x0E\xD3V[\x91Pa\x11\xA1` \x84\x01a\x0E\xD3V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x11\xBEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x11\xF7W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x81a\x12;Wa\x12;a\x11\xFDV[P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90V[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x12\x92Wa\x12\x92a\x11\xFDV[P`\x01\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x12\xABW`\0\x80\xFD[\x81Qa\x0E<\x81a\r\xEEV[`\x1F\x82\x11\x15a\n\x13W`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x12\xDFWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x12\xFEW\x82\x81U`\x01\x01a\x12\xEBV[PPPPPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x13 Wa\x13 a\x0F]V[a\x134\x81a\x13.\x84Ta\x11\xAAV[\x84a\x12\xB6V[` \x80`\x1F\x83\x11`\x01\x81\x14a\x13\x87W`\0\x84\x15a\x13QWP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x12\xFEV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x13\xD4W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x13\xB5V[P\x85\x82\x10\x15a\x14\x10W\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16\x83R\x80\x86\x16` \x84\x01RP\x83`@\x83\x01R`\x80``\x83\x01Ra\x14_`\x80\x83\x01\x84a\x0ECV[\x96\x95PPPPPPV", ); @@ -396,13 +397,14 @@ pub mod MockERC721 { ///0x6080604052600436106100dd5760003560e01c80636352211e1161007f578063a22cb46511610059578063a22cb4651461025f578063b88d4fde1461027f578063c87b56dd14610292578063e985e9c5146102b357600080fd5b80636352211e146101fc57806370a082311461021c57806395d89b411461024a57600080fd5b8063095ea7b3116100bb578063095ea7b3146101a157806323b872dd146101b657806342842e0e146101c95780634cd88b76146101dc57600080fd5b806301ffc9a7146100e257806306fdde0314610117578063081812fc14610139575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610e1f565b610309565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b5061012c6103ee565b60405161010e9190610ea7565b34801561014557600080fd5b5061017c610154366004610eba565b60009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010e565b6101b46101af366004610ef7565b610480565b005b6101b46101c4366004610f21565b6105cf565b6101b46101d7366004610f21565b6108c4565b3480156101e857600080fd5b506101b46101f7366004611040565b610a18565b34801561020857600080fd5b5061017c610217366004610eba565b610ace565b34801561022857600080fd5b5061023c6102373660046110a4565b610b5f565b60405190815260200161010e565b34801561025657600080fd5b5061012c610c07565b34801561026b57600080fd5b506101b461027a3660046110bf565b610c16565b6101b461028d3660046110fb565b610cad565b34801561029e57600080fd5b5061012c6102ad366004610eba565b50606090565b3480156102bf57600080fd5b506101026102ce366004611177565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061039c57507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806103e857507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600080546103fd906111aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610429906111aa565b80156104765780601f1061044b57610100808354040283529160200191610476565b820191906000526020600020905b81548152906001019060200180831161045957829003601f168201915b5050505050905090565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16338114806104e3575073ffffffffffffffffffffffffffffffffffffffff8116600090815260056020908152604080832033845290915290205460ff165b61054e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064015b60405180910390fd5b60008281526004602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff84811691161461065f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f57524f4e475f46524f4d000000000000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff82166106dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f494e56414c49445f524543495049454e540000000000000000000000000000006044820152606401610545565b3373ffffffffffffffffffffffffffffffffffffffff84161480610730575073ffffffffffffffffffffffffffffffffffffffff8316600090815260056020908152604080832033845290915290205460ff165b8061075e575060008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1633145b6107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610545565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054916107f58361122c565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040812080549161082b83611261565b90915550506000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff8088167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556004909452828520805490911690559051849391928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8383836105cf565b813b15806109ad57506040517f150b7a020000000000000000000000000000000000000000000000000000000080825233600483015273ffffffffffffffffffffffffffffffffffffffff858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109899190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610a13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b505050565b60065460ff1615610a85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f414c52454144595f494e495449414c495a4544000000000000000000000000006044820152606401610545565b6000610a918382611306565b506001610a9e8282611306565b5050600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610b5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e4f545f4d494e544544000000000000000000000000000000000000000000006044820152606401610545565b919050565b600073ffffffffffffffffffffffffffffffffffffffff8216610bde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5a45524f5f4144445245535300000000000000000000000000000000000000006044820152606401610545565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6060600180546103fd906111aa565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cb88484846105cf565b823b1580610d8257506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290610d1b903390899088908890600401611420565b6020604051808303816000875af1158015610d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5e9190611299565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610de8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610545565b50505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e1c57600080fd5b50565b600060208284031215610e3157600080fd5b8135610e3c81610dee565b9392505050565b6000815180845260005b81811015610e6957602081850181015186830182015201610e4d565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610e3c6020830184610e43565b600060208284031215610ecc57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b5a57600080fd5b60008060408385031215610f0a57600080fd5b610f1383610ed3565b946020939093013593505050565b600080600060608486031215610f3657600080fd5b610f3f84610ed3565b9250610f4d60208501610ed3565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115610fa757610fa7610f5d565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610fed57610fed610f5d565b8160405280935085815286868601111561100657600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261103157600080fd5b610e3c83833560208501610f8c565b6000806040838503121561105357600080fd5b823567ffffffffffffffff8082111561106b57600080fd5b61107786838701611020565b9350602085013591508082111561108d57600080fd5b5061109a85828601611020565b9150509250929050565b6000602082840312156110b657600080fd5b610e3c82610ed3565b600080604083850312156110d257600080fd5b6110db83610ed3565b9150602083013580151581146110f057600080fd5b809150509250929050565b6000806000806080858703121561111157600080fd5b61111a85610ed3565b935061112860208601610ed3565b925060408501359150606085013567ffffffffffffffff81111561114b57600080fd5b8501601f8101871361115c57600080fd5b61116b87823560208401610f8c565b91505092959194509250565b6000806040838503121561118a57600080fd5b61119383610ed3565b91506111a160208401610ed3565b90509250929050565b600181811c908216806111be57607f821691505b6020821081036111f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008161123b5761123b6111fd565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611292576112926111fd565b5060010190565b6000602082840312156112ab57600080fd5b8151610e3c81610dee565b601f821115610a13576000816000526020600020601f850160051c810160208610156112df5750805b601f850160051c820191505b818110156112fe578281556001016112eb565b505050505050565b815167ffffffffffffffff81111561132057611320610f5d565b6113348161132e84546111aa565b846112b6565b602080601f83116001811461138757600084156113515750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556112fe565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156113d4578886015182559484019460019091019084016113b5565b508582101561141057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261145f6080830184610e43565b969550505050505056 /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"`\x80`@R`\x046\x10a\0\xDDW`\x005`\xE0\x1C\x80ccR!\x1E\x11a\0\x7FW\x80c\xA2,\xB4e\x11a\0YW\x80c\xA2,\xB4e\x14a\x02_W\x80c\xB8\x8DO\xDE\x14a\x02\x7FW\x80c\xC8{V\xDD\x14a\x02\x92W\x80c\xE9\x85\xE9\xC5\x14a\x02\xB3W`\0\x80\xFD[\x80ccR!\x1E\x14a\x01\xFCW\x80cp\xA0\x821\x14a\x02\x1CW\x80c\x95\xD8\x9BA\x14a\x02JW`\0\x80\xFD[\x80c\t^\xA7\xB3\x11a\0\xBBW\x80c\t^\xA7\xB3\x14a\x01\xA1W\x80c#\xB8r\xDD\x14a\x01\xB6W\x80cB\x84.\x0E\x14a\x01\xC9W\x80cL\xD8\x8Bv\x14a\x01\xDCW`\0\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xE2W\x80c\x06\xFD\xDE\x03\x14a\x01\x17W\x80c\x08\x18\x12\xFC\x14a\x019W[`\0\x80\xFD[4\x80\x15a\0\xEEW`\0\x80\xFD[Pa\x01\x02a\0\xFD6`\x04a\x0E\x1FV[a\x03\tV[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x01#W`\0\x80\xFD[Pa\x01,a\x03\xEEV[`@Qa\x01\x0E\x91\x90a\x0E\xA7V[4\x80\x15a\x01EW`\0\x80\xFD[Pa\x01|a\x01T6`\x04a\x0E\xBAV[`\0\x90\x81R`\x04` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\x01\x0EV[a\x01\xB4a\x01\xAF6`\x04a\x0E\xF7V[a\x04\x80V[\0[a\x01\xB4a\x01\xC46`\x04a\x0F!V[a\x05\xCFV[a\x01\xB4a\x01\xD76`\x04a\x0F!V[a\x08\xC4V[4\x80\x15a\x01\xE8W`\0\x80\xFD[Pa\x01\xB4a\x01\xF76`\x04a\x10@V[a\n\x18V[4\x80\x15a\x02\x08W`\0\x80\xFD[Pa\x01|a\x02\x176`\x04a\x0E\xBAV[a\n\xCEV[4\x80\x15a\x02(W`\0\x80\xFD[Pa\x02=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\x89\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\n\x13W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPV[`\x06T`\xFF\x16\x15a\n\x85W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x13`$\x82\x01R\x7FALREADY_INITIALIZED\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[`\0a\n\x91\x83\x82a\x13\x06V[P`\x01a\n\x9E\x82\x82a\x13\x06V[PP`\x06\x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x80a\x0BZW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\n`$\x82\x01R\x7FNOT_MINTED\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[\x91\x90PV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16a\x0B\xDEW`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x0C`$\x82\x01R\x7FZERO_ADDRESS\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03\xFD\x90a\x11\xAAV[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\x0C\xB8\x84\x84\x84a\x05\xCFV[\x82;\x15\x80a\r\x82WP`@Q\x7F\x15\x0Bz\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80\x82R\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x90c\x15\x0Bz\x02\x90a\r\x1B\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x14 V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\r:W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\r^\x91\x90a\x12\x99V[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x14[a\r\xE8W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R` `\x04\x82\x01R`\x10`$\x82\x01R\x7FUNSAFE_RECIPIENT\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x05EV[PPPPV[\x7F\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81\x16\x81\x14a\x0E\x1CW`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\x0E1W`\0\x80\xFD[\x815a\x0E<\x81a\r\xEEV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0EiW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0EMV[P`\0` \x82\x86\x01\x01R` \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\x0E<` \x83\x01\x84a\x0ECV[`\0` \x82\x84\x03\x12\x15a\x0E\xCCW`\0\x80\xFD[P5\x91\x90PV[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x0BZW`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\nW`\0\x80\xFD[a\x0F\x13\x83a\x0E\xD3V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0F6W`\0\x80\xFD[a\x0F?\x84a\x0E\xD3V[\x92Pa\x0FM` \x85\x01a\x0E\xD3V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0F\xA7Wa\x0F\xA7a\x0F]V[`@Q`\x1F\x85\x01\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0F\xEDWa\x0F\xEDa\x0F]V[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x10\x06W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x101W`\0\x80\xFD[a\x0E<\x83\x835` \x85\x01a\x0F\x8CV[`\0\x80`@\x83\x85\x03\x12\x15a\x10SW`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x10kW`\0\x80\xFD[a\x10w\x86\x83\x87\x01a\x10 V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x10\x8DW`\0\x80\xFD[Pa\x10\x9A\x85\x82\x86\x01a\x10 V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x10\xB6W`\0\x80\xFD[a\x0E<\x82a\x0E\xD3V[`\0\x80`@\x83\x85\x03\x12\x15a\x10\xD2W`\0\x80\xFD[a\x10\xDB\x83a\x0E\xD3V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x10\xF0W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x11\x11W`\0\x80\xFD[a\x11\x1A\x85a\x0E\xD3V[\x93Pa\x11(` \x86\x01a\x0E\xD3V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x11KW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\x11\\W`\0\x80\xFD[a\x11k\x87\x825` \x84\x01a\x0F\x8CV[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\x11\x8AW`\0\x80\xFD[a\x11\x93\x83a\x0E\xD3V[\x91Pa\x11\xA1` \x84\x01a\x0E\xD3V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x11\xBEW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x11\xF7W\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`\x11`\x04R`$`\0\xFD[`\0\x81a\x12;Wa\x12;a\x11\xFDV[P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01\x90V[`\0\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x03a\x12\x92Wa\x12\x92a\x11\xFDV[P`\x01\x01\x90V[`\0` \x82\x84\x03\x12\x15a\x12\xABW`\0\x80\xFD[\x81Qa\x0E<\x81a\r\xEEV[`\x1F\x82\x11\x15a\n\x13W`\0\x81`\0R` `\0 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x12\xDFWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x12\xFEW\x82\x81U`\x01\x01a\x12\xEBV[PPPPPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x13 Wa\x13 a\x0F]V[a\x134\x81a\x13.\x84Ta\x11\xAAV[\x84a\x12\xB6V[` \x80`\x1F\x83\x11`\x01\x81\x14a\x13\x87W`\0\x84\x15a\x13QWP\x85\x83\x01Q[\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x12\xFEV[`\0\x85\x81R` \x81 \x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xE0\x86\x16\x91[\x82\x81\x10\x15a\x13\xD4W\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\x13\xB5V[P\x85\x82\x10\x15a\x14\x10W\x87\x85\x01Q\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[`\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x87\x16\x83R\x80\x86\x16` \x84\x01RP\x83`@\x83\x01R`\x80``\x83\x01Ra\x14_`\x80\x83\x01\x84a\x0ECV[\x96\x95PPPPPPV", ); /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. -```solidity -event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); -```*/ + ```solidity + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Approval { @@ -419,9 +421,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -429,40 +429,12 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Approval(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, + 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -497,9 +469,7 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -512,22 +482,27 @@ event Approval(address indexed _owner, address indexed _approved, uint256 indexe Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + 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<&Approval> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Approval) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. -```solidity -event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); -```*/ + ```solidity + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct ApprovalForAll { @@ -544,49 +519,19 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap #[automatically_derived] impl alloy_sol_types::SolEvent for ApprovalForAll { type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, + 173u8, 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, + 137u8, 202u8, 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -624,9 +569,7 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._owner, ); @@ -636,22 +579,27 @@ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _ap Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + 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<&ApprovalForAll> for alloy_sol_types::private::LogData { #[inline] fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. -```solidity -event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); -```*/ + ```solidity + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct Transfer { @@ -668,9 +616,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, @@ -678,40 +624,12 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke alloy::sol_types::sol_data::Uint<256>, ); const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, + 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, + 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -746,9 +664,7 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self._from, ); @@ -761,22 +677,27 @@ event Transfer(address indexed _from, address indexed _to, uint256 indexed _toke Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + 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<&Transfer> for alloy_sol_types::private::LogData { #[inline] fn from(this: &Transfer) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 id) external payable; -```*/ + ```solidity + function approve(address spender, uint256 id) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct approveCall { @@ -803,9 +724,7 @@ function approve(address spender, uint256 id) external payable; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -837,9 +756,7 @@ function approve(address spender, uint256 id) external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -867,14 +784,10 @@ function approve(address spender, uint256 id) external payable; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = approveReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "approve(address,uint256)"; const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; #[inline] @@ -889,9 +802,9 @@ function approve(address spender, uint256 id) external payable; ::tokenize( &self.spender, ), - as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize( + &self.id, + ), ) } #[inline] @@ -899,17 +812,17 @@ function approve(address spender, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address owner) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct balanceOfCall { @@ -931,9 +844,7 @@ function balanceOf(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -962,9 +873,7 @@ function balanceOf(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -989,14 +898,10 @@ function balanceOf(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for balanceOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = balanceOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "balanceOf(address)"; const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; #[inline] @@ -1018,17 +923,17 @@ function balanceOf(address owner) external view returns (uint256); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. -```solidity -function getApproved(uint256 id) external view returns (address); -```*/ + ```solidity + function getApproved(uint256 id) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct getApprovedCall { @@ -1050,9 +955,7 @@ function getApproved(uint256 id) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1081,9 +984,7 @@ function getApproved(uint256 id) external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1108,14 +1009,10 @@ function getApproved(uint256 id) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for getApprovedCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getApprovedReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "getApproved(uint256)"; const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; #[inline] @@ -1127,9 +1024,9 @@ function getApproved(uint256 id) external view returns (address); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize( + &self.id, + ), ) } #[inline] @@ -1137,17 +1034,17 @@ function getApproved(uint256 id) external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `initialize(string,string)` and selector `0x4cd88b76`. -```solidity -function initialize(string memory name_, string memory symbol_) external; -```*/ + ```solidity + function initialize(string memory name_, string memory symbol_) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct initializeCall { @@ -1174,9 +1071,7 @@ function initialize(string memory name_, string memory symbol_) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1208,9 +1103,7 @@ function initialize(string memory name_, string memory symbol_) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1238,14 +1131,10 @@ function initialize(string memory name_, string memory symbol_) external; alloy::sol_types::sol_data::String, alloy::sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = initializeReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "initialize(string,string)"; const SELECTOR: [u8; 4] = [76u8, 216u8, 139u8, 118u8]; #[inline] @@ -1270,17 +1159,17 @@ function initialize(string memory name_, string memory symbol_) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. -```solidity -function isApprovedForAll(address owner, address operator) external view returns (bool); -```*/ + ```solidity + function isApprovedForAll(address owner, address operator) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct isApprovedForAllCall { @@ -1309,9 +1198,7 @@ function isApprovedForAll(address owner, address operator) external view returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1320,16 +1207,14 @@ function isApprovedForAll(address owner, address operator) external view returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllCall) -> Self { (value.owner, value.operator) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllCall { + impl ::core::convert::From> for isApprovedForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { owner: tuple.0, @@ -1345,9 +1230,7 @@ function isApprovedForAll(address owner, address operator) external view returns type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1356,16 +1239,14 @@ function isApprovedForAll(address owner, address operator) external view returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedForAllReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedForAllReturn { + impl ::core::convert::From> for isApprovedForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1377,14 +1258,10 @@ function isApprovedForAll(address owner, address operator) external view returns alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = isApprovedForAllReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; #[inline] @@ -1409,17 +1286,17 @@ function isApprovedForAll(address owner, address operator) external view returns data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```solidity + function name() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct nameCall {} @@ -1439,9 +1316,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1470,9 +1345,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1497,14 +1370,10 @@ function name() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for nameCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = nameReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "name()"; const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; #[inline] @@ -1522,17 +1391,17 @@ function name() external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. -```solidity -function ownerOf(uint256 id) external view returns (address owner); -```*/ + ```solidity + function ownerOf(uint256 id) external view returns (address owner); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct ownerOfCall { @@ -1554,9 +1423,7 @@ function ownerOf(uint256 id) external view returns (address owner); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1585,9 +1452,7 @@ function ownerOf(uint256 id) external view returns (address owner); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1612,14 +1477,10 @@ function ownerOf(uint256 id) external view returns (address owner); #[automatically_derived] impl alloy_sol_types::SolCall for ownerOfCall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ownerOfReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "ownerOf(uint256)"; const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; #[inline] @@ -1631,9 +1492,9 @@ function ownerOf(uint256 id) external view returns (address owner); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize( + &self.id, + ), ) } #[inline] @@ -1641,17 +1502,17 @@ function ownerOf(uint256 id) external view returns (address owner); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. -```solidity -function safeTransferFrom(address from, address to, uint256 id) external payable; -```*/ + ```solidity + function safeTransferFrom(address from, address to, uint256 id) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_0Call { @@ -1681,9 +1542,7 @@ function safeTransferFrom(address from, address to, uint256 id) external payable ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1692,16 +1551,14 @@ function safeTransferFrom(address from, address to, uint256 id) external payable } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Call) -> Self { (value.from, value.to, value.id) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Call { + impl ::core::convert::From> for safeTransferFrom_0Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { from: tuple.0, @@ -1718,9 +1575,7 @@ function safeTransferFrom(address from, address to, uint256 id) external payable type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1729,16 +1584,14 @@ function safeTransferFrom(address from, address to, uint256 id) external payable } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_0Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_0Return { + impl ::core::convert::From> for safeTransferFrom_0Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1751,14 +1604,10 @@ function safeTransferFrom(address from, address to, uint256 id) external payable alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_0Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; #[inline] @@ -1776,9 +1625,9 @@ function safeTransferFrom(address from, address to, uint256 id) external payable ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize( + &self.id, + ), ) } #[inline] @@ -1786,17 +1635,17 @@ function safeTransferFrom(address from, address to, uint256 id) external payable data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. -```solidity -function safeTransferFrom(address from, address to, uint256 id, bytes memory data) external payable; -```*/ + ```solidity + function safeTransferFrom(address from, address to, uint256 id, bytes memory data) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct safeTransferFrom_1Call { @@ -1829,9 +1678,7 @@ function safeTransferFrom(address from, address to, uint256 id, bytes memory dat ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1840,16 +1687,14 @@ function safeTransferFrom(address from, address to, uint256 id, bytes memory dat } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Call) -> Self { (value.from, value.to, value.id, value.data) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Call { + impl ::core::convert::From> for safeTransferFrom_1Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { from: tuple.0, @@ -1867,9 +1712,7 @@ function safeTransferFrom(address from, address to, uint256 id, bytes memory dat type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1878,16 +1721,14 @@ function safeTransferFrom(address from, address to, uint256 id, bytes memory dat } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: safeTransferFrom_1Return) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for safeTransferFrom_1Return { + impl ::core::convert::From> for safeTransferFrom_1Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1901,14 +1742,10 @@ function safeTransferFrom(address from, address to, uint256 id, bytes memory dat alloy::sol_types::sol_data::Uint<256>, alloy::sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = safeTransferFrom_1Return; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; #[inline] @@ -1926,9 +1763,9 @@ function safeTransferFrom(address from, address to, uint256 id, bytes memory dat ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize( + &self.id, + ), ::tokenize( &self.data, ), @@ -1939,17 +1776,17 @@ function safeTransferFrom(address from, address to, uint256 id, bytes memory dat data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. -```solidity -function setApprovalForAll(address operator, bool approved) external; -```*/ + ```solidity + function setApprovalForAll(address operator, bool approved) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct setApprovalForAllCall { @@ -1973,9 +1810,7 @@ function setApprovalForAll(address operator, bool approved) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1984,16 +1819,14 @@ function setApprovalForAll(address operator, bool approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllCall) -> Self { (value.operator, value.approved) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllCall { + impl ::core::convert::From> for setApprovalForAllCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { operator: tuple.0, @@ -2009,9 +1842,7 @@ function setApprovalForAll(address operator, bool approved) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2020,16 +1851,14 @@ function setApprovalForAll(address operator, bool approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovalForAllReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovalForAllReturn { + impl ::core::convert::From> for setApprovalForAllReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -2041,14 +1870,10 @@ function setApprovalForAll(address operator, bool approved) external; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setApprovalForAllReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; #[inline] @@ -2073,17 +1898,17 @@ function setApprovalForAll(address operator, bool approved) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. -```solidity -function supportsInterface(bytes4 interfaceId) external view returns (bool); -```*/ + ```solidity + function supportsInterface(bytes4 interfaceId) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct supportsInterfaceCall { @@ -2105,9 +1930,7 @@ function supportsInterface(bytes4 interfaceId) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2116,18 +1939,18 @@ function supportsInterface(bytes4 interfaceId) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceCall) -> Self { (value.interfaceId,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceCall { + impl ::core::convert::From> for supportsInterfaceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { interfaceId: tuple.0 } + Self { + interfaceId: tuple.0, + } } } } @@ -2138,9 +1961,7 @@ function supportsInterface(bytes4 interfaceId) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2149,16 +1970,14 @@ function supportsInterface(bytes4 interfaceId) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: supportsInterfaceReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for supportsInterfaceReturn { + impl ::core::convert::From> for supportsInterfaceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2167,14 +1986,10 @@ function supportsInterface(bytes4 interfaceId) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for supportsInterfaceCall { type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = supportsInterfaceReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "supportsInterface(bytes4)"; const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; #[inline] @@ -2196,17 +2011,17 @@ function supportsInterface(bytes4 interfaceId) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```solidity + function symbol() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct symbolCall {} @@ -2226,9 +2041,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2257,9 +2070,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2284,14 +2095,10 @@ function symbol() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for symbolCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = symbolReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "symbol()"; const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; #[inline] @@ -2309,17 +2116,17 @@ function symbol() external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `tokenURI(uint256)` and selector `0xc87b56dd`. -```solidity -function tokenURI(uint256 id) external view returns (string memory); -```*/ + ```solidity + function tokenURI(uint256 id) external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct tokenURICall { @@ -2341,9 +2148,7 @@ function tokenURI(uint256 id) external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2372,9 +2177,7 @@ function tokenURI(uint256 id) external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2399,14 +2202,10 @@ function tokenURI(uint256 id) external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for tokenURICall { type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = tokenURIReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "tokenURI(uint256)"; const SELECTOR: [u8; 4] = [200u8, 123u8, 86u8, 221u8]; #[inline] @@ -2418,9 +2217,9 @@ function tokenURI(uint256 id) external view returns (string memory); #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize( + &self.id, + ), ) } #[inline] @@ -2428,17 +2227,17 @@ function tokenURI(uint256 id) external view returns (string memory); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address from, address to, uint256 id) external payable; -```*/ + ```solidity + function transferFrom(address from, address to, uint256 id) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferFromCall { @@ -2468,9 +2267,7 @@ function transferFrom(address from, address to, uint256 id) external payable; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2503,9 +2300,7 @@ function transferFrom(address from, address to, uint256 id) external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2534,14 +2329,10 @@ function transferFrom(address from, address to, uint256 id) external payable; alloy::sol_types::sol_data::Address, alloy::sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferFromReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; #[inline] @@ -2559,9 +2350,9 @@ function transferFrom(address from, address to, uint256 id) external payable; ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize( + &self.id, + ), ) } #[inline] @@ -2569,10 +2360,10 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -2627,15 +2418,9 @@ function transferFrom(address from, address to, uint256 id) external payable; fn selector(&self) -> [u8; 4] { match self { Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } - Self::getApproved(_) => { - ::SELECTOR - } - Self::initialize(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, + Self::getApproved(_) => ::SELECTOR, + Self::initialize(_) => ::SELECTOR, Self::isApprovedForAll(_) => { ::SELECTOR } @@ -2655,9 +2440,7 @@ function transferFrom(address from, address to, uint256 id) external payable; } Self::symbol(_) => ::SELECTOR, Self::tokenURI(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::SELECTOR, } } #[inline] @@ -2675,20 +2458,16 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { fn supportsInterface( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC721Calls::supportsInterface) + data, validate, + ) + .map(MockERC721Calls::supportsInterface) } supportsInterface }, @@ -2697,10 +2476,7 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC721Calls::name) } name @@ -2711,10 +2487,9 @@ function transferFrom(address from, address to, uint256 id) external payable; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC721Calls::getApproved) + data, validate, + ) + .map(MockERC721Calls::getApproved) } getApproved }, @@ -2723,10 +2498,7 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC721Calls::approve) } approve @@ -2737,10 +2509,9 @@ function transferFrom(address from, address to, uint256 id) external payable; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC721Calls::transferFrom) + data, validate, + ) + .map(MockERC721Calls::transferFrom) } transferFrom }, @@ -2750,10 +2521,9 @@ function transferFrom(address from, address to, uint256 id) external payable; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC721Calls::safeTransferFrom_0) + data, validate, + ) + .map(MockERC721Calls::safeTransferFrom_0) } safeTransferFrom_0 }, @@ -2762,10 +2532,7 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC721Calls::initialize) } initialize @@ -2775,10 +2542,7 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC721Calls::ownerOf) } ownerOf @@ -2788,10 +2552,7 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC721Calls::balanceOf) } balanceOf @@ -2801,10 +2562,7 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC721Calls::symbol) } symbol @@ -2815,10 +2573,9 @@ function transferFrom(address from, address to, uint256 id) external payable; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC721Calls::setApprovalForAll) + data, validate, + ) + .map(MockERC721Calls::setApprovalForAll) } setApprovalForAll }, @@ -2828,10 +2585,9 @@ function transferFrom(address from, address to, uint256 id) external payable; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC721Calls::safeTransferFrom_1) + data, validate, + ) + .map(MockERC721Calls::safeTransferFrom_1) } safeTransferFrom_1 }, @@ -2840,10 +2596,7 @@ function transferFrom(address from, address to, uint256 id) external payable; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(MockERC721Calls::tokenURI) } tokenURI @@ -2854,21 +2607,18 @@ function transferFrom(address from, address to, uint256 id) external payable; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(MockERC721Calls::isApprovedForAll) + data, validate, + ) + .map(MockERC721Calls::isApprovedForAll) } isApprovedForAll }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -2882,17 +2632,13 @@ function transferFrom(address from, address to, uint256 id) external payable; ::abi_encoded_size(inner) } Self::getApproved(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::initialize(inner) => { ::abi_encoded_size(inner) } Self::isApprovedForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -2901,24 +2647,16 @@ function transferFrom(address from, address to, uint256 id) external payable; ::abi_encoded_size(inner) } Self::safeTransferFrom_0(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::safeTransferFrom_1(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setApprovalForAll(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::supportsInterface(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::symbol(inner) => { ::abi_encoded_size(inner) @@ -2927,9 +2665,7 @@ function transferFrom(address from, address to, uint256 id) external payable; ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -2940,28 +2676,16 @@ function transferFrom(address from, address to, uint256 id) external payable; ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getApproved(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::initialize(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::isApprovedForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::name(inner) => { ::abi_encode_raw(inner, out) @@ -2970,43 +2694,25 @@ function transferFrom(address from, address to, uint256 id) external payable; ::abi_encode_raw(inner, out) } Self::safeTransferFrom_0(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::safeTransferFrom_1(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setApprovalForAll(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::supportsInterface(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::symbol(inner) => { ::abi_encode_raw(inner, out) } Self::tokenURI(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -3027,106 +2733,19 @@ function transferFrom(address from, address to, uint256 id) external payable; /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 32usize]] = &[ [ - 23u8, - 48u8, - 126u8, - 171u8, - 57u8, - 171u8, - 97u8, - 7u8, - 232u8, - 137u8, - 152u8, - 69u8, - 173u8, - 61u8, - 89u8, - 189u8, - 150u8, - 83u8, - 242u8, - 0u8, - 242u8, - 32u8, - 146u8, - 4u8, - 137u8, - 202u8, - 43u8, - 89u8, - 55u8, - 105u8, - 108u8, - 49u8, + 23u8, 48u8, 126u8, 171u8, 57u8, 171u8, 97u8, 7u8, 232u8, 137u8, 152u8, 69u8, 173u8, + 61u8, 89u8, 189u8, 150u8, 83u8, 242u8, 0u8, 242u8, 32u8, 146u8, 4u8, 137u8, 202u8, + 43u8, 89u8, 55u8, 105u8, 108u8, 49u8, ], [ - 140u8, - 91u8, - 225u8, - 229u8, - 235u8, - 236u8, - 125u8, - 91u8, - 209u8, - 79u8, - 113u8, - 66u8, - 125u8, - 30u8, - 132u8, - 243u8, - 221u8, - 3u8, - 20u8, - 192u8, - 247u8, - 178u8, - 41u8, - 30u8, - 91u8, - 32u8, - 10u8, - 200u8, - 199u8, - 195u8, - 185u8, - 37u8, + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8, + 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8, + 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, ], [ - 221u8, - 242u8, - 82u8, - 173u8, - 27u8, - 226u8, - 200u8, - 155u8, - 105u8, - 194u8, - 176u8, - 104u8, - 252u8, - 55u8, - 141u8, - 170u8, - 149u8, - 43u8, - 167u8, - 241u8, - 99u8, - 196u8, - 161u8, - 22u8, - 40u8, - 245u8, - 90u8, - 77u8, - 245u8, - 35u8, - 179u8, - 239u8, + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8, + 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8, + 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, ], ]; } @@ -3141,39 +2760,52 @@ function transferFrom(address from, address to, uint256 id) external payable; ) -> alloy_sol_types::Result { match topics.first().copied() { Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Approval) } Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - validate, - ) - .map(Self::ApprovalForAll) + topics, data, validate, + ) + .map(Self::ApprovalForAll) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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 MockERC721Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -3181,7 +2813,7 @@ function transferFrom(address from, address to, uint256 id) external payable; use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`MockERC721`](self) contract instance. -See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ + See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -3195,9 +2827,9 @@ See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -3205,35 +2837,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { MockERC721Instance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { MockERC721Instance::::deploy_builder(provider) } /**A [`MockERC721`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`MockERC721`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`MockERC721`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct MockERC721Instance { address: alloy_sol_types::private::Address, @@ -3244,24 +2877,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for MockERC721Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockERC721Instance").field(&self.address).finish() + f.debug_tuple("MockERC721Instance") + .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, - > MockERC721Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC721Instance + { /**Creates a new wrapper around an on-chain [`MockERC721`](self) contract instance. -See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ + See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -3270,22 +2903,20 @@ See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -3328,10 +2959,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC721Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC721Instance + { /// 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 @@ -3378,12 +3010,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ owner: alloy::sol_types::private::Address, operator: alloy::sol_types::private::Address, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &isApprovedForAllCall { - owner, - operator, - }, - ) + self.call_builder(&isApprovedForAllCall { owner, operator }) } ///Creates a new call builder for the [`name`] function. pub fn name(&self) -> alloy_contract::SolCallBuilder { @@ -3403,13 +3030,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy::sol_types::private::Address, id: alloy::sol_types::private::U256, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_0Call { - from, - to, - id, - }, - ) + self.call_builder(&safeTransferFrom_0Call { from, to, id }) } ///Creates a new call builder for the [`safeTransferFrom_1`] function. pub fn safeTransferFrom_1( @@ -3419,14 +3040,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ id: alloy::sol_types::private::U256, data: alloy::sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &safeTransferFrom_1Call { - from, - to, - id, - data, - }, - ) + self.call_builder(&safeTransferFrom_1Call { from, to, id, data }) } ///Creates a new call builder for the [`setApprovalForAll`] function. pub fn setApprovalForAll( @@ -3434,23 +3048,14 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ operator: alloy::sol_types::private::Address, approved: bool, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &setApprovalForAllCall { - operator, - approved, - }, - ) + self.call_builder(&setApprovalForAllCall { operator, approved }) } ///Creates a new call builder for the [`supportsInterface`] function. pub fn supportsInterface( &self, interfaceId: alloy::sol_types::private::FixedBytes<4>, ) -> alloy_contract::SolCallBuilder { - self.call_builder( - &supportsInterfaceCall { - interfaceId, - }, - ) + self.call_builder(&supportsInterfaceCall { interfaceId }) } ///Creates a new call builder for the [`symbol`] function. pub fn symbol(&self) -> alloy_contract::SolCallBuilder { @@ -3476,10 +3081,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC721Instance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC721Instance + { /// 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. @@ -3494,9 +3100,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.event_filter::() } ///Creates a new event filter for the [`ApprovalForAll`] event. - pub fn ApprovalForAll_filter( - &self, - ) -> alloy_contract::Event { + pub fn ApprovalForAll_filter(&self) -> alloy_contract::Event { self.event_filter::() } ///Creates a new event filter for the [`Transfer`] event. diff --git a/crates/bindings/src/ownable.rs b/crates/bindings/src/ownable.rs index 1a83f72..b6ba09f 100644 --- a/crates/bindings/src/ownable.rs +++ b/crates/bindings/src/ownable.rs @@ -103,6 +103,7 @@ pub mod Ownable { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); @@ -112,13 +113,14 @@ pub mod Ownable { ///0x /// ``` #[rustfmt::skip] + #[allow(clippy::all)] pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"", ); /**Custom error with signature `OwnableInvalidOwner(address)` and selector `0x1e4fbdf7`. -```solidity -error OwnableInvalidOwner(address owner); -```*/ + ```solidity + error OwnableInvalidOwner(address owner); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct OwnableInvalidOwner { @@ -133,9 +135,7 @@ error OwnableInvalidOwner(address owner); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -159,9 +159,7 @@ error OwnableInvalidOwner(address owner); #[automatically_derived] impl alloy_sol_types::SolError for OwnableInvalidOwner { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "OwnableInvalidOwner(address)"; const SELECTOR: [u8; 4] = [30u8, 79u8, 189u8, 247u8]; #[inline] @@ -181,9 +179,9 @@ error OwnableInvalidOwner(address owner); } }; /**Custom error with signature `OwnableUnauthorizedAccount(address)` and selector `0x118cdaa7`. -```solidity -error OwnableUnauthorizedAccount(address account); -```*/ + ```solidity + error OwnableUnauthorizedAccount(address account); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct OwnableUnauthorizedAccount { @@ -198,9 +196,7 @@ error OwnableUnauthorizedAccount(address account); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -209,16 +205,14 @@ error OwnableUnauthorizedAccount(address account); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: OwnableUnauthorizedAccount) -> Self { (value.account,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for OwnableUnauthorizedAccount { + impl ::core::convert::From> for OwnableUnauthorizedAccount { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { account: tuple.0 } } @@ -226,9 +220,7 @@ error OwnableUnauthorizedAccount(address account); #[automatically_derived] impl alloy_sol_types::SolError for OwnableUnauthorizedAccount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "OwnableUnauthorizedAccount(address)"; const SELECTOR: [u8; 4] = [17u8, 140u8, 218u8, 167u8]; #[inline] @@ -248,9 +240,9 @@ error OwnableUnauthorizedAccount(address account); } }; /**Event with signature `OwnershipTransferred(address,address)` and selector `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`. -```solidity -event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); -```*/ + ```solidity + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct OwnershipTransferred { @@ -265,49 +257,19 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn #[automatically_derived] impl alloy_sol_types::SolEvent for OwnershipTransferred { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 139u8, - 224u8, - 7u8, - 156u8, - 83u8, - 22u8, - 89u8, - 20u8, - 19u8, - 68u8, - 205u8, - 31u8, - 208u8, - 164u8, - 242u8, - 132u8, - 25u8, - 73u8, - 127u8, - 151u8, - 34u8, - 163u8, - 218u8, - 175u8, - 227u8, - 180u8, - 24u8, - 111u8, - 107u8, - 100u8, - 87u8, - 224u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, + 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, + 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -340,9 +302,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.previousOwner, ); @@ -352,22 +312,27 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for OwnershipTransferred { + 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<&OwnershipTransferred> for alloy_sol_types::private::LogData { #[inline] fn from(this: &OwnershipTransferred) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Function with signature `owner()` and selector `0x8da5cb5b`. -```solidity -function owner() external view returns (address); -```*/ + ```solidity + function owner() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct ownerCall {} @@ -387,9 +352,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -418,9 +381,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -445,14 +406,10 @@ function owner() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ownerReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "owner()"; const SELECTOR: [u8; 4] = [141u8, 165u8, 203u8, 91u8]; #[inline] @@ -470,17 +427,17 @@ function owner() external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `renounceOwnership()` and selector `0x715018a6`. -```solidity -function renounceOwnership() external; -```*/ + ```solidity + function renounceOwnership() external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct renounceOwnershipCall {} @@ -498,9 +455,7 @@ function renounceOwnership() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -509,16 +464,14 @@ function renounceOwnership() external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: renounceOwnershipCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for renounceOwnershipCall { + impl ::core::convert::From> for renounceOwnershipCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -531,9 +484,7 @@ function renounceOwnership() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -542,16 +493,14 @@ function renounceOwnership() external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: renounceOwnershipReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for renounceOwnershipReturn { + impl ::core::convert::From> for renounceOwnershipReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -560,14 +509,10 @@ function renounceOwnership() external; #[automatically_derived] impl alloy_sol_types::SolCall for renounceOwnershipCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = renounceOwnershipReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "renounceOwnership()"; const SELECTOR: [u8; 4] = [113u8, 80u8, 24u8, 166u8]; #[inline] @@ -585,17 +530,17 @@ function renounceOwnership() external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferOwnership(address)` and selector `0xf2fde38b`. -```solidity -function transferOwnership(address newOwner) external; -```*/ + ```solidity + function transferOwnership(address newOwner) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferOwnershipCall { @@ -615,9 +560,7 @@ function transferOwnership(address newOwner) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -626,16 +569,14 @@ function transferOwnership(address newOwner) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: transferOwnershipCall) -> Self { (value.newOwner,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for transferOwnershipCall { + impl ::core::convert::From> for transferOwnershipCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { newOwner: tuple.0 } } @@ -648,9 +589,7 @@ function transferOwnership(address newOwner) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -659,16 +598,14 @@ function transferOwnership(address newOwner) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: transferOwnershipReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for transferOwnershipReturn { + impl ::core::convert::From> for transferOwnershipReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -677,14 +614,10 @@ function transferOwnership(address newOwner) external; #[automatically_derived] impl alloy_sol_types::SolCall for transferOwnershipCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferOwnershipReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferOwnership(address)"; const SELECTOR: [u8; 4] = [242u8, 253u8, 227u8, 139u8]; #[inline] @@ -706,10 +639,10 @@ function transferOwnership(address newOwner) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -765,32 +698,22 @@ function transferOwnership(address newOwner) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { fn renounceOwnership( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(OwnableCalls::renounceOwnership) + data, validate, + ) + .map(OwnableCalls::renounceOwnership) } renounceOwnership }, { - fn owner( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + fn owner(data: &[u8], validate: bool) -> alloy_sol_types::Result { + ::abi_decode_raw(data, validate) .map(OwnableCalls::owner) } owner @@ -801,21 +724,18 @@ function transferOwnership(address newOwner) external; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(OwnableCalls::transferOwnership) + data, validate, + ) + .map(OwnableCalls::transferOwnership) } transferOwnership }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -826,14 +746,10 @@ function transferOwnership(address newOwner) external; ::abi_encoded_size(inner) } Self::renounceOwnership(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::transferOwnership(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -844,16 +760,10 @@ function transferOwnership(address newOwner) external; ::abi_encode_raw(inner, out) } Self::renounceOwnership(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferOwnership(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -871,10 +781,8 @@ function transferOwnership(address newOwner) external; /// No guarantees are made about the order of the selectors. /// /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 4usize]] = &[ - [17u8, 140u8, 218u8, 167u8], - [30u8, 79u8, 189u8, 247u8], - ]; + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[17u8, 140u8, 218u8, 167u8], [30u8, 79u8, 189u8, 247u8]]; } #[automatically_derived] impl alloy_sol_types::SolInterface for OwnableErrors { @@ -907,20 +815,16 @@ function transferOwnership(address newOwner) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { fn OwnableUnauthorizedAccount( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(OwnableErrors::OwnableUnauthorizedAccount) + data, validate, + ) + .map(OwnableErrors::OwnableUnauthorizedAccount) } OwnableUnauthorizedAccount }, @@ -930,21 +834,18 @@ function transferOwnership(address newOwner) external; validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(OwnableErrors::OwnableInvalidOwner) + data, validate, + ) + .map(OwnableErrors::OwnableInvalidOwner) } OwnableInvalidOwner }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -952,9 +853,7 @@ function transferOwnership(address newOwner) external; fn abi_encoded_size(&self) -> usize { match self { Self::OwnableInvalidOwner(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::OwnableUnauthorizedAccount(inner) => { ::abi_encoded_size( @@ -967,15 +866,11 @@ function transferOwnership(address newOwner) external; fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::OwnableInvalidOwner(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::OwnableUnauthorizedAccount(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } @@ -993,42 +888,11 @@ function transferOwnership(address newOwner) external; /// No guarantees are made about the order of the selectors. /// /// Prefer using `SolInterface` methods instead. - pub const SELECTORS: &'static [[u8; 32usize]] = &[ - [ - 139u8, - 224u8, - 7u8, - 156u8, - 83u8, - 22u8, - 89u8, - 20u8, - 19u8, - 68u8, - 205u8, - 31u8, - 208u8, - 164u8, - 242u8, - 132u8, - 25u8, - 73u8, - 127u8, - 151u8, - 34u8, - 163u8, - 218u8, - 175u8, - 227u8, - 180u8, - 24u8, - 111u8, - 107u8, - 100u8, - 87u8, - 224u8, - ], - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, 208u8, + 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, 175u8, 227u8, 180u8, + 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, + ]]; } #[automatically_derived] impl alloy_sol_types::SolEventInterface for OwnableEvents { @@ -1040,26 +904,37 @@ function transferOwnership(address newOwner) external; validate: bool, ) -> alloy_sol_types::Result { match topics.first().copied() { - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - validate, - ) - .map(Self::OwnershipTransferred) + topics, data, validate, + ) + .map(Self::OwnershipTransferred) } - _ => { - 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(), - ), + _ => 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 OwnableEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::OwnershipTransferred(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::OwnershipTransferred(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -1067,7 +942,7 @@ function transferOwnership(address newOwner) external; use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`Ownable`](self) contract instance. -See the [wrapper's documentation](`OwnableInstance`) for more details.*/ + See the [wrapper's documentation](`OwnableInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -1081,9 +956,9 @@ See the [wrapper's documentation](`OwnableInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -1091,35 +966,36 @@ For more fine-grained control over the deployment process, use [`deploy_builder` N: alloy_contract::private::Network, >( provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { OwnableInstance::::deploy(provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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 { + >( + provider: P, + ) -> alloy_contract::RawCallBuilder { OwnableInstance::::deploy_builder(provider) } /**A [`Ownable`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Ownable`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Ownable`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct OwnableInstance { address: alloy_sol_types::private::Address, @@ -1130,24 +1006,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for OwnableInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("OwnableInstance").field(&self.address).finish() + f.debug_tuple("OwnableInstance") + .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, - > OwnableInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > OwnableInstance + { /**Creates a new wrapper around an on-chain [`Ownable`](self) contract instance. -See the [wrapper's documentation](`OwnableInstance`) for more details.*/ + See the [wrapper's documentation](`OwnableInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -1156,22 +1032,20 @@ See the [wrapper's documentation](`OwnableInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -1214,10 +1088,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > OwnableInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > OwnableInstance + { /// 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 @@ -1249,10 +1124,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > OwnableInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > OwnableInstance + { /// 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. diff --git a/crates/bindings/src/sckeystore.rs b/crates/bindings/src/sckeystore.rs index 49174fc..09b7b21 100644 --- a/crates/bindings/src/sckeystore.rs +++ b/crates/bindings/src/sckeystore.rs @@ -204,6 +204,7 @@ pub mod ScKeystore { ///0x608060405234801561001057600080fd5b5060405161055638038061055683398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b610459806100fd6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056 /// ``` #[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\x10W`\0\x80\xFD[P`@Qa\x05V8\x03\x80a\x05V\x839\x81\x01`@\x81\x90Ra\0/\x91a\0\xBEV[\x80`\x01`\x01`\xA0\x1B\x03\x81\x16a\0^W`@Qc\x1EO\xBD\xF7`\xE0\x1B\x81R`\0`\x04\x82\x01R`$\x01`@Q\x80\x91\x03\x90\xFD[a\0g\x81a\0nV[PPa\0\xEEV[`\0\x80T`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\x01`\x01`\xA0\x1B\x03\x19\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\0\xD0W`\0\x80\xFD[\x81Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0\xE7W`\0\x80\xFD[\x93\x92PPPV[a\x04Y\x80a\0\xFD`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPV", ); @@ -213,13 +214,14 @@ pub mod ScKeystore { ///0x608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100e2578063985751881461010a578063f2fde38b1461011d57600080fd5b80630e666e4914610077578063421b2d8b146100c5578063715018a6146100da575b600080fd5b6100b061008536600461041c565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d86100d336600461041c565b610130565b005b6100d861021f565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b6100d861011836600461041c565b610233565b6100d861012b36600461041c565b6102eb565b610138610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1615610198576040517fc344397e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602081815260409283902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b610227610354565b61023160006103a7565b565b61023b610354565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661029a576040517f907b361f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000819052600160209081526040519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d9101610214565b6102f3610354565b73ffffffffffffffffffffffffffffffffffffffff8116610348576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b610351816103a7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610231576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161033f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045257600080fd5b939250505056 /// ``` #[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\x10W`\0\x80\xFD[P`\x046\x10a\0rW`\x005`\xE0\x1C\x80c\x8D\xA5\xCB[\x11a\0PW\x80c\x8D\xA5\xCB[\x14a\0\xE2W\x80c\x98WQ\x88\x14a\x01\nW\x80c\xF2\xFD\xE3\x8B\x14a\x01\x1DW`\0\x80\xFD[\x80c\x0EfnI\x14a\0wW\x80cB\x1B-\x8B\x14a\0\xC5W\x80cqP\x18\xA6\x14a\0\xDAW[`\0\x80\xFD[a\0\xB0a\0\x856`\x04a\x04\x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x90V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xD8a\0\xD36`\x04a\x04\x1CV[a\x010V[\0[a\0\xD8a\x02\x1FV[`\0T`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBCV[a\0\xD8a\x01\x186`\x04a\x04\x1CV[a\x023V[a\0\xD8a\x01+6`\x04a\x04\x1CV[a\x02\xEBV[a\x018a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16\x15a\x01\x98W`@Q\x7F\xC3D9~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x81R`\x01` \x81\x81R`@\x92\x83\x90 \x80T\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x16\x90\x92\x17\x90\x91U\x90Q\x91\x82R\x7F\x19\xEF\x9AHw\x19\x9F\x89D\n&\xAC\xB2h\x95\xEC\x02\xED\x86\xF2\xDF\x1A\xEA\xA9\r\xC1\x80A\xB8\x92\xF7\x1F\x91\x01[`@Q\x80\x91\x03\x90\xA1PV[a\x02'a\x03TV[a\x021`\0a\x03\xA7V[V[a\x02;a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x90\x81R`\x01` R`@\x90 T`\xFF\x16a\x02\x9AW`@Q\x7F\x90{6\x1F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16`\0\x81\x90R`\x01` \x90\x81R`@Q\x91\x82R\x7F\xE9\xDC\xE8\xC9\x92b<\xE7\x91r[!\xE8W\xE32H\xD1\xF1\x90\xA2[Qh14 \xEE\xBD\xAA\xE9\x9D\x91\x01a\x02\x14V[a\x02\xF3a\x03TV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16a\x03HW`@Q\x7F\x1EO\xBD\xF7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\0`\x04\x82\x01R`$\x01[`@Q\x80\x91\x03\x90\xFD[a\x03Q\x81a\x03\xA7V[PV[`\0Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163\x14a\x021W`@Q\x7F\x11\x8C\xDA\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R3`\x04\x82\x01R`$\x01a\x03?V[`\0\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x16\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x16\x81\x17\x84U`@Q\x91\x90\x92\x16\x92\x83\x91\x7F\x8B\xE0\x07\x9CS\x16Y\x14\x13D\xCD\x1F\xD0\xA4\xF2\x84\x19I\x7F\x97\"\xA3\xDA\xAF\xE3\xB4\x18okdW\xE0\x91\x90\xA3PPV[`\0` \x82\x84\x03\x12\x15a\x04.W`\0\x80\xFD[\x815s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04RW`\0\x80\xFD[\x93\x92PPPV", ); /**Custom error with signature `OwnableInvalidOwner(address)` and selector `0x1e4fbdf7`. -```solidity -error OwnableInvalidOwner(address owner); -```*/ + ```solidity + error OwnableInvalidOwner(address owner); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct OwnableInvalidOwner { @@ -234,9 +236,7 @@ error OwnableInvalidOwner(address owner); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -260,9 +260,7 @@ error OwnableInvalidOwner(address owner); #[automatically_derived] impl alloy_sol_types::SolError for OwnableInvalidOwner { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "OwnableInvalidOwner(address)"; const SELECTOR: [u8; 4] = [30u8, 79u8, 189u8, 247u8]; #[inline] @@ -282,9 +280,9 @@ error OwnableInvalidOwner(address owner); } }; /**Custom error with signature `OwnableUnauthorizedAccount(address)` and selector `0x118cdaa7`. -```solidity -error OwnableUnauthorizedAccount(address account); -```*/ + ```solidity + error OwnableUnauthorizedAccount(address account); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct OwnableUnauthorizedAccount { @@ -299,9 +297,7 @@ error OwnableUnauthorizedAccount(address account); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -310,16 +306,14 @@ error OwnableUnauthorizedAccount(address account); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: OwnableUnauthorizedAccount) -> Self { (value.account,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for OwnableUnauthorizedAccount { + impl ::core::convert::From> for OwnableUnauthorizedAccount { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { account: tuple.0 } } @@ -327,9 +321,7 @@ error OwnableUnauthorizedAccount(address account); #[automatically_derived] impl alloy_sol_types::SolError for OwnableUnauthorizedAccount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "OwnableUnauthorizedAccount(address)"; const SELECTOR: [u8; 4] = [17u8, 140u8, 218u8, 167u8]; #[inline] @@ -349,9 +341,9 @@ error OwnableUnauthorizedAccount(address account); } }; /**Custom error with signature `UserAlreadyExists()` and selector `0xc344397e`. -```solidity -error UserAlreadyExists(); -```*/ + ```solidity + error UserAlreadyExists(); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct UserAlreadyExists {} @@ -364,9 +356,7 @@ error UserAlreadyExists(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -390,9 +380,7 @@ error UserAlreadyExists(); #[automatically_derived] impl alloy_sol_types::SolError for UserAlreadyExists { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "UserAlreadyExists()"; const SELECTOR: [u8; 4] = [195u8, 68u8, 57u8, 126u8]; #[inline] @@ -408,9 +396,9 @@ error UserAlreadyExists(); } }; /**Custom error with signature `UserDoesNotExist()` and selector `0x907b361f`. -```solidity -error UserDoesNotExist(); -```*/ + ```solidity + error UserDoesNotExist(); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct UserDoesNotExist {} @@ -423,9 +411,7 @@ error UserDoesNotExist(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -449,9 +435,7 @@ error UserDoesNotExist(); #[automatically_derived] impl alloy_sol_types::SolError for UserDoesNotExist { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "UserDoesNotExist()"; const SELECTOR: [u8; 4] = [144u8, 123u8, 54u8, 31u8]; #[inline] @@ -467,9 +451,9 @@ error UserDoesNotExist(); } }; /**Event with signature `OwnershipTransferred(address,address)` and selector `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`. -```solidity -event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); -```*/ + ```solidity + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct OwnershipTransferred { @@ -484,49 +468,19 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn #[automatically_derived] impl alloy_sol_types::SolEvent for OwnershipTransferred { type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'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::Address, alloy::sol_types::sol_data::Address, ); const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 139u8, - 224u8, - 7u8, - 156u8, - 83u8, - 22u8, - 89u8, - 20u8, - 19u8, - 68u8, - 205u8, - 31u8, - 208u8, - 164u8, - 242u8, - 132u8, - 25u8, - 73u8, - 127u8, - 151u8, - 34u8, - 163u8, - 218u8, - 175u8, - 227u8, - 180u8, - 24u8, - 111u8, - 107u8, - 100u8, - 87u8, - 224u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, + 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, + 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -559,9 +513,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.previousOwner, ); @@ -571,22 +523,27 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for OwnershipTransferred { + 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<&OwnershipTransferred> for alloy_sol_types::private::LogData { #[inline] fn from(this: &OwnershipTransferred) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `UserAdded(address)` and selector `0x19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f`. -```solidity -event UserAdded(address user); -```*/ + ```solidity + event UserAdded(address user); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct UserAdded { @@ -599,45 +556,15 @@ event UserAdded(address user); #[automatically_derived] impl alloy_sol_types::SolEvent for UserAdded { type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); const SIGNATURE: &'static str = "UserAdded(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 25u8, - 239u8, - 154u8, - 72u8, - 119u8, - 25u8, - 159u8, - 137u8, - 68u8, - 10u8, - 38u8, - 172u8, - 178u8, - 104u8, - 149u8, - 236u8, - 2u8, - 237u8, - 134u8, - 242u8, - 223u8, - 26u8, - 234u8, - 169u8, - 13u8, - 193u8, - 128u8, - 65u8, - 184u8, - 146u8, - 247u8, - 31u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 25u8, 239u8, 154u8, 72u8, 119u8, 25u8, 159u8, 137u8, 68u8, 10u8, 38u8, 172u8, + 178u8, 104u8, 149u8, 236u8, 2u8, 237u8, 134u8, 242u8, 223u8, 26u8, 234u8, + 169u8, 13u8, 193u8, 128u8, 65u8, 184u8, 146u8, 247u8, 31u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -667,28 +594,31 @@ event UserAdded(address user); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for UserAdded { + 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<&UserAdded> for alloy_sol_types::private::LogData { #[inline] fn from(this: &UserAdded) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Event with signature `UserRemoved(address)` and selector `0xe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d`. -```solidity -event UserRemoved(address user); -```*/ + ```solidity + event UserRemoved(address user); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::style)] #[derive(Clone)] pub struct UserRemoved { @@ -701,45 +631,15 @@ event UserRemoved(address user); #[automatically_derived] impl alloy_sol_types::SolEvent for UserRemoved { type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); const SIGNATURE: &'static str = "UserRemoved(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 233u8, - 220u8, - 232u8, - 201u8, - 146u8, - 98u8, - 60u8, - 231u8, - 145u8, - 114u8, - 91u8, - 33u8, - 232u8, - 87u8, - 227u8, - 50u8, - 72u8, - 209u8, - 241u8, - 144u8, - 162u8, - 91u8, - 81u8, - 104u8, - 49u8, - 52u8, - 32u8, - 238u8, - 189u8, - 170u8, - 233u8, - 157u8, - ]); + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 233u8, 220u8, 232u8, 201u8, 146u8, 98u8, 60u8, 231u8, 145u8, 114u8, 91u8, 33u8, + 232u8, 87u8, 227u8, 50u8, 72u8, 209u8, 241u8, 144u8, 162u8, 91u8, 81u8, 104u8, + 49u8, 52u8, 32u8, 238u8, 189u8, 170u8, 233u8, 157u8, + ]); const ANONYMOUS: bool = false; #[allow(unused_variables)] #[inline] @@ -769,28 +669,31 @@ event UserRemoved(address user); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for UserRemoved { + 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<&UserRemoved> for alloy_sol_types::private::LogData { #[inline] fn from(this: &UserRemoved) -> alloy_sol_types::private::LogData { - let topics = alloy_sol_types::SolEvent::encode_topics(this) - .into_iter() - .map(|t| t.into()) - .collect(); - let data = alloy_sol_types::SolEvent::encode_data(this).into(); - alloy_sol_types::private::LogData::new_unchecked(topics, data) + alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Constructor`. -```solidity -constructor(address initialOwner); -```*/ + ```solidity + constructor(address initialOwner); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct constructorCall { @@ -805,9 +708,7 @@ constructor(address initialOwner); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -825,16 +726,16 @@ constructor(address initialOwner); #[doc(hidden)] impl ::core::convert::From> for constructorCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { initialOwner: tuple.0 } + Self { + initialOwner: tuple.0, + } } } } #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, @@ -852,9 +753,9 @@ constructor(address initialOwner); } }; /**Function with signature `addUser(address)` and selector `0x421b2d8b`. -```solidity -function addUser(address user) external; -```*/ + ```solidity + function addUser(address user) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct addUserCall { @@ -874,9 +775,7 @@ function addUser(address user) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -905,9 +804,7 @@ function addUser(address user) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -932,14 +829,10 @@ function addUser(address user) external; #[automatically_derived] impl alloy_sol_types::SolCall for addUserCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = addUserReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "addUser(address)"; const SELECTOR: [u8; 4] = [66u8, 27u8, 45u8, 139u8]; #[inline] @@ -961,17 +854,17 @@ function addUser(address user) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `owner()` and selector `0x8da5cb5b`. -```solidity -function owner() external view returns (address); -```*/ + ```solidity + function owner() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct ownerCall {} @@ -991,9 +884,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1022,9 +913,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1049,14 +938,10 @@ function owner() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ownerReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "owner()"; const SELECTOR: [u8; 4] = [141u8, 165u8, 203u8, 91u8]; #[inline] @@ -1074,17 +959,17 @@ function owner() external view returns (address); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `removeUser(address)` and selector `0x98575188`. -```solidity -function removeUser(address user) external; -```*/ + ```solidity + function removeUser(address user) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct removeUserCall { @@ -1104,9 +989,7 @@ function removeUser(address user) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1135,9 +1018,7 @@ function removeUser(address user) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1162,14 +1043,10 @@ function removeUser(address user) external; #[automatically_derived] impl alloy_sol_types::SolCall for removeUserCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = removeUserReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "removeUser(address)"; const SELECTOR: [u8; 4] = [152u8, 87u8, 81u8, 136u8]; #[inline] @@ -1191,17 +1068,17 @@ function removeUser(address user) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `renounceOwnership()` and selector `0x715018a6`. -```solidity -function renounceOwnership() external; -```*/ + ```solidity + function renounceOwnership() external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct renounceOwnershipCall {} @@ -1219,9 +1096,7 @@ function renounceOwnership() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1230,16 +1105,14 @@ function renounceOwnership() external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: renounceOwnershipCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for renounceOwnershipCall { + impl ::core::convert::From> for renounceOwnershipCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1252,9 +1125,7 @@ function renounceOwnership() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1263,16 +1134,14 @@ function renounceOwnership() external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: renounceOwnershipReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for renounceOwnershipReturn { + impl ::core::convert::From> for renounceOwnershipReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1281,14 +1150,10 @@ function renounceOwnership() external; #[automatically_derived] impl alloy_sol_types::SolCall for renounceOwnershipCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = renounceOwnershipReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "renounceOwnership()"; const SELECTOR: [u8; 4] = [113u8, 80u8, 24u8, 166u8]; #[inline] @@ -1306,17 +1171,17 @@ function renounceOwnership() external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `transferOwnership(address)` and selector `0xf2fde38b`. -```solidity -function transferOwnership(address newOwner) external; -```*/ + ```solidity + function transferOwnership(address newOwner) external; + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct transferOwnershipCall { @@ -1336,9 +1201,7 @@ function transferOwnership(address newOwner) external; type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1347,16 +1210,14 @@ function transferOwnership(address newOwner) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: transferOwnershipCall) -> Self { (value.newOwner,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for transferOwnershipCall { + impl ::core::convert::From> for transferOwnershipCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { newOwner: tuple.0 } } @@ -1369,9 +1230,7 @@ function transferOwnership(address newOwner) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1380,16 +1239,14 @@ function transferOwnership(address newOwner) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: transferOwnershipReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for transferOwnershipReturn { + impl ::core::convert::From> for transferOwnershipReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -1398,14 +1255,10 @@ function transferOwnership(address newOwner) external; #[automatically_derived] impl alloy_sol_types::SolCall for transferOwnershipCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferOwnershipReturn; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "transferOwnership(address)"; const SELECTOR: [u8; 4] = [242u8, 253u8, 227u8, 139u8]; #[inline] @@ -1427,17 +1280,17 @@ function transferOwnership(address newOwner) external; data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; /**Function with signature `userExists(address)` and selector `0x0e666e49`. -```solidity -function userExists(address user) external view returns (bool); -```*/ + ```solidity + function userExists(address user) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case)] #[derive(Clone)] pub struct userExistsCall { @@ -1459,9 +1312,7 @@ function userExists(address user) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1490,9 +1341,7 @@ function userExists(address user) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1517,14 +1366,10 @@ function userExists(address user) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for userExistsCall { type Parameters<'a> = (alloy::sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = userExistsReturn; type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; const SIGNATURE: &'static str = "userExists(address)"; const SELECTOR: [u8; 4] = [14u8, 102u8, 110u8, 73u8]; #[inline] @@ -1546,10 +1391,10 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) - .map(Into::into) + as alloy_sol_types::SolType>::abi_decode_sequence( + data, validate, + ) + .map(Into::into) } } }; @@ -1589,18 +1434,14 @@ function userExists(address user) external view returns (bool); match self { Self::addUser(_) => ::SELECTOR, Self::owner(_) => ::SELECTOR, - Self::removeUser(_) => { - ::SELECTOR - } + Self::removeUser(_) => ::SELECTOR, Self::renounceOwnership(_) => { ::SELECTOR } Self::transferOwnership(_) => { ::SELECTOR } - Self::userExists(_) => { - ::SELECTOR - } + Self::userExists(_) => ::SELECTOR, } } #[inline] @@ -1618,19 +1459,13 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = &[ { fn userExists( data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(ScKeystoreCalls::userExists) } userExists @@ -1640,10 +1475,7 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(ScKeystoreCalls::addUser) } addUser @@ -1654,10 +1486,9 @@ function userExists(address user) external view returns (bool); validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(ScKeystoreCalls::renounceOwnership) + data, validate, + ) + .map(ScKeystoreCalls::renounceOwnership) } renounceOwnership }, @@ -1666,10 +1497,7 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(ScKeystoreCalls::owner) } owner @@ -1679,10 +1507,7 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, - ) + ::abi_decode_raw(data, validate) .map(ScKeystoreCalls::removeUser) } removeUser @@ -1693,21 +1518,18 @@ function userExists(address user) external view returns (bool); validate: bool, ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - validate, - ) - .map(ScKeystoreCalls::transferOwnership) + data, validate, + ) + .map(ScKeystoreCalls::transferOwnership) } transferOwnership }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -1724,14 +1546,10 @@ function userExists(address user) external view returns (bool); ::abi_encoded_size(inner) } Self::renounceOwnership(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::transferOwnership(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::userExists(inner) => { ::abi_encoded_size(inner) @@ -1748,28 +1566,16 @@ function userExists(address user) external view returns (bool); ::abi_encode_raw(inner, out) } Self::removeUser(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::renounceOwnership(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferOwnership(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::userExists(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -1833,70 +1639,63 @@ function userExists(address user) external view returns (bool); data: &[u8], validate: bool, ) -> alloy_sol_types::Result { - static DECODE_SHIMS: &[fn( - &[u8], - bool, - ) -> alloy_sol_types::Result] = &[ - { - fn OwnableUnauthorizedAccount( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( + static DECODE_SHIMS: &[fn(&[u8], bool) -> alloy_sol_types::Result] = + &[ + { + fn OwnableUnauthorizedAccount( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( data, validate, ) .map(ScKeystoreErrors::OwnableUnauthorizedAccount) - } - OwnableUnauthorizedAccount - }, - { - fn OwnableInvalidOwner( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, + } + OwnableUnauthorizedAccount + }, + { + fn OwnableInvalidOwner( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, ) .map(ScKeystoreErrors::OwnableInvalidOwner) - } - OwnableInvalidOwner - }, - { - fn UserDoesNotExist( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, + } + OwnableInvalidOwner + }, + { + fn UserDoesNotExist( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, ) .map(ScKeystoreErrors::UserDoesNotExist) - } - UserDoesNotExist - }, - { - fn UserAlreadyExists( - data: &[u8], - validate: bool, - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - validate, + } + UserDoesNotExist + }, + { + fn UserAlreadyExists( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, validate, ) .map(ScKeystoreErrors::UserAlreadyExists) - } - UserAlreadyExists - }, - ]; + } + UserAlreadyExists + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } @@ -1904,9 +1703,7 @@ function userExists(address user) external view returns (bool); fn abi_encoded_size(&self) -> usize { match self { Self::OwnableInvalidOwner(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::OwnableUnauthorizedAccount(inner) => { ::abi_encoded_size( @@ -1914,14 +1711,10 @@ function userExists(address user) external view returns (bool); ) } Self::UserAlreadyExists(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::UserDoesNotExist(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } @@ -1929,28 +1722,18 @@ function userExists(address user) external view returns (bool); fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::OwnableInvalidOwner(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::OwnableUnauthorizedAccount(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::UserAlreadyExists(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::UserDoesNotExist(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } @@ -1971,106 +1754,19 @@ function userExists(address user) external view returns (bool); /// Prefer using `SolInterface` methods instead. pub const SELECTORS: &'static [[u8; 32usize]] = &[ [ - 25u8, - 239u8, - 154u8, - 72u8, - 119u8, - 25u8, - 159u8, - 137u8, - 68u8, - 10u8, - 38u8, - 172u8, - 178u8, - 104u8, - 149u8, - 236u8, - 2u8, - 237u8, - 134u8, - 242u8, - 223u8, - 26u8, - 234u8, - 169u8, - 13u8, - 193u8, - 128u8, - 65u8, - 184u8, - 146u8, - 247u8, - 31u8, + 25u8, 239u8, 154u8, 72u8, 119u8, 25u8, 159u8, 137u8, 68u8, 10u8, 38u8, 172u8, + 178u8, 104u8, 149u8, 236u8, 2u8, 237u8, 134u8, 242u8, 223u8, 26u8, 234u8, 169u8, + 13u8, 193u8, 128u8, 65u8, 184u8, 146u8, 247u8, 31u8, ], [ - 139u8, - 224u8, - 7u8, - 156u8, - 83u8, - 22u8, - 89u8, - 20u8, - 19u8, - 68u8, - 205u8, - 31u8, - 208u8, - 164u8, - 242u8, - 132u8, - 25u8, - 73u8, - 127u8, - 151u8, - 34u8, - 163u8, - 218u8, - 175u8, - 227u8, - 180u8, - 24u8, - 111u8, - 107u8, - 100u8, - 87u8, - 224u8, + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, 208u8, + 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, 175u8, 227u8, + 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, ], [ - 233u8, - 220u8, - 232u8, - 201u8, - 146u8, - 98u8, - 60u8, - 231u8, - 145u8, - 114u8, - 91u8, - 33u8, - 232u8, - 87u8, - 227u8, - 50u8, - 72u8, - 209u8, - 241u8, - 144u8, - 162u8, - 91u8, - 81u8, - 104u8, - 49u8, - 52u8, - 32u8, - 238u8, - 189u8, - 170u8, - 233u8, - 157u8, + 233u8, 220u8, 232u8, 201u8, 146u8, 98u8, 60u8, 231u8, 145u8, 114u8, 91u8, 33u8, + 232u8, 87u8, 227u8, 50u8, 72u8, 209u8, 241u8, 144u8, 162u8, 91u8, 81u8, 104u8, + 49u8, 52u8, 32u8, 238u8, 189u8, 170u8, 233u8, 157u8, ], ]; } @@ -2084,42 +1780,57 @@ function userExists(address user) external view returns (bool); validate: bool, ) -> alloy_sol_types::Result { match topics.first().copied() { - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - validate, - ) - .map(Self::OwnershipTransferred) + topics, data, validate, + ) + .map(Self::OwnershipTransferred) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - validate, - ) + ::decode_raw_log(topics, data, validate) .map(Self::UserAdded) } Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - validate, - ) - .map(Self::UserRemoved) - } - _ => { - 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(), - ), + topics, data, validate, + ) + .map(Self::UserRemoved) + } + _ => 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 ScKeystoreEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::OwnershipTransferred(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::UserAdded(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::UserRemoved(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::OwnershipTransferred(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::UserAdded(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::UserRemoved(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } @@ -2127,7 +1838,7 @@ function userExists(address user) external view returns (bool); use alloy::contract as alloy_contract; /**Creates a new wrapper around an on-chain [`ScKeystore`](self) contract instance. -See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ + See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ #[inline] pub const fn new< T: alloy_contract::private::Transport + ::core::clone::Clone, @@ -2141,9 +1852,9 @@ See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, @@ -2152,16 +1863,15 @@ For more fine-grained control over the deployment process, use [`deploy_builder` >( provider: P, initialOwner: alloy::sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { ScKeystoreInstance::::deploy(provider, initialOwner) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -2175,15 +1885,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`ScKeystore`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ScKeystore`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ScKeystore`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ScKeystoreInstance { address: alloy_sol_types::private::Address, @@ -2194,24 +1904,24 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ScKeystoreInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ScKeystoreInstance").field(&self.address).finish() + f.debug_tuple("ScKeystoreInstance") + .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, - > ScKeystoreInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ScKeystoreInstance + { /**Creates a new wrapper around an on-chain [`ScKeystore`](self) contract instance. -See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ + See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self { Self { address, provider, @@ -2220,9 +1930,9 @@ See the [wrapper's documentation](`ScKeystoreInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( provider: P, @@ -2233,10 +1943,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` Ok(Self::new(contract_address, call_builder.provider)) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -2246,12 +1956,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { initialOwner }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { initialOwner }) + [..], ] - .concat() - .into(), + .concat() + .into(), ) } /// Returns a reference to the address. @@ -2289,10 +1998,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Function calls. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ScKeystoreInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ScKeystoreInstance + { /// 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 @@ -2345,10 +2055,11 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ /// Event filters. #[automatically_derived] impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ScKeystoreInstance { + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ScKeystoreInstance + { /// 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. @@ -2369,9 +2080,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ self.event_filter::() } ///Creates a new event filter for the [`UserRemoved`] event. - pub fn UserRemoved_filter( - &self, - ) -> alloy_contract::Event { + pub fn UserRemoved_filter(&self) -> alloy_contract::Event { self.event_filter::() } } diff --git a/ds/Cargo.toml b/ds/Cargo.toml index 5722f9d..242e789 100644 --- a/ds/Cargo.toml +++ b/ds/Cargo.toml @@ -10,7 +10,20 @@ edition = "2021" # waku-bindings = "=0.6.0" bus = "=2.4.1" fred = { version = "=9.0.3", features = ["subscriber-client"] } -tokio = "=1.38.0" +tokio = { version = "=1.38.0", features = ["full"] } +tokio-tungstenite = "0.15" +tungstenite = "0.14" +futures-util = "0.3" +tokio-stream = "0.1" +alloy = { git = "https://github.com/alloy-rs/alloy", features = [ + "providers", + "node-bindings", + "network", + "transports", + "k256", + "rlp", +] } +tokio-util = "=0.7.11" openmls = { version = "=0.5.0", features = ["test-utils"] } rand = { version = "^0.8" } @@ -23,3 +36,4 @@ serde_json = "=1.0" serde = "=1.0.204" sc_key_store = { path = "../sc_key_store" } +url = "2.5.2" diff --git a/ds/src/chat_client.rs b/ds/src/chat_client.rs new file mode 100644 index 0000000..8c31f02 --- /dev/null +++ b/ds/src/chat_client.rs @@ -0,0 +1,206 @@ +use alloy::primitives::Address; +use alloy::signers::Signature; +use futures_util::{SinkExt, StreamExt}; +use serde::{Deserialize, Serialize}; +use std::str::FromStr; +use std::sync::Arc; +use tokio::sync::{mpsc, Mutex}; +use tokio_tungstenite::tungstenite::protocol::Message; + +use crate::chat_server::ServerMessage; +use crate::DeliveryServiceError; + +#[derive(Serialize, Deserialize, Debug, PartialEq)] +pub enum ChatMessages { + Request(RequestMLSPayload), + Response(ResponseMLSPayload), + Welcome(String), +} + +#[derive(Serialize, Deserialize, Debug, PartialEq)] +pub enum ReqMessageType { + InviteToGroup, + RemoveFromGroup, +} + +#[derive(Serialize, Deserialize, Debug, PartialEq)] +pub struct RequestMLSPayload { + sc_address: String, + group_name: String, + pub msg_type: ReqMessageType, +} + +impl RequestMLSPayload { + pub fn new(sc_address: String, group_name: String, msg_type: ReqMessageType) -> Self { + RequestMLSPayload { + sc_address, + group_name, + msg_type, + } + } + + pub fn msg_to_sign(&self) -> String { + self.sc_address.to_owned() + &self.group_name + } + + pub fn group_name(&self) -> String { + self.group_name.clone() + } +} + +#[derive(Serialize, Deserialize, Debug, PartialEq)] +pub struct ResponseMLSPayload { + signature: String, + user_address: String, + pub group_name: String, + key_package: Vec, +} + +impl ResponseMLSPayload { + pub fn new( + signature: String, + user_address: String, + group_name: String, + key_package: Vec, + ) -> Self { + Self { + signature, + user_address, + group_name, + key_package, + } + } + + pub fn validate( + &self, + sc_address: String, + group_name: String, + ) -> Result<(String, Vec), DeliveryServiceError> { + let recover_sig: Signature = serde_json::from_str(&self.signature)?; + let addr = Address::from_str(&self.user_address)?; + // Recover the signer from the message. + let recovered = + recover_sig.recover_address_from_msg(sc_address.to_owned() + &group_name)?; + + if recovered.ne(&addr) { + return Err(DeliveryServiceError::ValidationError(recovered.to_string())); + } + Ok((self.user_address.clone(), self.key_package.clone())) + } +} + +pub struct ChatClient { + sender: mpsc::UnboundedSender, +} + +impl ChatClient { + pub async fn connect( + server_addr: &str, + username: String, + ) -> Result<(Self, mpsc::UnboundedReceiver), DeliveryServiceError> { + let (ws_stream, _) = tokio_tungstenite::connect_async(server_addr).await?; + let (mut write, read) = ws_stream.split(); + let (sender, receiver) = mpsc::unbounded_channel(); + let (msg_sender, msg_receiver) = mpsc::unbounded_channel(); + + let receiver = Arc::new(Mutex::new(receiver)); + + // Spawn a task to handle outgoing messages + tokio::spawn(async move { + while let Some(message) = receiver.lock().await.recv().await { + if let Err(err) = write.send(message).await { + return Err(DeliveryServiceError::SenderError(err.to_string())); + } + } + Ok(()) + }); + + // Spawn a task to handle incoming messages + tokio::spawn(async move { + let mut read = read; + while let Some(Ok(message)) = read.next().await { + if let Err(err) = msg_sender.send(message) { + return Err(DeliveryServiceError::SenderError(err.to_string())); + } + } + Ok(()) + }); + + // Send a SystemJoin message when registering + let join_msg = ServerMessage::SystemJoin { + username: username.to_string(), + }; + let join_json = serde_json::to_string(&join_msg).unwrap(); + sender + .send(Message::Text(join_json)) + .map_err(|err| DeliveryServiceError::SenderError(err.to_string()))?; + + Ok((ChatClient { sender }, msg_receiver)) + } + + pub fn send_message(&self, msg: ServerMessage) -> Result<(), DeliveryServiceError> { + let msg_json = serde_json::to_string(&msg).unwrap(); + self.sender + .send(Message::Text(msg_json)) + .map_err(|err| DeliveryServiceError::SenderError(err.to_string()))?; + Ok(()) + } +} + +#[test] +fn test_sign() { + use alloy::signers::SignerSync; + let signer = alloy::signers::local::PrivateKeySigner::from_str( + "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", + ) + .unwrap(); + + // Sign a message. + let message = "You are joining the group with smart contract: ".to_owned() + + "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"; + let signature = signer.sign_message_sync(message.as_bytes()).unwrap(); + + let json = serde_json::to_string(&signature).unwrap(); + let recover_sig: Signature = serde_json::from_str(&json).unwrap(); + + // Recover the signer from the message. + let recovered = recover_sig.recover_address_from_msg(message).unwrap(); + assert_eq!(recovered, signer.address()); +} + +#[test] +fn json_test() { + let inner_msg = ChatMessages::Request(RequestMLSPayload::new( + "sc_address".to_string(), + "group_name".to_string(), + ReqMessageType::InviteToGroup, + )); + + let res = serde_json::to_string(&inner_msg); + assert!(res.is_ok()); + let json_inner_msg = res.unwrap(); + + let server_msg = ServerMessage::InMessage { + from: "alice".to_string(), + to: vec!["bob".to_string()], + msg: json_inner_msg, + }; + + let res = serde_json::to_string(&server_msg); + assert!(res.is_ok()); + let json_server_msg = res.unwrap(); + + //// + + if let Ok(chat_message) = serde_json::from_str::(&json_server_msg) { + assert_eq!(chat_message, server_msg); + match chat_message { + ServerMessage::InMessage { from, to, msg } => { + if let Ok(chat_msg) = serde_json::from_str::(&msg) { + assert_eq!(chat_msg, inner_msg); + } + } + ServerMessage::SystemJoin { username } => {} + } + } +} diff --git a/ds/src/chat_server.rs b/ds/src/chat_server.rs new file mode 100644 index 0000000..9703bdd --- /dev/null +++ b/ds/src/chat_server.rs @@ -0,0 +1,114 @@ +use futures_util::{SinkExt, StreamExt}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use std::sync::Arc; +use tokio::{ + net::TcpListener, + sync::{mpsc, Mutex}, +}; +use tokio_tungstenite::{accept_async, tungstenite::protocol::Message}; + +use crate::DeliveryServiceError; + +type Tx = mpsc::UnboundedSender; +type PeerMap = Arc>>; + +#[derive(Serialize, Deserialize, Debug, PartialEq)] +#[serde(tag = "type")] +pub enum ServerMessage { + InMessage { + from: String, + to: Vec, + msg: String, + }, + SystemJoin { + username: String, + }, +} + +pub async fn start_server(addr: &str) -> Result<(), DeliveryServiceError> { + let listener = TcpListener::bind(addr).await?; + let peers = PeerMap::new(Mutex::new(HashMap::new())); + + while let Ok((stream, _)) = listener.accept().await { + let peers = peers.clone(); + + tokio::spawn(async move { + if let Err(e) = handle_connection(peers, stream).await { + eprintln!("Error in connection handling: {:?}", e); + } + }); + } + + Ok(()) +} + +async fn handle_connection( + peers: PeerMap, + stream: tokio::net::TcpStream, +) -> Result<(), DeliveryServiceError> { + let ws_stream = accept_async(stream).await?; + let (mut write, mut read) = ws_stream.split(); + let (sender, receiver) = mpsc::unbounded_channel(); + let receiver = Arc::new(Mutex::new(receiver)); + + let mut username = String::new(); + + // Spawn a task to handle outgoing messages + tokio::spawn(async move { + while let Some(message) = receiver.lock().await.recv().await { + if let Err(err) = write.send(message).await { + return Err(DeliveryServiceError::SenderError(err.to_string())); + } + } + Ok(()) + }); + + // Handle incoming messages + while let Some(Ok(Message::Text(text))) = read.next().await { + if let Ok(chat_message) = serde_json::from_str::(&text) { + match chat_message { + ServerMessage::SystemJoin { + username: join_username, + } => { + username = join_username.clone(); + peers + .lock() + .await + .insert(join_username.clone(), sender.clone()); + println!("{} joined the chat", join_username); + } + ServerMessage::InMessage { from, to, msg } => { + println!("Received message from {} to {:?}: {}", from, to, msg); + for recipient in to { + if let Some(recipient_sender) = peers.lock().await.get(&recipient) { + let message = ServerMessage::InMessage { + from: from.clone(), + to: vec![recipient.clone()], + msg: msg.clone(), + }; + let message_json = serde_json::to_string(&message).unwrap(); + recipient_sender + .send(Message::Text(message_json)) + .map_err(|err| { + DeliveryServiceError::SenderError(err.to_string()) + })?; + } + } + } + } + } + } + + // Remove the user from the map when they disconnect + if !username.is_empty() { + peers.lock().await.remove(&username); + println!("{} left the chat", username); + } + Ok(()) +} + +#[tokio::test] +async fn start_test() { + start_server("127.0.0.1:8080").await.unwrap() +} diff --git a/ds/src/ds.rs b/ds/src/ds.rs index 3ac4697..b7b9992 100644 --- a/ds/src/ds.rs +++ b/ds/src/ds.rs @@ -1,17 +1,15 @@ use fred::{ clients::{RedisClient, SubscriberClient}, - error::RedisError, prelude::*, types::Message, }; use serde::{Deserialize, Serialize}; -use tokio::sync::broadcast::{error::RecvError, Receiver}; +use tokio::sync::broadcast::Receiver; -use openmls::{framing::MlsMessageOut, prelude::TlsSerializeTrait}; +use crate::DeliveryServiceError; // use waku_bindings::*; pub struct RClient { - group_id: String, client: RedisClient, sub_client: SubscriberClient, // broadcaster: Receiver, @@ -24,7 +22,7 @@ pub struct SenderStruct { } impl RClient { - pub async fn new_for_group( + pub async fn new_with_group( group_id: String, ) -> Result<(Self, Receiver), DeliveryServiceError> { let redis_client = RedisClient::default(); @@ -35,49 +33,28 @@ impl RClient { subscriber.subscribe(group_id.clone()).await?; Ok(( RClient { - group_id, client: redis_client, sub_client: subscriber.clone(), - // broadcaster: subscriber.message_rx(), }, subscriber.message_rx(), )) } - pub async fn remove_from_group(&mut self) -> Result<(), DeliveryServiceError> { - self.sub_client.unsubscribe(self.group_id.clone()).await?; - self.sub_client.quit().await?; - self.client.quit().await?; + pub async fn remove_group(&mut self, group_id: String) -> Result<(), DeliveryServiceError> { + self.sub_client.unsubscribe(group_id).await?; Ok(()) } pub async fn msg_send( &mut self, - msg: MlsMessageOut, + msg: Vec, sender: String, + group_id: String, ) -> Result<(), DeliveryServiceError> { - let buf = msg.tls_serialize_detached()?; - - let json_value = SenderStruct { sender, msg: buf }; + let json_value = SenderStruct { sender, msg }; let bytes = serde_json::to_vec(&json_value)?; - self.client - .publish(self.group_id.clone(), bytes.as_slice()) - .await?; + self.client.publish(group_id, bytes.as_slice()).await?; Ok(()) } } - -#[derive(Debug, thiserror::Error)] -pub enum DeliveryServiceError { - #[error("Json error: {0}")] - JsonError(#[from] serde_json::Error), - #[error("Redis error: {0}")] - RedisError(#[from] RedisError), - #[error("Tokio error: {0}")] - TokioReceiveError(#[from] RecvError), - #[error("Serialization problem: {0}")] - TlsError(#[from] tls_codec::Error), - #[error("Unknown error: {0}")] - Other(anyhow::Error), -} diff --git a/ds/src/lib.rs b/ds/src/lib.rs index 420cec0..debb230 100644 --- a/ds/src/lib.rs +++ b/ds/src/lib.rs @@ -1 +1,34 @@ +use alloy::{hex::FromHexError, primitives::SignatureError}; +use fred::error::RedisError; + +pub mod chat_client; +pub mod chat_server; pub mod ds; + +#[derive(Debug, thiserror::Error)] +pub enum DeliveryServiceError { + #[error("Validation failed: {0}")] + ValidationError(String), + + #[error("Redis operation failed: {0}")] + RedisError(#[from] RedisError), + #[error("Failed to send message to channel: {0}")] + SenderError(String), + #[error("WebSocket handshake failed.")] + HandshakeError(#[from] tokio_tungstenite::tungstenite::Error), + + #[error("Serialization error: {0}")] + TlsError(#[from] tls_codec::Error), + #[error("JSON processing error: {0}")] + JsonError(#[from] serde_json::Error), + #[error("Failed to bind to the address.")] + BindError(#[from] std::io::Error), + + #[error("Failed to parse address: {0}")] + AlloyFromHexError(#[from] FromHexError), + #[error("Failed to recover signature: {0}")] + AlloySignatureError(#[from] SignatureError), + + #[error("An unknown error occurred: {0}")] + Other(anyhow::Error), +} diff --git a/sc_key_store/src/lib.rs b/sc_key_store/src/lib.rs index 2e4efb2..f5d2a7a 100644 --- a/sc_key_store/src/lib.rs +++ b/sc_key_store/src/lib.rs @@ -1,78 +1,36 @@ pub mod sc_ks; -use mls_crypto::openmls_provider::MlsCryptoProvider; -use openmls::prelude::*; -use std::collections::HashSet; - -/// The DS returns a list of key packages for a user as `UserKeyPackages`. -/// This is a tuple struct holding a vector of `(Vec, KeyPackage)` tuples, -/// where the first value is the key package hash (output of `KeyPackage::hash`) -/// and the second value is the corresponding key package. -#[derive(Debug, Default, Clone, PartialEq)] -pub struct UserKeyPackages(pub Vec<(Vec, KeyPackage)>); - -impl UserKeyPackages { - fn get_id_from_kp(&self) -> Vec { - let key_package: KeyPackage = self.0[0].1.clone(); - key_package.leaf_node().credential().identity().to_vec() - } -} - -/// Information about a user. -#[derive(Debug, Default, Clone)] -pub struct UserInfo { - pub id: Vec, - pub key_packages: UserKeyPackages, - pub key_packages_hash: HashSet>, - pub sign_pk: Vec, -} +use alloy::hex::FromHexError; pub trait SCKeyStoreService { fn does_user_exist( &self, - id: &[u8], + address: &str, ) -> impl std::future::Future>; fn add_user( &mut self, - ukp: UserKeyPackages, - sign_pk: &[u8], + address: &str, ) -> impl std::future::Future>; - fn get_user( + fn remove_user( &self, - id: &[u8], - crypto: &MlsCryptoProvider, - ) -> impl std::future::Future>; - fn add_user_kp( - &mut self, - id: &[u8], - ukp: UserKeyPackages, + address: &str, ) -> impl std::future::Future>; - // we need get key package of other user for inviting them to group - fn get_avaliable_user_kp( - &mut self, - id: &[u8], - crypto: &MlsCryptoProvider, - ) -> impl std::future::Future>; } #[derive(Debug, thiserror::Error)] pub enum KeyStoreError { - #[error("User doesn't exist")] - UnknownUserError, - #[error("Invalid data for User: {0}")] - InvalidUserDataError(String), - #[error("Unauthorized User")] - UnauthorizedUserError, - #[error("User already exist")] - AlreadyExistedUserError, - #[error("Alloy contract error: {0}")] - AlloyError(#[from] alloy::contract::Error), - #[error("Serialization problem: {0}")] - TlsError(#[from] tls_codec::Error), - #[error("Key package doesn't valid: {0}")] - MlsKeyPackageVerifyError(#[from] openmls::prelude::KeyPackageVerifyError), - #[error(transparent)] - MlsLibraryError(#[from] LibraryError), - #[error("Unknown error: {0}")] - Other(anyhow::Error), + #[error("User already exists.")] + UserAlreadyExistsError, + + #[error("User not found.")] + UserNotFoundError, + + #[error("Alloy contract operation failed: {0}")] + AlloyContractError(#[from] alloy::contract::Error), + + #[error("Failed to parse address: {0}")] + AddressParseError(#[from] FromHexError), + + #[error("An unexpected error occurred: {0}")] + UnexpectedError(anyhow::Error), } diff --git a/sc_key_store/src/sc_ks.rs b/sc_key_store/src/sc_ks.rs index c4ed942..434218d 100644 --- a/sc_key_store/src/sc_ks.rs +++ b/sc_key_store/src/sc_ks.rs @@ -1,26 +1,12 @@ -use alloy::{ - network::{EthereumWallet, Network}, - primitives::{Address, Bytes}, - providers::Provider, - signers::local::PrivateKeySigner, - transports::Transport, -}; -use foundry_contracts::sckeystore::ScKeystore::{self, KeyPackage, ScKeystoreInstance}; -use mls_crypto::openmls_provider::MlsCryptoProvider; -use openmls::test_utils::OpenMlsCryptoProvider; -use openmls::{ - key_packages::KeyPackageIn, - prelude::{KeyPackage as mlsKeyPackage, TlsDeserializeTrait, TlsSerializeTrait}, - versions::ProtocolVersion, -}; -use std::{collections::HashSet, str::FromStr}; +use alloy::{network::Network, primitives::Address, providers::Provider, transports::Transport}; +use foundry_contracts::sckeystore::ScKeystore::{self, ScKeystoreInstance}; +use std::str::FromStr; -use crate::UserInfo; -use crate::UserKeyPackages; use crate::{KeyStoreError, SCKeyStoreService}; pub struct ScKeyStorage { instance: ScKeystoreInstance, + address: String, } impl ScKeyStorage @@ -32,263 +18,50 @@ where pub fn new(provider: P, address: Address) -> Self { Self { instance: ScKeystore::new(address, provider), + address: address.to_string(), } } -} -impl From for Vec { - fn from(ukp: UserKeyPackages) -> Self { - let mut res: Vec = Vec::with_capacity(ukp.0.len()); - for kp in ukp.0 { - let bytes = kp.1.tls_serialize_detached().unwrap(); - let kp_bytes = Bytes::copy_from_slice(bytes.as_slice()); - let kp_sc: KeyPackage = KeyPackage::from((vec![kp_bytes],)); - res.push(kp_sc) - } - res + pub fn sc_adsress(&self) -> String { + self.address.clone() } } impl, N: Network> SCKeyStoreService - for &mut ScKeyStorage + for ScKeyStorage { - async fn does_user_exist(&self, id: &[u8]) -> Result { - let address = Address::from_slice(id); - let res = self.instance.userExists(address).call().await?; - Ok(res._0) - } - - async fn add_user( - &mut self, - ukp: UserKeyPackages, - sign_pk: &[u8], - ) -> Result<(), KeyStoreError> { - if ukp.0.is_empty() { - return Err(KeyStoreError::InvalidUserDataError( - "no key packages".to_string(), - )); - } - let user_id = ukp.get_id_from_kp(); - if self.does_user_exist(user_id.as_slice()).await? { - return Err(KeyStoreError::AlreadyExistedUserError); - } - - let ukp_sc: Vec = ukp.into(); - for (i, kp_sc) in ukp_sc.iter().enumerate() { - if i == 0 { - let add_user_binding = self.instance.addUser( - Address::from_slice(user_id.as_slice()), - Bytes::copy_from_slice(sign_pk), - kp_sc.to_owned(), - ); - let res = add_user_binding.send().await; - match res { - Ok(_) => continue, - Err(err) => return Err(KeyStoreError::AlloyError(err)), - } - } - let add_kp_binding = self.instance.addKeyPackage(kp_sc.to_owned()); - let res = add_kp_binding.send().await; - match res { - Ok(_) => continue, - Err(err) => return Err(KeyStoreError::AlloyError(err)), - } - } - Ok(()) - } - - async fn get_user( - &self, - id: &[u8], - crypto: &MlsCryptoProvider, - ) -> Result { - let address = Address::from_slice(id); - let res = self.instance.getUser(address).call().await; - - let user = match res { - Ok(user) => user, - Err(err) => return Err(KeyStoreError::AlloyError(err)), - }; - - let mut user = UserInfo { - id: id.to_vec(), - key_packages: UserKeyPackages::default(), - key_packages_hash: HashSet::default(), - sign_pk: user._0.signaturePubKey.to_vec(), - }; - - let res = self.instance.getAllKeyPackagesForUser(address).call().await; - - let kps = match res { - Ok(kp) => kp, - Err(err) => return Err(KeyStoreError::AlloyError(err)), - }; - - for kp in kps._0 { - let key_package_in = KeyPackageIn::tls_deserialize_bytes(&kp.data[0])?; - let key_package = key_package_in.validate(crypto.crypto(), ProtocolVersion::Mls10)?; - let kp = key_package.hash_ref(crypto.crypto())?.as_slice().to_vec(); - user.key_packages.0.push((kp, key_package)); + async fn does_user_exist(&self, address: &str) -> Result { + let address = Address::from_str(address)?; + let res = self.instance.userExists(address).call().await; + match res { + Ok(is_exist) => Ok(is_exist._0), + Err(err) => Err(KeyStoreError::AlloyContractError(err)), } - - Ok(user) } - async fn add_user_kp(&mut self, id: &[u8], ukp: UserKeyPackages) -> Result<(), KeyStoreError> { - if !self.does_user_exist(id).await? { - return Err(KeyStoreError::UnknownUserError); - } - - let mut kp_bytes: Vec = Vec::with_capacity(ukp.0.len()); - for kp in ukp.0 { - let bytes = kp.1.tls_serialize_detached()?; - kp_bytes.push(Bytes::copy_from_slice(bytes.as_slice())) + async fn add_user(&mut self, address: &str) -> Result<(), KeyStoreError> { + if self.does_user_exist(address).await? { + return Err(KeyStoreError::UserAlreadyExistsError); } - let kp: KeyPackage = KeyPackage::from((kp_bytes,)); - - let add_kp_binding = self.instance.addKeyPackage(kp); - let res = add_kp_binding.send().await; - + let add_to_acl_binding = self.instance.addUser(Address::from_str(address)?); + let res = add_to_acl_binding.send().await; match res { Ok(_) => Ok(()), - Err(err) => Err(KeyStoreError::AlloyError(err)), + Err(err) => Err(KeyStoreError::AlloyContractError(err)), } } - async fn get_avaliable_user_kp( - &mut self, - id: &[u8], - crypto: &MlsCryptoProvider, - ) -> Result { - if !self.does_user_exist(id).await? { - return Err(KeyStoreError::UnknownUserError); + async fn remove_user(&self, address: &str) -> Result<(), KeyStoreError> { + if !self.does_user_exist(address).await? { + return Err(KeyStoreError::UserNotFoundError); } - let address = Address::from_slice(id); - let add_kp_binding = self.instance.getAvailableKeyPackage(address); - let res = add_kp_binding.call().await?; - let key_package_in = KeyPackageIn::tls_deserialize_bytes(&res._0.data[0])?; - let key_package = key_package_in.validate(crypto.crypto(), ProtocolVersion::Mls10)?; - - Ok(key_package) - } -} -pub fn alice_addr_test() -> (Address, EthereumWallet) { - let alice_address = Address::from_str("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266").unwrap(); // anvil default key 0 - let signer = PrivateKeySigner::from_str( - "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", - ) - .unwrap(); - let wallet = EthereumWallet::from(signer); - (alice_address, wallet) -} - -pub fn bob_addr_test() -> (Address, EthereumWallet) { - let bob_address = Address::from_str("0x70997970C51812dc3A010C7d01b50e0d17dc79C8").unwrap(); // anvil default key 0 - let signer = PrivateKeySigner::from_str( - "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", - ) - .unwrap(); - let wallet = EthereumWallet::from(signer); - (bob_address, wallet) -} - -pub fn carla_addr_test() -> (Address, EthereumWallet) { - let carla_address = Address::from_str("0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC").unwrap(); // anvil default key 0 - let signer = PrivateKeySigner::from_str( - "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", - ) - .unwrap(); - let wallet = EthereumWallet::from(signer); - (carla_address, wallet) -} - -mod test { - use alloy::{primitives::Address, providers::ProviderBuilder}; - use std::{borrow::BorrowMut, collections::HashMap}; - - use openmls::prelude::*; - use openmls_basic_credential::SignatureKeyPair; - - use mls_crypto::openmls_provider::{MlsCryptoProvider, CIPHERSUITE}; - - use crate::{sc_ks::*, UserKeyPackages}; - - pub(crate) fn test_identity( - address: Address, - crypto: &MlsCryptoProvider, - ) -> (UserKeyPackages, SignatureKeyPair) { - let ciphersuite = CIPHERSUITE; - let signature_keys = SignatureKeyPair::new(ciphersuite.signature_algorithm()).unwrap(); - let credential = Credential::new(address.to_vec(), CredentialType::Basic).unwrap(); - - let credential_with_key = CredentialWithKey { - credential, - signature_key: signature_keys.to_public_vec().into(), - }; - signature_keys.store(crypto.key_store()).unwrap(); - - let mut kps = HashMap::new(); - for _ in 0..3 { - let key_package = mlsKeyPackage::builder() - .build( - CryptoConfig { - ciphersuite, - version: ProtocolVersion::default(), - }, - crypto, - &signature_keys, - credential_with_key.clone(), - ) - .unwrap(); - let kp = key_package.hash_ref(crypto.crypto()).unwrap(); - kps.insert(kp.as_slice().to_vec(), key_package); + let remove_user_binding = self.instance.removeUser(Address::from_str(address)?); + let res = remove_user_binding.send().await; + match res { + Ok(_) => Ok(()), + Err(err) => Err(KeyStoreError::AlloyContractError(err)), } - let ukp = UserKeyPackages(kps.drain().collect::, mlsKeyPackage)>>()); - - (ukp, signature_keys) - } - - #[tokio::test] - async fn test_sc_storage() { - let crypto = MlsCryptoProvider::default(); - let storage_address = - Address::from_str("0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512").unwrap(); - let (alice_address, wallet) = alice_addr_test(); - let provider = ProviderBuilder::new() - .with_recommended_fillers() - .wallet(wallet) - .on_http(url::Url::from_str("http://localhost:8545").unwrap()); - - let alice = test_identity(alice_address, &crypto); - let mut binding = ScKeyStorage::new(provider, storage_address); - let mut storage = binding.borrow_mut(); - - let res = storage.add_user(alice.0, alice.1.public()).await; - println!("Add user res: {:#?}", res); - assert!(res.is_ok()); - - let res = storage.get_user(alice_address.as_slice(), &crypto).await; - println!("Get user res: {:#?}", res); - assert!(res.is_ok()); - - let res = storage.does_user_exist(alice_address.as_slice()).await; - println!("User exist res: {:#?}", res); - - let res = storage - .get_avaliable_user_kp(alice_address.as_slice(), &crypto) - .await; - // println!("Get user kp: {:#?}", res); - assert!(res.is_ok()); - - let res2 = storage - .get_avaliable_user_kp(alice_address.as_slice(), &crypto) - .await; - // println!("Get user kp: {:#?}", res); - assert!(res.is_ok()); - - // HERE SHOULD BE NOT EQUAL - assert_ne!(res.unwrap(), res2.unwrap()); } } diff --git a/src/cli.rs b/src/cli.rs index 78d7e6d..65a3f54 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,17 +1,9 @@ -use alloy::{ - hex::FromHexError, - network::EthereumWallet, - primitives::Address, - signers::local::{LocalSignerError, PrivateKeySigner}, -}; use clap::{arg, command, Parser, Subcommand}; use crossterm::{ event::{self, Event, KeyCode}, execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, }; - -use fred::error::RedisError; use ratatui::{ backend::CrosstermBackend, layout::{Constraint, Direction, Layout}, @@ -21,39 +13,32 @@ use ratatui::{ Frame, Terminal, }; use std::{ - io, - io::{Read, Write}, - str::FromStr, - string::FromUtf8Error, + io::{stdout, Read, Write}, sync::Arc, }; use tokio::{ - sync::mpsc::error::SendError, sync::mpsc::{Receiver, Sender}, sync::Mutex, - task::JoinError, }; use tokio_util::sync::CancellationToken; use url::Url; -use crate::user::UserError; -use ds::ds::DeliveryServiceError; +use crate::CliError; #[derive(Parser, Debug)] #[command(version, about, long_about = None)] pub struct Args { /// User private key that correspond to Ethereum wallet #[arg(short = 'K', long)] - user_priv_key: String, - - /// Rpc url - #[arg(short = 'U', long, - default_value_t = Url::from_str("http://localhost:8545").unwrap())] - pub storage_url: Url, - - /// Storage contract address - #[arg(short = 'S', long)] - pub storage_addr: String, + pub user_priv_key: String, + // /// Rpc url + // #[arg(short = 'U', long, + // default_value_t = Url::from_str("http://localhost:8545").unwrap())] + // pub storage_url: Url, + + // /// Storage contract address + // #[arg(short = 'S', long)] + // pub storage_addr: String, } pub enum Msg { @@ -70,14 +55,6 @@ pub enum Message { Error(String), } -pub fn get_user_data(args: &Args) -> Result<(Address, EthereumWallet, Address), CliError> { - let signer = PrivateKeySigner::from_str(&args.user_priv_key)?; - let user_address = signer.address(); - let wallet = EthereumWallet::from(signer); - let storage_address = Address::from_str(&args.storage_addr)?; - Ok((user_address, wallet, storage_address)) -} - #[derive(Debug, Parser)] #[command(multicall = true)] pub struct Cli { @@ -89,13 +66,12 @@ pub struct Cli { pub enum Commands { CreateGroup { group_name: String, + storage_address: String, + storage_url: Url, }, Invite { group_name: String, - user_wallet: String, - }, - JoinGroup { - group_name: String, + users_wallet_addrs: Vec, }, SendMessage { group_name: String, @@ -135,19 +111,29 @@ pub async fn event_handler( if cli.is_err() { messages_tx .send(Msg::Input(Message::System("Unknown command".to_string()))) - .await?; + .await + .map_err(|err| CliError::SenderError(err.to_string()))?; continue; } - cli_tx.send(cli.unwrap().command).await?; + cli_tx + .send(cli.unwrap().command) + .await + .map_err(|err| CliError::SenderError(err.to_string()))?; } KeyCode::Esc => { - messages_tx.send(Msg::Exit).await?; + messages_tx + .send(Msg::Exit) + .await + .map_err(|err| CliError::SenderError(err.to_string()))?; token.cancel(); break; } _ => {} } - messages_tx.send(Msg::Refresh(input.clone())).await?; + messages_tx + .send(Msg::Refresh(input.clone())) + .await + .map_err(|err| CliError::SenderError(err.to_string()))?; } } Ok::<_, CliError>(()) @@ -204,7 +190,7 @@ pub async fn terminal_handler( token: CancellationToken, ) -> Result<(), CliError> { enable_raw_mode()?; - let mut stdout = io::stdout(); + let mut stdout = stdout(); execute!(stdout, EnterAlternateScreen)?; let backend = CrosstermBackend::new(stdout); let terminal = Arc::new(Mutex::new(Terminal::new(backend)?)); @@ -254,44 +240,3 @@ pub async fn terminal_handler( terminal_lock.show_cursor()?; Ok(()) } - -#[derive(Debug, thiserror::Error)] -pub enum CliError { - #[error("Can't split the line")] - SplitLineError, - #[error("Unknown message type")] - UnknownMsgError, - - #[error(transparent)] - UserError(#[from] UserError), - #[error(transparent)] - DeliveryServiceError(#[from] DeliveryServiceError), - - #[error("Unable to parce the address: {0}")] - AlloyFromHexError(#[from] FromHexError), - #[error("Unable to parce the signer: {0}")] - AlloyParceSignerError(#[from] LocalSignerError), - #[error("Problem from std::io library: {0}")] - IoError(#[from] std::io::Error), - #[error("Parse String UTF8 error: {0}")] - ParseUTF8Error(#[from] FromUtf8Error), - #[error("Parse String error: {0}")] - StringError(#[from] core::convert::Infallible), - - #[error("Can't send control message into channel: {0}")] - SendMsgError(#[from] SendError), - #[error("Can't send bytes into channel: {0}")] - SendVecError(#[from] SendError>), - #[error("Can't send command into channel: {0}")] - SendCommandError(#[from] SendError), - - #[error(transparent)] - ClapError(#[from] clap::error::Error), - #[error("Redis error: {0}")] - RedisError(#[from] RedisError), - #[error("Failed from tokio join: {0}")] - TokioJoinError(#[from] JoinError), - - #[error("Unknown error: {0}")] - AnyHowError(anyhow::Error), -} diff --git a/src/contact.rs b/src/contact.rs new file mode 100644 index 0000000..825fb8f --- /dev/null +++ b/src/contact.rs @@ -0,0 +1,213 @@ +use alloy::hex::ToHexExt; +use ds::{ + chat_client::{ + ChatClient, ChatMessages, ReqMessageType, RequestMLSPayload, ResponseMLSPayload, + }, + chat_server::ServerMessage, +}; +// use waku_bindings::*; + +use openmls::prelude::MlsMessageOut; +use std::{collections::HashMap, sync::Arc}; +use tls_codec::Serialize; +use tokio::sync::Mutex; +use tokio_util::sync::CancellationToken; + +use crate::ContactError; + +pub const CHAT_SERVER_ADDR: &str = "ws://127.0.0.1:8080"; + +pub struct ContactsList { + contacts: Arc>>, + group_id2sc: HashMap, + pub future_req: HashMap, + pub chat_client: ChatClient, +} + +pub struct Contact { + // map group_name to key_package bytes + group_id2user_kp: HashMap>, + // user_p2p_addr: WakuPeers, +} + +impl Contact { + pub fn get_relevant_kp(&mut self, group_name: String) -> Result, ContactError> { + match self.group_id2user_kp.remove(&group_name) { + Some(kp) => Ok(kp.clone()), + None => Err(ContactError::MissingKeyPackageForGroup), + } + } + + pub fn add_key_package( + &mut self, + key_package: Vec, + group_name: String, + ) -> Result<(), ContactError> { + match self.group_id2user_kp.insert(group_name, key_package) { + Some(_) => Err(ContactError::DuplicateUserError), + None => Ok(()), + } + } +} + +impl ContactsList { + pub async fn new(chat_client: ChatClient) -> Result { + Ok(ContactsList { + contacts: Arc::new(Mutex::new(HashMap::new())), + group_id2sc: HashMap::new(), + future_req: HashMap::new(), + chat_client, + }) + } + + pub fn send_welcome_msg_to_users( + &mut self, + self_address: String, + users_address: Vec, + welcome: MlsMessageOut, + ) -> Result<(), ContactError> { + let bytes = welcome.tls_serialize_detached()?; + let welcome_str: String = bytes.encode_hex(); + + let msg = ChatMessages::Welcome(welcome_str); + self.chat_client.send_message(ServerMessage::InMessage { + from: self_address, + to: users_address, + msg: serde_json::to_string(&msg)?, + })?; + + Ok(()) + } + + pub fn send_msg_req( + &mut self, + self_address: String, + user_address: String, + group_name: String, + msg_type: ReqMessageType, + ) -> Result<(), ContactError> { + self.future_req + .insert(user_address.clone(), CancellationToken::new()); + + let sc_address = match self.group_id2sc.get(&group_name).cloned() { + Some(sc) => sc, + None => return Err(ContactError::MissingSmartContractForGroup), + }; + + let req = ChatMessages::Request(RequestMLSPayload::new(sc_address, group_name, msg_type)); + self.chat_client.send_message(ServerMessage::InMessage { + from: self_address, + to: vec![user_address], + msg: serde_json::to_string(&req)?, + })?; + + Ok(()) + } + + pub fn send_resp_msg_to_user( + &mut self, + self_address: String, + user_address: &str, + resp: ResponseMLSPayload, + ) -> Result<(), ContactError> { + let resp_j = ChatMessages::Response(resp); + self.chat_client.send_message(ServerMessage::InMessage { + from: self_address, + to: vec![user_address.to_string()], + msg: serde_json::to_string(&resp_j)?, + })?; + Ok(()) + } + + pub async fn add_new_contact(&mut self, user_address: &str) -> Result<(), ContactError> { + let mut contacts = self.contacts.lock().await; + if contacts.contains_key(user_address) { + return Err(ContactError::DuplicateUserError); + } + + match contacts.insert( + user_address.to_string(), + Contact { + group_id2user_kp: HashMap::new(), + }, + ) { + Some(_) => Err(ContactError::DuplicateUserError), + None => Ok(()), + } + } + + pub async fn add_key_package_to_contact( + &mut self, + user_wallet: &str, + key_package: Vec, + group_name: String, + ) -> Result<(), ContactError> { + let mut contacts = self.contacts.lock().await; + match contacts.get_mut(user_wallet) { + Some(user) => user.add_key_package(key_package, group_name)?, + None => return Err(ContactError::UserNotFoundError), + } + Ok(()) + } + + pub async fn does_user_in_contacts(&self, user_wallet: &str) -> bool { + let contacts = self.contacts.lock().await; + contacts.get(user_wallet).is_some() + } + + pub async fn prepare_joiners( + &mut self, + user_wallets: Vec, + group_name: String, + ) -> Result>, ContactError> { + let mut joiners_kp = HashMap::with_capacity(user_wallets.len()); + + for user_wallet in user_wallets { + if joiners_kp.contains_key(&user_wallet) { + return Err(ContactError::DuplicateUserError); + } + + let mut contacts = self.contacts.lock().await; + match contacts.get_mut(&user_wallet) { + Some(contact) => match contact.get_relevant_kp(group_name.clone()) { + Ok(kp) => match joiners_kp.insert(user_wallet, kp) { + Some(_) => return Err(ContactError::DuplicateUserError), + None => continue, + }, + Err(err) => return Err(err), + }, + None => return Err(ContactError::UserNotFoundError), + } + } + + Ok(joiners_kp) + } + + pub fn handle_response(&mut self, user_address: &str) -> Result<(), ContactError> { + match self.future_req.get(user_address) { + Some(token) => { + token.cancel(); + Ok(()) + } + None => Err(ContactError::UserNotFoundError), + } + } + + pub fn insert_group2sc( + &mut self, + group_name: String, + sc_address: String, + ) -> Result<(), ContactError> { + match self.group_id2sc.insert(group_name, sc_address) { + Some(_) => Err(ContactError::GroupAlreadyExistsError), + None => Ok(()), + } + } + + pub fn group2sc(&self, group_name: String) -> Result { + match self.group_id2sc.get(&group_name).cloned() { + Some(addr) => Ok(addr), + None => Err(ContactError::GroupNotFoundError(group_name)), + } + } +} diff --git a/src/identity.rs b/src/identity.rs index 79b0bbf..c5bff39 100644 --- a/src/identity.rs +++ b/src/identity.rs @@ -1,13 +1,14 @@ -use hex; +use alloy::primitives::Address; use std::collections::HashMap; use openmls::{credentials::CredentialWithKey, key_packages::*, prelude::*}; use openmls_basic_credential::SignatureKeyPair; -use openmls_rust_crypto::MemoryKeyStoreError; use openmls_traits::types::Ciphersuite; use mls_crypto::openmls_provider::MlsCryptoProvider; +use crate::IdentityError; + pub struct Identity { pub(crate) kp: HashMap, KeyPackage>, pub(crate) credential_with_key: CredentialWithKey, @@ -19,7 +20,6 @@ impl Identity { ciphersuite: Ciphersuite, crypto: &MlsCryptoProvider, user_wallet_address: &[u8], - number_of_kp: usize, ) -> Result { let credential = Credential::new(user_wallet_address.to_vec(), CredentialType::Basic)?; let signature_keys = SignatureKeyPair::new(ciphersuite.signature_algorithm())?; @@ -30,19 +30,17 @@ impl Identity { signature_keys.store(crypto.key_store())?; let mut kps = HashMap::new(); - for _ in 0..number_of_kp { - let key_package = KeyPackage::builder().build( - CryptoConfig { - ciphersuite, - version: ProtocolVersion::default(), - }, - crypto, - &signature_keys, - credential_with_key.clone(), - )?; - let kp = key_package.hash_ref(crypto.crypto())?; - kps.insert(kp.as_slice().to_vec(), key_package); - } + let key_package = KeyPackage::builder().build( + CryptoConfig { + ciphersuite, + version: ProtocolVersion::default(), + }, + crypto, + &signature_keys, + credential_with_key.clone(), + )?; + let kp = key_package.hash_ref(crypto.crypto())?; + kps.insert(kp.as_slice().to_vec(), key_package); Ok(Identity { kp: kps, @@ -52,7 +50,7 @@ impl Identity { } /// Create an additional key package using the credential_with_key/signer bound to this identity - pub fn add_key_package( + pub fn generate_key_package( &mut self, ciphersuite: Ciphersuite, crypto: &MlsCryptoProvider, @@ -81,22 +79,6 @@ impl Identity { impl ToString for Identity { fn to_string(&self) -> String { - hex::encode(self.credential_with_key.credential.identity()) + Address::from_slice(self.credential_with_key.credential.identity()).to_string() } } - -#[derive(Debug, thiserror::Error)] -pub enum IdentityError { - #[error("Something wrong while creating new key package: {0}")] - MlsKeyPackageNewError(#[from] KeyPackageNewError), - #[error(transparent)] - MlsLibraryError(#[from] LibraryError), - #[error("Something wrong with signature: {0}")] - MlsCryptoError(#[from] CryptoError), - #[error("Can't save signature key")] - MlsKeyStoreError(#[from] MemoryKeyStoreError), - #[error("Something wrong with credential: {0}")] - MlsCredentialError(#[from] CredentialError), - #[error("Unknown error: {0}")] - Other(anyhow::Error), -} diff --git a/src/lib.rs b/src/lib.rs index 2b34860..bfd0a58 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,47 +1,153 @@ +use alloy::{hex::FromHexError, primitives::SignatureError, signers::local::LocalSignerError}; +use ds::DeliveryServiceError; +use fred::error::RedisError; +use openmls::{error::LibraryError, prelude::*}; +use openmls_rust_crypto::MemoryKeyStoreError; +use sc_key_store::KeyStoreError; +use std::{str::Utf8Error, string::FromUtf8Error}; +use tokio::task::JoinError; + pub mod cli; +pub mod contact; pub mod conversation; pub mod identity; pub mod user; -use std::{fs::File, io}; +#[derive(Debug, thiserror::Error)] +pub enum CliError { + #[error("Can't split the line")] + SplitLineError, + #[error("Failed to cancel token")] + TokenCancellingError, + + #[error("Problem from std::io library: {0}")] + IoError(#[from] std::io::Error), -const SC_ADDRESS: &str = "contracts/broadcast/Deploy.s.sol/31337/run-latest.json"; + #[error("Failed to send message to channel: {0}")] + SenderError(String), -pub fn get_contract_address() -> Result { - let file = File::open(SC_ADDRESS)?; - let json: serde_json::Value = serde_json::from_reader(file)?; + #[error("Redis error: {0}")] + RedisError(#[from] RedisError), + #[error("Failed from tokio join: {0}")] + TokioJoinError(#[from] JoinError), - let returns = match json.get("returns") { - Some(v) => v, - None => return Err(HelperError::UnknownJsonFieldError), - }; + #[error("Unknown error: {0}")] + AnyHowError(anyhow::Error), +} - let sc_keystore = match returns.get("scKeystore") { - Some(v) => v, - None => return Err(HelperError::UnknownJsonFieldError), - }; +#[derive(Debug, thiserror::Error)] +pub enum ContactError { + #[error("Key package for the specified group does not exist.")] + MissingKeyPackageForGroup, + #[error("SmartContract address for the specified group does not exist.")] + MissingSmartContractForGroup, + #[error("User not found.")] + UserNotFoundError, + #[error("Group not found: {0}")] + GroupNotFoundError(String), + #[error("Duplicate user found in joiners list.")] + DuplicateUserError, + #[error("Group already exists")] + GroupAlreadyExistsError, + #[error("Invalid user address in signature.")] + InvalidUserSignatureError, - let address = match sc_keystore.get("value") { - Some(v) => v, - None => return Err(HelperError::UnknownJsonFieldError), - }; + #[error(transparent)] + DeliveryServiceError(#[from] DeliveryServiceError), - match address.as_str() { - Some(res) => Ok(res.to_string()), - None => Err(HelperError::ParserError), - } + #[error("Failed to parse signature: {0}")] + AlloySignatureParsingError(#[from] SignatureError), + #[error("JSON processing error: {0}")] + JsonProcessingError(#[from] serde_json::Error), + #[error("Serialization error: {0}")] + SerializationError(#[from] tls_codec::Error), } #[derive(Debug, thiserror::Error)] -pub enum HelperError { - #[error("Field doesn't exist")] - UnknownJsonFieldError, - #[error("Parser Error")] - ParserError, - #[error("Can't read file: {0}")] - IoError(#[from] io::Error), - #[error("Json Error: {0}")] - JsonError(#[from] serde_json::Error), - #[error("Unknown error: {0}")] +pub enum IdentityError { + #[error("Failed to create new key package: {0}")] + MlsKeyPackageCreationError(#[from] KeyPackageNewError), + #[error(transparent)] + MlsLibraryError(#[from] LibraryError), + #[error("Failed to create signature: {0}")] + MlsCryptoError(#[from] CryptoError), + #[error("Failed to save signature key: {0}")] + MlsKeyStoreError(#[from] MemoryKeyStoreError), + #[error("Failed to create credential: {0}")] + MlsCredentialError(#[from] CredentialError), + #[error("An unknown error occurred: {0}")] Other(anyhow::Error), } + +#[derive(Debug, thiserror::Error)] +pub enum UserError { + #[error("User lacks connection to the smart contract.")] + MissingSmartContractConnection, + #[error("Group not found: {0}")] + GroupNotFoundError(String), + #[error("Group already exists: {0}")] + GroupAlreadyExistsError(String), + #[error("Unsupported message type.")] + UnsupportedMessageType, + #[error("User already exists: {0}")] + UserAlreadyExistsError(String), + #[error("Welcome message cannot be empty.")] + EmptyWelcomeMessageError, + #[error("Message from user is invalid")] + InvalidChatMessageError, + #[error("Message from server is invalid")] + InvalidServerMessageError, + #[error("User not found.")] + UserNotFoundError, + + #[error(transparent)] + DeliveryServiceError(#[from] DeliveryServiceError), + #[error(transparent)] + KeyStoreError(#[from] KeyStoreError), + #[error(transparent)] + IdentityError(#[from] IdentityError), + #[error(transparent)] + ContactError(#[from] ContactError), + + #[error("Error while creating MLS group: {0}")] + MlsGroupCreationError(#[from] NewGroupError), + #[error("Error while adding member to MLS group: {0}")] + MlsAddMemberError(#[from] AddMembersError), + #[error("Error while merging pending commit in MLS group: {0}")] + MlsMergePendingCommitError(#[from] MergePendingCommitError), + #[error("Error while merging commit in MLS group: {0}")] + MlsMergeCommitError(#[from] MergeCommitError), + #[error("Error processing unverified message: {0}")] + MlsProcessMessageError(#[from] ProcessMessageError), + #[error("Error while creating message: {0}")] + MlsCreateMessageError(#[from] CreateMessageError), + #[error("Failed to create staged join: {0}")] + MlsWelcomeError(#[from] WelcomeError), + #[error("Failed to remove member from MLS group: {0}")] + MlsRemoveMemberError(#[from] RemoveMembersError), + #[error("Failed to validate user key package: {0}")] + MlsKeyPackageVerificationError(#[from] KeyPackageVerifyError), + + #[error("UTF-8 parsing error: {0}")] + Utf8ParsingError(#[from] FromUtf8Error), + #[error("UTF-8 string parsing error: {0}")] + Utf8StringParsingError(#[from] Utf8Error), + + #[error("JSON processing error: {0}")] + JsonError(#[from] serde_json::Error), + #[error("Serialization error: {0}")] + SerializationError(#[from] tls_codec::Error), + + #[error("Failed to parse address: {0}")] + AddressParsingError(#[from] FromHexError), + #[error("Failed to parse signer: {0}")] + SignerParsingError(#[from] LocalSignerError), + + #[error("Signing error: {0}")] + SigningError(#[from] alloy::signers::Error), + #[error("I/O error: {0}")] + IoError(#[from] std::io::Error), + + #[error("An unknown error occurred: {0}")] + UnknownError(anyhow::Error), +} diff --git a/src/main.rs b/src/main.rs index c6e377e..d0d2d04 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,14 @@ -use alloy::providers::ProviderBuilder; +use alloy::{providers::ProviderBuilder, signers::local::PrivateKeySigner}; use clap::Parser; -use openmls::framing::MlsMessageIn; -use std::{error::Error, fs::File, io::Read}; -use tls_codec::Deserialize; -use tokio::sync::mpsc; +use std::{error::Error, str::FromStr, sync::Arc}; +use tokio::sync::{mpsc, Mutex}; +use tokio_tungstenite::tungstenite::protocol::Message as TokioMessage; use tokio_util::sync::CancellationToken; -use de_mls::{ - cli::*, - user::{User, UserError}, +use de_mls::{cli::*, user::User, CliError, UserError}; +use ds::{ + chat_client::{ChatClient, ChatMessages}, + chat_server::ServerMessage, }; #[tokio::main] @@ -18,26 +18,19 @@ async fn main() -> Result<(), Box> { let (cli_tx, mut cli_gr_rx) = mpsc::channel::(100); let args = Args::parse(); - let (user_address, wallet, storage_address) = get_user_data(&args)?; - - let client_provider = ProviderBuilder::new() - .with_recommended_fillers() - .wallet(wallet) - .on_http(args.storage_url); - + let signer = PrivateKeySigner::from_str(&args.user_priv_key)?; + let user_address = signer.address().to_string(); + let (client, mut client_recv) = + ChatClient::connect("ws://127.0.0.1:8080", user_address.clone()).await?; //// Create user - let mut user = User::new( - user_address.as_slice(), - client_provider.clone(), - storage_address, - ) - .await?; + let user_n = User::new(&args.user_priv_key, client).await?; + let user_arc = Arc::new(Mutex::new(user_n)); let (messages_tx, messages_rx) = mpsc::channel::(100); messages_tx .send(Msg::Input(Message::System(format!( "Hello, {:}", - user_address + user_address.clone() )))) .await?; @@ -47,41 +40,118 @@ async fn main() -> Result<(), Box> { let res_msg_tx = messages_tx.clone(); let main_token = token.clone(); + let user = user_arc.clone(); let h2 = tokio::spawn(async move { let (redis_tx, mut redis_rx) = mpsc::channel::>(100); loop { tokio::select! { + Some(msg) = client_recv.recv() => { + if let TokioMessage::Text(text) = msg { + if let Ok(chat_message) = serde_json::from_str::(&text) { + if let ServerMessage::InMessage { from, to, msg } = chat_message { + if let Ok(chat_msg) = serde_json::from_str::(&msg) { + match chat_msg { + ChatMessages::Request(req) => { + let res = user.as_ref().lock().await.send_responce_on_request(req, &from); + if let Err(err) = res { + res_msg_tx + .send(Msg::Input(Message::Error(err.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + } + }, + ChatMessages::Response(resp) => { + let res = user.as_ref().lock().await.parce_responce(resp).await; + if let Err(err) = res { + res_msg_tx + .send(Msg::Input(Message::Error(err.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + } + }, + ChatMessages::Welcome(welcome) => { + let res = user.as_ref().lock().await.join_group(welcome).await; + match res { + Ok(mut buf) => { + let msg = format!("Succesfully join to the group: {:#?}", buf.1); + res_msg_tx.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; + + let redis_tx = redis_tx.clone(); + tokio::spawn(async move { + while let Ok(msg) = buf.0.recv().await { + let bytes: Vec = msg.value.convert()?; + redis_tx.send(bytes).await.map_err(|err| CliError::SenderError(err.to_string()))?; + } + Ok::<_, CliError>(()) + }); + }, + Err(err) => { + res_msg_tx + .send(Msg::Input(Message::Error(err.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + }, + }; + }, + } + } else { + res_msg_tx + .send(Msg::Input(Message::Error(UserError::InvalidChatMessageError.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + } + }; + } else { + res_msg_tx + .send(Msg::Input(Message::Error(UserError::InvalidServerMessageError.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + } + } + } Some(val) = redis_rx.recv() =>{ - let res = user.receive_msg(val).await; + let res = user.as_ref().lock().await.receive_msg(val).await; match res { Ok(msg) => { match msg { - Some(m) => res_msg_tx.send(Msg::Input(Message::Incoming(m.group, m.author, m.message))).await?, + Some(m) => res_msg_tx.send(Msg::Input(Message::Incoming(m.group, m.author, m.message))).await.map_err(|err| CliError::SenderError(err.to_string()))?, None => continue } }, Err(err) => { res_msg_tx .send(Msg::Input(Message::Error(err.to_string()))) - .await?; + .await.map_err(|err| CliError::SenderError(err.to_string()))?; }, }; } Some(command) = cli_gr_rx.recv() => { // res_msg_tx.send(Msg::Input(Message::System(format!("Get command: {:?}", command)))).await?; match command { - Commands::CreateGroup { group_name } => { - let res = user.create_group(group_name.clone()).await; + Commands::CreateGroup { group_name, storage_address, storage_url } => { + let client_provider = ProviderBuilder::new() + .with_recommended_fillers() + .wallet(user.as_ref().lock().await.wallet()) + .on_http(storage_url); + let res = user.as_ref().lock().await.connect_to_smart_contract(&storage_address, client_provider).await; + match res { + Ok(_) => { + let msg = format!("Successfully connect to Smart Contract on address {:}\n", storage_address); + res_msg_tx.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; + }, + Err(err) => { + res_msg_tx + .send(Msg::Input(Message::Error(err.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + }, + }; + + let res = user.as_ref().lock().await.create_group(group_name.clone()).await; match res { Ok(mut br) => { let msg = format!("Successfully create group: {:?}", group_name.clone()); - res_msg_tx.send(Msg::Input(Message::System(msg))).await?; + res_msg_tx.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; let redis_tx = redis_tx.clone(); tokio::spawn(async move { while let Ok(msg) = br.recv().await { let bytes: Vec = msg.value.convert()?; - redis_tx.send(bytes).await?; + redis_tx.send(bytes).await.map_err(|err| CliError::SenderError(err.to_string()))?; } Ok::<_, CliError>(()) }); @@ -89,79 +159,84 @@ async fn main() -> Result<(), Box> { Err(err) => { res_msg_tx .send(Msg::Input(Message::Error(err.to_string()))) - .await?; - }, - }; - }, - Commands::Invite { group_name, user_wallet } => { - let res = user.invite(user_wallet, group_name.clone()).await; - match res { - Ok(_) => { - let msg = format!("Invite {:} to the group {:}\n", - user_address, group_name - ); - res_msg_tx.send(Msg::Input(Message::System(msg))).await?; - }, - Err(err) => { - res_msg_tx - .send(Msg::Input(Message::Error(err.to_string()))) - .await?; + .await.map_err(|err| CliError::SenderError(err.to_string()))?; }, }; }, - Commands::JoinGroup { group_name } => { - let mut file = File::open(format!("invite_{group_name}.txt"))?; - let mut welcome = String::new(); - file.read_to_string(&mut welcome).unwrap(); - - let wbytes = hex::decode(welcome).unwrap(); - let welc = MlsMessageIn::tls_deserialize_bytes(wbytes).unwrap(); - let welcome = welc.into_welcome(); - if welcome.is_some() { - let res = user.join_group(welcome.unwrap()).await; + Commands::Invite { group_name, users_wallet_addrs } => { + let user_clone = user.clone(); + let res_msg_tx_c = messages_tx.clone(); + tokio::spawn(async move { + for user_wallet in users_wallet_addrs.iter() { + let user_clone_ref = user_clone.as_ref(); + let opt_token = + { + let mut user_clone_ref_lock = user_clone_ref.lock().await; + let res = user_clone_ref_lock.handle_send_req(user_wallet, group_name.clone()).await; + match res { + Ok(token) => { + token + }, + Err(err) => { + res_msg_tx_c + .send(Msg::Input(Message::Error(err.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + None + }, + } + }; + + match opt_token { + Some(token) => token.cancelled().await, + None => return Err(CliError::TokenCancellingError), + }; + + { + let mut user_clone_ref_lock = user_clone.as_ref().lock().await; + user_clone_ref_lock.contacts.future_req.remove(user_wallet); + let res = user_clone_ref_lock.add_user_to_acl(user_wallet).await; + if let Err(err) = res { + res_msg_tx_c + .send(Msg::Input(Message::Error(err.to_string()))) + .await.map_err(|err| CliError::SenderError(err.to_string()))?; + }; + } + + } + + let res = user_clone.as_ref().lock().await.invite(users_wallet_addrs.clone(), group_name.clone()).await; match res { - Ok(mut buf) => { - let msg = format!("Succesfully join to the group: {:#?}", buf.1); - res_msg_tx.send(Msg::Input(Message::System(msg))).await?; - - let redis_tx = redis_tx.clone(); - tokio::spawn(async move { - while let Ok(msg) = buf.0.recv().await { - let bytes: Vec = msg.value.convert()?; - redis_tx.send(bytes).await?; - } - Ok::<_, CliError>(()) - }); + Ok(_) => { + let msg = format!("Invite {:?} to the group {:}\n", + users_wallet_addrs, group_name + ); + res_msg_tx_c.send(Msg::Input(Message::System(msg))).await.map_err(|err| CliError::SenderError(err.to_string()))?; }, Err(err) => { - res_msg_tx + res_msg_tx_c .send(Msg::Input(Message::Error(err.to_string()))) - .await?; + .await.map_err(|err| CliError::SenderError(err.to_string()))?; }, }; - } else { - res_msg_tx - .send(Msg::Input(Message::Error(UserError::EmptyWelcomeMessageError.to_string()))) - .await?; - } - + Ok::<_, CliError>(()) + }); }, Commands::SendMessage { group_name, msg } => { let message = msg.join(" "); - let res = user.send_msg(&message, group_name.clone(), user.identity.to_string()).await; + let res = user.as_ref().lock().await.send_msg(&message, group_name.clone(), user_address.clone()).await; match res { Ok(_) => { - res_msg_tx.send(Msg::Input(Message::Mine(group_name, user.identity.to_string(), message ))).await?; + res_msg_tx.send(Msg::Input(Message::Mine(group_name, user_address.clone(), message ))).await.map_err(|err| CliError::SenderError(err.to_string()))?; }, Err(err) => { res_msg_tx .send(Msg::Input(Message::Error(err.to_string()))) - .await?; + .await.map_err(|err| CliError::SenderError(err.to_string()))?; }, }; }, Commands::Exit => { - res_msg_tx.send(Msg::Input(Message::System("Bye!".to_string()))).await?; + res_msg_tx.send(Msg::Input(Message::System("Bye!".to_string()))).await.map_err(|err| CliError::SenderError(err.to_string()))?; break }, } @@ -170,7 +245,7 @@ async fn main() -> Result<(), Box> { break; } else => { - res_msg_tx.send(Msg::Input(Message::System("Something went wrong".to_string()))).await?; + res_msg_tx.send(Msg::Input(Message::System("Something went wrong".to_string()))).await.map_err(|err| CliError::SenderError(err.to_string()))?; break } }; diff --git a/src/user.rs b/src/user.rs index 082f76a..c93e58b 100644 --- a/src/user.rs +++ b/src/user.rs @@ -1,35 +1,31 @@ use alloy::{ - hex::{self, FromHexError, ToHexExt}, - network::Network, + hex::{self}, + network::{EthereumWallet, Network}, primitives::Address, providers::Provider, + signers::{local::PrivateKeySigner, SignerSync}, transports::Transport, }; use fred::types::Message; use openmls::{group::*, prelude::*}; -use openmls_rust_crypto::MemoryKeyStoreError; use std::{ - borrow::BorrowMut, cell::RefCell, collections::HashMap, fmt::Display, - fs::File, - io::Write, - str::{from_utf8, FromStr, Utf8Error}, - string::FromUtf8Error, + str::{from_utf8, FromStr}, }; use tokio::sync::broadcast::Receiver; +use tokio_util::sync::CancellationToken; -use ds::ds::*; +use ds::{ + chat_client::{ChatClient, ReqMessageType, RequestMLSPayload, ResponseMLSPayload}, + ds::*, +}; use mls_crypto::openmls_provider::*; use sc_key_store::{sc_ks::ScKeyStorage, *}; -// use waku_bindings::*; -// - -use crate::conversation::*; -use crate::identity::{Identity, IdentityError}; -const NUMBER_OF_KP: usize = 2; +use crate::{contact::ContactsList, conversation::*}; +use crate::{identity::Identity, UserError}; pub struct Group { group_name: String, @@ -49,8 +45,10 @@ pub struct User { pub identity: Identity, pub groups: HashMap, provider: MlsCryptoProvider, - sc_ks: ScKeyStorage, - // pub(crate) contacts: HashMap, WakuPeers>, + eth_signer: PrivateKeySigner, + // we don't need on-chain connection if we don't create a group + sc_ks: Option>, + pub contacts: ContactsList, } impl User @@ -60,24 +58,38 @@ where N: Network, { /// Create a new user with the given name and a fresh set of credentials. - pub async fn new( - user_wallet_address: &[u8], - provider: P, - sc_storage_address: Address, - ) -> Result { + pub async fn new(user_eth_priv_key: &str, chat_client: ChatClient) -> Result { + let signer = PrivateKeySigner::from_str(user_eth_priv_key)?; + let user_address = signer.address(); + let crypto = MlsCryptoProvider::default(); - let id = Identity::new(CIPHERSUITE, &crypto, user_wallet_address, NUMBER_OF_KP)?; - let mut user = User { + let id = Identity::new(CIPHERSUITE, &crypto, user_address.as_slice())?; + let user = User { groups: HashMap::new(), identity: id, + eth_signer: signer, provider: crypto, - sc_ks: ScKeyStorage::new(provider, sc_storage_address), - // contacts: HashMap::new(), + sc_ks: None, + contacts: ContactsList::new(chat_client).await?, }; - user.register().await?; Ok(user) } + pub async fn connect_to_smart_contract( + &mut self, + sc_storage_address: &str, + provider: P, + ) -> Result<(), UserError> { + let storage_address = Address::from_str(sc_storage_address)?; + self.sc_ks = Some(ScKeyStorage::new(provider, storage_address)); + self.sc_ks + .as_mut() + .unwrap() + .add_user(&self.identity.to_string()) + .await?; + Ok(()) + } + pub async fn create_group( &mut self, group_name: String, @@ -85,7 +97,7 @@ where let group_id = group_name.as_bytes(); if self.groups.contains_key(&group_name) { - return Err(UserError::AlreadyExistedGroupError(group_name)); + return Err(UserError::GroupAlreadyExistsError(group_name)); } let group_config = MlsGroupConfig::builder() @@ -100,7 +112,7 @@ where self.identity.credential_with_key.clone(), )?; - let (rc, broadcaster) = RClient::new_for_group(group_name.clone()).await?; + let (rc, broadcaster) = RClient::new_with_group(group_name.clone()).await?; let group = Group { group_name: group_name.clone(), conversation: Conversation::default(), @@ -110,76 +122,84 @@ where // content_topics: Vec::new(), }; - self.groups.insert(group_name, group); + self.groups.insert(group_name.clone(), group); + self.contacts + .insert_group2sc(group_name, self.sc_address()?)?; Ok(broadcaster) } - async fn register(&mut self) -> Result<(), UserError> { - let ukp = self.key_packages(); - self.sc_ks - .borrow_mut() - .add_user(ukp.clone(), self.identity.signature_pub_key().as_slice()) - .await?; + pub async fn add_user_to_acl(&mut self, user_address: &str) -> Result<(), UserError> { + if self.sc_ks.is_none() { + return Err(UserError::MissingSmartContractConnection); + } + self.sc_ks.as_mut().unwrap().add_user(user_address).await?; Ok(()) } - /// Get the key packages fo this user. - pub fn key_packages(&self) -> UserKeyPackages { - let mut kpgs = self.identity.kp.clone(); - UserKeyPackages(kpgs.drain().collect::, KeyPackage)>>()) + pub async fn restore_key_package( + &mut self, + mut signed_kp: &[u8], + ) -> Result { + if self.sc_ks.is_none() { + return Err(UserError::MissingSmartContractConnection); + } + + let key_package_in = KeyPackageIn::tls_deserialize(&mut signed_kp)?; + let key_package = + key_package_in.validate(self.provider.crypto(), ProtocolVersion::Mls10)?; + + Ok(key_package) } pub async fn invite( &mut self, - user_wallet: String, + users: Vec, group_name: String, ) -> Result<(), UserError> { - let user_address = Address::from_str(&user_wallet)?; - let user_wallet_address = user_address.as_slice(); - // First we need to get the key package for {id} from the DS. - if !self - .sc_ks - .borrow_mut() - .does_user_exist(user_wallet_address) - .await? - { - return Err(UserError::UnknownUserError); + if self.sc_ks.is_none() { + return Err(UserError::MissingSmartContractConnection); } - // Reclaim a key package from the server - let joiner_key_package = self - .sc_ks - .borrow_mut() - .get_avaliable_user_kp(user_wallet_address, &self.provider) + let users_for_invite = self + .contacts + .prepare_joiners(users.clone(), group_name.clone()) .await?; + let mut joiners_key_package: Vec = Vec::with_capacity(users_for_invite.len()); + let mut user_addrs = Vec::with_capacity(users_for_invite.len()); + for (user_addr, user_kp) in users_for_invite { + joiners_key_package.push(self.restore_key_package(&user_kp).await?); + user_addrs.push(user_addr); + } + // Build a proposal with this key package and do the MLS bits. let group = match self.groups.get_mut(&group_name) { Some(g) => g, - None => return Err(UserError::UnknownGroupError(group_name)), + None => return Err(UserError::GroupNotFoundError(group_name)), }; let (out_messages, welcome, _group_info) = group.mls_group.borrow_mut().add_members( &self.provider, &self.identity.signer, - &[joiner_key_package], + &joiners_key_package, )?; group .rc_client - .msg_send(out_messages, self.identity.to_string()) + .msg_send( + out_messages.tls_serialize_detached()?, + self.identity.to_string(), + group_name, + ) .await?; // Second, process the invitation on our end. group .mls_group .borrow_mut() .merge_pending_commit(&self.provider)?; - // Put sending welcome by p2p here - let bytes = welcome.tls_serialize_detached()?; - let string = bytes.encode_hex(); - - let mut file = File::create(format!("invite_{group_name}.txt"))?; - file.write_all(string.as_bytes())?; + // Send welcome by p2p + self.contacts + .send_welcome_msg_to_users(self.identity.to_string(), user_addrs, welcome)?; Ok(()) } @@ -200,7 +220,7 @@ where MlsMessageInBody::PublicMessage(message) => { self.process_protocol_msg(message.into())? } - _ => return Err(UserError::MessageTypeError), + _ => return Err(UserError::UnsupportedMessageType), }; Ok(msg) } @@ -212,7 +232,7 @@ where let group_name = from_utf8(message.group_id().as_slice())?.to_string(); let group = match self.groups.get_mut(&group_name) { Some(g) => g, - None => return Err(UserError::UnknownGroupError(group_name)), + None => return Err(UserError::GroupNotFoundError(group_name)), }; let mut mls_group = group.mls_group.borrow_mut(); @@ -269,7 +289,7 @@ where ) -> Result<(), UserError> { let group = match self.groups.get_mut(&group_name) { Some(g) => g, - None => return Err(UserError::UnknownGroupError(group_name)), + None => return Err(UserError::GroupNotFoundError(group_name)), }; let message_out = group.mls_group.borrow_mut().create_message( @@ -278,25 +298,36 @@ where msg.as_bytes(), )?; - group.rc_client.msg_send(message_out, sender).await?; + group + .rc_client + .msg_send(message_out.tls_serialize_detached()?, sender, group_name) + .await?; Ok(()) } pub async fn join_group( &mut self, - welcome: Welcome, + welcome: String, ) -> Result<(Receiver, String), UserError> { + let wbytes = hex::decode(welcome).unwrap(); + let welc = MlsMessageIn::tls_deserialize_bytes(wbytes).unwrap(); + let welcome = welc.into_welcome(); + if welcome.is_none() { + return Err(UserError::EmptyWelcomeMessageError); + } + let group_config = MlsGroupConfig::builder() .use_ratchet_tree_extension(true) .build(); // TODO: After we move from openmls, we will have to delete the used key package here ourselves. - let mls_group = MlsGroup::new_from_welcome(&self.provider, &group_config, welcome, None)?; + let mls_group = + MlsGroup::new_from_welcome(&self.provider, &group_config, welcome.unwrap(), None)?; let group_id = mls_group.group_id().to_vec(); let group_name = String::from_utf8(group_id)?; - let (rc, br) = RClient::new_for_group(group_name.clone()).await?; + let (rc, br) = RClient::new_with_group(group_name.clone()).await?; let group = Group { group_name: group_name.clone(), conversation: Conversation::default(), @@ -305,7 +336,7 @@ where }; match self.groups.insert(group_name.clone(), group) { - Some(old) => Err(UserError::AlreadyExistedGroupError(old.group_name)), + Some(old) => Err(UserError::GroupAlreadyExistsError(old.group_name)), None => Ok((br, group_name)), } } @@ -344,7 +375,7 @@ where group_name: String, ) -> Result>, UserError> { self.groups.get(&group_name).map_or_else( - || Err(UserError::UnknownGroupError(group_name)), + || Err(UserError::GroupNotFoundError(group_name)), |g| { Ok(g.conversation .get(100) @@ -356,7 +387,7 @@ where pub fn group_members(&self, group_name: String) -> Result, UserError> { let group = match self.groups.get(&group_name) { Some(g) => g, - None => return Err(UserError::UnknownGroupError(group_name)), + None => return Err(UserError::GroupNotFoundError(group_name)), }; Ok(group.group_members(self.identity.signature_pub_key().as_slice())) } @@ -367,6 +398,86 @@ where } Ok(self.groups.keys().map(|k| k.to_owned()).collect()) } + + pub fn wallet(&self) -> EthereumWallet { + EthereumWallet::from(self.eth_signer.clone()) + } + + fn sign(&self, msg: String) -> Result { + let signature = self.eth_signer.sign_message_sync(msg.as_bytes())?; + let res = serde_json::to_string(&signature)?; + Ok(res) + } + + pub fn send_responce_on_request( + &mut self, + req: RequestMLSPayload, + user_address: &str, + ) -> Result<(), UserError> { + let self_address = self.identity.to_string(); + match req.msg_type { + ReqMessageType::InviteToGroup => { + let signature = self.sign(req.msg_to_sign())?; + let key_package = self + .identity + .generate_key_package(CIPHERSUITE, &self.provider)?; + let resp = ResponseMLSPayload::new( + signature, + self_address.clone(), + req.group_name(), + key_package.tls_serialize_detached()?, + ); + self.contacts + .send_resp_msg_to_user(self_address, user_address, resp)?; + + Ok(()) + } + ReqMessageType::RemoveFromGroup => Ok(()), + } + } + + pub async fn parce_responce(&mut self, resp: ResponseMLSPayload) -> Result<(), UserError> { + if self.sc_ks.is_none() { + return Err(UserError::MissingSmartContractConnection); + } + let group_name = resp.group_name.clone(); + let sc_address = self.contacts.group2sc(group_name.clone())?; + let (user_wallet, kp) = resp.validate(sc_address, group_name.clone())?; + + self.contacts + .add_key_package_to_contact(&user_wallet, kp, group_name.clone()) + .await?; + + self.contacts.handle_response(&user_wallet)?; + Ok(()) + } + + pub fn sc_address(&self) -> Result { + if self.sc_ks.is_none() { + return Err(UserError::MissingSmartContractConnection); + } + Ok(self.sc_ks.as_ref().unwrap().sc_adsress()) + } + + pub async fn handle_send_req( + &mut self, + user_wallet: &str, + group_name: String, + ) -> Result, UserError> { + if !self.contacts.does_user_in_contacts(user_wallet).await { + self.contacts.add_new_contact(user_wallet).await?; + } + self.contacts + .send_msg_req( + self.identity.to_string(), + user_wallet.to_owned(), + group_name, + ReqMessageType::InviteToGroup, + ) + .unwrap(); + + Ok(self.contacts.future_req.get(user_wallet).cloned()) + } } impl Group { @@ -399,59 +510,3 @@ pub enum GroupError { #[error("Unknown group member : {0}")] UnknownGroupMemberError(String), } - -#[derive(Debug, thiserror::Error)] -pub enum UserError { - #[error("Unknown group: {0}")] - UnknownGroupError(String), - #[error("Group already exist: {0}")] - AlreadyExistedGroupError(String), - #[error("Unsupported message type")] - MessageTypeError, - #[error("Unknown user")] - UnknownUserError, - #[error("Empty welcome message")] - EmptyWelcomeMessageError, - - #[error("Delivery Service error: {0}")] - DeliveryServiceError(#[from] DeliveryServiceError), - #[error(transparent)] - GroupError(#[from] GroupError), - #[error("Key Store error: {0}")] - KeyStoreError(#[from] KeyStoreError), - #[error("Identity error: {0}")] - IdentityError(#[from] IdentityError), - - #[error("Something wrong while creating Mls group: {0}")] - MlsGroupCreationError(#[from] NewGroupError), - #[error("Something wrong while adding member to Mls group: {0}")] - MlsAddMemberError(#[from] AddMembersError), - #[error("Something wrong while merging pending commit: {0}")] - MlsMergePendingCommitError(#[from] MergePendingCommitError), - #[error("Something wrong while merging commit: {0}")] - MlsMergeCommitError(#[from] MergeCommitError), - #[error("Error processing unverified message: {0}")] - MlsProcessMessageError(#[from] ProcessMessageError), - #[error("Something wrong while creating message: {0}")] - MlsCreateMessageError(#[from] CreateMessageError), - #[error("Failed to create staged join: {0}")] - MlsWelcomeError(#[from] WelcomeError), - #[error("Failed to remove member from group: {0}")] - MlsRemoveMembersError(#[from] RemoveMembersError), - - #[error("Parse String UTF8 error: {0}")] - ParseUTF8Error(#[from] FromUtf8Error), - #[error("Parse str UTF8 error: {0}")] - ParseStrUTF8Error(#[from] Utf8Error), - #[error("Json error: {0}")] - JsonError(#[from] serde_json::Error), - #[error("Serialization problem: {0}")] - TlsError(#[from] tls_codec::Error), - #[error("Unable to parce the address: {0}")] - AlloyFromHexError(#[from] FromHexError), - #[error("Write to stdout error")] - IoError(#[from] std::io::Error), - - #[error("Unknown error: {0}")] - Other(anyhow::Error), -}