1pub use erc721_votes::*;
2#[allow(
5 clippy::enum_variant_names,
6 clippy::too_many_arguments,
7 clippy::upper_case_acronyms,
8 clippy::type_complexity,
9 dead_code,
10 non_camel_case_types,
11)]
12pub mod erc721_votes {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[],\"type\":\"error\",\"name\":\"InvalidShortString\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\",\"components\":[]}],\"type\":\"error\",\"name\":\"StringTooLong\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"Approval\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"ApprovalForAll\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"DelegateChanged\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"DelegateVotesChanged\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[],\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"Transfer\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"approve\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"clock\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"delegate\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"delegateBySig\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timepoint\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"timepoint\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"setApprovalForAll\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transferFrom\",\"outputs\":[]}]";
15 pub static ERC721VOTES_ABI: ::ethers_contract::Lazy<::ethers_core::abi::Abi> = ::ethers_contract::Lazy::new(||
17 ::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
18 pub struct ERC721Votes<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for ERC721Votes<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for ERC721Votes<M> {
25 type Target = ::ethers_contract::Contract<M>;
26 fn deref(&self) -> &Self::Target {
27 &self.0
28 }
29 }
30 impl<M> ::core::ops::DerefMut for ERC721Votes<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for ERC721Votes<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(ERC721Votes)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> ERC721Votes<M> {
41 pub fn new<T: Into<::ethers_core::types::Address>>(
44 address: T,
45 client: ::std::sync::Arc<M>,
46 ) -> Self {
47 Self(
48 ::ethers_contract::Contract::new(
49 address.into(),
50 ERC721VOTES_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn clock_mode(
57 &self,
58 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
59 self.0
60 .method_hash([75, 245, 215, 233], ())
61 .expect("method not found (this should never happen)")
62 }
63 pub fn domain_separator(
65 &self,
66 ) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
67 self.0
68 .method_hash([54, 68, 229, 21], ())
69 .expect("method not found (this should never happen)")
70 }
71 pub fn approve(
73 &self,
74 to: ::ethers_core::types::Address,
75 token_id: ::ethers_core::types::U256,
76 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
77 self.0
78 .method_hash([9, 94, 167, 179], (to, token_id))
79 .expect("method not found (this should never happen)")
80 }
81 pub fn balance_of(
83 &self,
84 owner: ::ethers_core::types::Address,
85 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
86 self.0
87 .method_hash([112, 160, 130, 49], owner)
88 .expect("method not found (this should never happen)")
89 }
90 pub fn clock(&self) -> ::ethers_contract::builders::ContractCall<M, u64> {
92 self.0
93 .method_hash([145, 221, 173, 244], ())
94 .expect("method not found (this should never happen)")
95 }
96 pub fn delegate(
98 &self,
99 delegatee: ::ethers_core::types::Address,
100 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
101 self.0
102 .method_hash([92, 25, 169, 92], delegatee)
103 .expect("method not found (this should never happen)")
104 }
105 pub fn delegate_by_sig(
107 &self,
108 delegatee: ::ethers_core::types::Address,
109 nonce: ::ethers_core::types::U256,
110 expiry: ::ethers_core::types::U256,
111 v: u8,
112 r: [u8; 32],
113 s: [u8; 32],
114 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
115 self.0
116 .method_hash([195, 205, 165, 32], (delegatee, nonce, expiry, v, r, s))
117 .expect("method not found (this should never happen)")
118 }
119 pub fn delegates(
121 &self,
122 account: ::ethers_core::types::Address,
123 ) -> ::ethers_contract::builders::ContractCall<
124 M,
125 ::ethers_core::types::Address,
126 > {
127 self.0
128 .method_hash([88, 124, 222, 30], account)
129 .expect("method not found (this should never happen)")
130 }
131 pub fn eip_712_domain(
133 &self,
134 ) -> ::ethers_contract::builders::ContractCall<
135 M,
136 (
137 [u8; 1],
138 ::std::string::String,
139 ::std::string::String,
140 ::ethers_core::types::U256,
141 ::ethers_core::types::Address,
142 [u8; 32],
143 ::std::vec::Vec<::ethers_core::types::U256>,
144 ),
145 > {
146 self.0
147 .method_hash([132, 176, 25, 110], ())
148 .expect("method not found (this should never happen)")
149 }
150 pub fn get_approved(
152 &self,
153 token_id: ::ethers_core::types::U256,
154 ) -> ::ethers_contract::builders::ContractCall<
155 M,
156 ::ethers_core::types::Address,
157 > {
158 self.0
159 .method_hash([8, 24, 18, 252], token_id)
160 .expect("method not found (this should never happen)")
161 }
162 pub fn get_past_total_supply(
164 &self,
165 timepoint: ::ethers_core::types::U256,
166 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
167 self.0
168 .method_hash([142, 83, 158, 140], timepoint)
169 .expect("method not found (this should never happen)")
170 }
171 pub fn get_past_votes(
173 &self,
174 account: ::ethers_core::types::Address,
175 timepoint: ::ethers_core::types::U256,
176 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
177 self.0
178 .method_hash([58, 70, 177, 168], (account, timepoint))
179 .expect("method not found (this should never happen)")
180 }
181 pub fn get_votes(
183 &self,
184 account: ::ethers_core::types::Address,
185 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
186 self.0
187 .method_hash([154, 178, 78, 176], account)
188 .expect("method not found (this should never happen)")
189 }
190 pub fn is_approved_for_all(
192 &self,
193 owner: ::ethers_core::types::Address,
194 operator: ::ethers_core::types::Address,
195 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
196 self.0
197 .method_hash([233, 133, 233, 197], (owner, operator))
198 .expect("method not found (this should never happen)")
199 }
200 pub fn name(
202 &self,
203 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
204 self.0
205 .method_hash([6, 253, 222, 3], ())
206 .expect("method not found (this should never happen)")
207 }
208 pub fn nonces(
210 &self,
211 owner: ::ethers_core::types::Address,
212 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
213 self.0
214 .method_hash([126, 206, 190, 0], owner)
215 .expect("method not found (this should never happen)")
216 }
217 pub fn owner_of(
219 &self,
220 token_id: ::ethers_core::types::U256,
221 ) -> ::ethers_contract::builders::ContractCall<
222 M,
223 ::ethers_core::types::Address,
224 > {
225 self.0
226 .method_hash([99, 82, 33, 30], token_id)
227 .expect("method not found (this should never happen)")
228 }
229 pub fn safe_transfer_from(
231 &self,
232 from: ::ethers_core::types::Address,
233 to: ::ethers_core::types::Address,
234 token_id: ::ethers_core::types::U256,
235 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
236 self.0
237 .method_hash([66, 132, 46, 14], (from, to, token_id))
238 .expect("method not found (this should never happen)")
239 }
240 pub fn safe_transfer_from_with_from_and_to_and_data(
242 &self,
243 from: ::ethers_core::types::Address,
244 to: ::ethers_core::types::Address,
245 token_id: ::ethers_core::types::U256,
246 data: ::ethers_core::types::Bytes,
247 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
248 self.0
249 .method_hash([184, 141, 79, 222], (from, to, token_id, data))
250 .expect("method not found (this should never happen)")
251 }
252 pub fn set_approval_for_all(
254 &self,
255 operator: ::ethers_core::types::Address,
256 approved: bool,
257 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
258 self.0
259 .method_hash([162, 44, 180, 101], (operator, approved))
260 .expect("method not found (this should never happen)")
261 }
262 pub fn supports_interface(
264 &self,
265 interface_id: [u8; 4],
266 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
267 self.0
268 .method_hash([1, 255, 201, 167], interface_id)
269 .expect("method not found (this should never happen)")
270 }
271 pub fn symbol(
273 &self,
274 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
275 self.0
276 .method_hash([149, 216, 155, 65], ())
277 .expect("method not found (this should never happen)")
278 }
279 pub fn token_uri(
281 &self,
282 token_id: ::ethers_core::types::U256,
283 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
284 self.0
285 .method_hash([200, 123, 86, 221], token_id)
286 .expect("method not found (this should never happen)")
287 }
288 pub fn transfer_from(
290 &self,
291 from: ::ethers_core::types::Address,
292 to: ::ethers_core::types::Address,
293 token_id: ::ethers_core::types::U256,
294 ) -> ::ethers_contract::builders::ContractCall<M, ()> {
295 self.0
296 .method_hash([35, 184, 114, 221], (from, to, token_id))
297 .expect("method not found (this should never happen)")
298 }
299 pub fn approval_filter(
301 &self,
302 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, ApprovalFilter> {
303 self.0.event()
304 }
305 pub fn approval_for_all_filter(
307 &self,
308 ) -> ::ethers_contract::builders::Event<
309 ::std::sync::Arc<M>,
310 M,
311 ApprovalForAllFilter,
312 > {
313 self.0.event()
314 }
315 pub fn delegate_changed_filter(
317 &self,
318 ) -> ::ethers_contract::builders::Event<
319 ::std::sync::Arc<M>,
320 M,
321 DelegateChangedFilter,
322 > {
323 self.0.event()
324 }
325 pub fn delegate_votes_changed_filter(
327 &self,
328 ) -> ::ethers_contract::builders::Event<
329 ::std::sync::Arc<M>,
330 M,
331 DelegateVotesChangedFilter,
332 > {
333 self.0.event()
334 }
335 pub fn eip712_domain_changed_filter(
337 &self,
338 ) -> ::ethers_contract::builders::Event<
339 ::std::sync::Arc<M>,
340 M,
341 Eip712DomainChangedFilter,
342 > {
343 self.0.event()
344 }
345 pub fn transfer_filter(
347 &self,
348 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
349 self.0.event()
350 }
351 pub fn events(
353 &self,
354 ) -> ::ethers_contract::builders::Event<
355 ::std::sync::Arc<M>,
356 M,
357 ERC721VotesEvents,
358 > {
359 self.0.event_with_filter(::core::default::Default::default())
360 }
361 }
362 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
363 for ERC721Votes<M> {
364 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
365 Self::new(contract.address(), contract.client())
366 }
367 }
368 #[derive(
370 Clone,
371 ::ethers_contract::EthError,
372 ::ethers_contract::EthDisplay,
373 Default,
374 Debug,
375 PartialEq,
376 Eq,
377 Hash
378 )]
379 #[etherror(name = "InvalidShortString", abi = "InvalidShortString()")]
380 pub struct InvalidShortString;
381 #[derive(
383 Clone,
384 ::ethers_contract::EthError,
385 ::ethers_contract::EthDisplay,
386 Default,
387 Debug,
388 PartialEq,
389 Eq,
390 Hash
391 )]
392 #[etherror(name = "StringTooLong", abi = "StringTooLong(string)")]
393 pub struct StringTooLong {
394 pub str: ::std::string::String,
395 }
396 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
398 pub enum ERC721VotesErrors {
399 InvalidShortString(InvalidShortString),
400 StringTooLong(StringTooLong),
401 RevertString(::std::string::String),
404 }
405 impl ::ethers_core::abi::AbiDecode for ERC721VotesErrors {
406 fn decode(
407 data: impl AsRef<[u8]>,
408 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
409 let data = data.as_ref();
410 if let Ok(decoded)
411 = <::std::string::String as ::ethers_core::abi::AbiDecode>::decode(
412 data,
413 ) {
414 return Ok(Self::RevertString(decoded));
415 }
416 if let Ok(decoded)
417 = <InvalidShortString as ::ethers_core::abi::AbiDecode>::decode(data) {
418 return Ok(Self::InvalidShortString(decoded));
419 }
420 if let Ok(decoded)
421 = <StringTooLong as ::ethers_core::abi::AbiDecode>::decode(data) {
422 return Ok(Self::StringTooLong(decoded));
423 }
424 Err(::ethers_core::abi::Error::InvalidData.into())
425 }
426 }
427 impl ::ethers_core::abi::AbiEncode for ERC721VotesErrors {
428 fn encode(self) -> ::std::vec::Vec<u8> {
429 match self {
430 Self::InvalidShortString(element) => {
431 ::ethers_core::abi::AbiEncode::encode(element)
432 }
433 Self::StringTooLong(element) => {
434 ::ethers_core::abi::AbiEncode::encode(element)
435 }
436 Self::RevertString(s) => ::ethers_core::abi::AbiEncode::encode(s),
437 }
438 }
439 }
440 impl ::ethers_contract::ContractRevert for ERC721VotesErrors {
441 fn valid_selector(selector: [u8; 4]) -> bool {
442 match selector {
443 [0x08, 0xc3, 0x79, 0xa0] => true,
444 _ if selector
445 == <InvalidShortString as ::ethers_contract::EthError>::selector() => {
446 true
447 }
448 _ if selector
449 == <StringTooLong as ::ethers_contract::EthError>::selector() => true,
450 _ => false,
451 }
452 }
453 }
454 impl ::core::fmt::Display for ERC721VotesErrors {
455 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
456 match self {
457 Self::InvalidShortString(element) => {
458 ::core::fmt::Display::fmt(element, f)
459 }
460 Self::StringTooLong(element) => ::core::fmt::Display::fmt(element, f),
461 Self::RevertString(s) => ::core::fmt::Display::fmt(s, f),
462 }
463 }
464 }
465 impl ::core::convert::From<::std::string::String> for ERC721VotesErrors {
466 fn from(value: String) -> Self {
467 Self::RevertString(value)
468 }
469 }
470 impl ::core::convert::From<InvalidShortString> for ERC721VotesErrors {
471 fn from(value: InvalidShortString) -> Self {
472 Self::InvalidShortString(value)
473 }
474 }
475 impl ::core::convert::From<StringTooLong> for ERC721VotesErrors {
476 fn from(value: StringTooLong) -> Self {
477 Self::StringTooLong(value)
478 }
479 }
480 #[derive(
481 Clone,
482 ::ethers_contract::EthEvent,
483 ::ethers_contract::EthDisplay,
484 Default,
485 Debug,
486 PartialEq,
487 Eq,
488 Hash
489 )]
490 #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
491 pub struct ApprovalFilter {
492 #[ethevent(indexed)]
493 pub owner: ::ethers_core::types::Address,
494 #[ethevent(indexed)]
495 pub approved: ::ethers_core::types::Address,
496 #[ethevent(indexed)]
497 pub token_id: ::ethers_core::types::U256,
498 }
499 #[derive(
500 Clone,
501 ::ethers_contract::EthEvent,
502 ::ethers_contract::EthDisplay,
503 Default,
504 Debug,
505 PartialEq,
506 Eq,
507 Hash
508 )]
509 #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
510 pub struct ApprovalForAllFilter {
511 #[ethevent(indexed)]
512 pub owner: ::ethers_core::types::Address,
513 #[ethevent(indexed)]
514 pub operator: ::ethers_core::types::Address,
515 pub approved: bool,
516 }
517 #[derive(
518 Clone,
519 ::ethers_contract::EthEvent,
520 ::ethers_contract::EthDisplay,
521 Default,
522 Debug,
523 PartialEq,
524 Eq,
525 Hash
526 )]
527 #[ethevent(
528 name = "DelegateChanged",
529 abi = "DelegateChanged(address,address,address)"
530 )]
531 pub struct DelegateChangedFilter {
532 #[ethevent(indexed)]
533 pub delegator: ::ethers_core::types::Address,
534 #[ethevent(indexed)]
535 pub from_delegate: ::ethers_core::types::Address,
536 #[ethevent(indexed)]
537 pub to_delegate: ::ethers_core::types::Address,
538 }
539 #[derive(
540 Clone,
541 ::ethers_contract::EthEvent,
542 ::ethers_contract::EthDisplay,
543 Default,
544 Debug,
545 PartialEq,
546 Eq,
547 Hash
548 )]
549 #[ethevent(
550 name = "DelegateVotesChanged",
551 abi = "DelegateVotesChanged(address,uint256,uint256)"
552 )]
553 pub struct DelegateVotesChangedFilter {
554 #[ethevent(indexed)]
555 pub delegate: ::ethers_core::types::Address,
556 pub previous_balance: ::ethers_core::types::U256,
557 pub new_balance: ::ethers_core::types::U256,
558 }
559 #[derive(
560 Clone,
561 ::ethers_contract::EthEvent,
562 ::ethers_contract::EthDisplay,
563 Default,
564 Debug,
565 PartialEq,
566 Eq,
567 Hash
568 )]
569 #[ethevent(name = "EIP712DomainChanged", abi = "EIP712DomainChanged()")]
570 pub struct Eip712DomainChangedFilter;
571 #[derive(
572 Clone,
573 ::ethers_contract::EthEvent,
574 ::ethers_contract::EthDisplay,
575 Default,
576 Debug,
577 PartialEq,
578 Eq,
579 Hash
580 )]
581 #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
582 pub struct TransferFilter {
583 #[ethevent(indexed)]
584 pub from: ::ethers_core::types::Address,
585 #[ethevent(indexed)]
586 pub to: ::ethers_core::types::Address,
587 #[ethevent(indexed)]
588 pub token_id: ::ethers_core::types::U256,
589 }
590 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
592 pub enum ERC721VotesEvents {
593 ApprovalFilter(ApprovalFilter),
594 ApprovalForAllFilter(ApprovalForAllFilter),
595 DelegateChangedFilter(DelegateChangedFilter),
596 DelegateVotesChangedFilter(DelegateVotesChangedFilter),
597 Eip712DomainChangedFilter(Eip712DomainChangedFilter),
598 TransferFilter(TransferFilter),
599 }
600 impl ::ethers_contract::EthLogDecode for ERC721VotesEvents {
601 fn decode_log(
602 log: &::ethers_core::abi::RawLog,
603 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
604 if let Ok(decoded) = ApprovalFilter::decode_log(log) {
605 return Ok(ERC721VotesEvents::ApprovalFilter(decoded));
606 }
607 if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
608 return Ok(ERC721VotesEvents::ApprovalForAllFilter(decoded));
609 }
610 if let Ok(decoded) = DelegateChangedFilter::decode_log(log) {
611 return Ok(ERC721VotesEvents::DelegateChangedFilter(decoded));
612 }
613 if let Ok(decoded) = DelegateVotesChangedFilter::decode_log(log) {
614 return Ok(ERC721VotesEvents::DelegateVotesChangedFilter(decoded));
615 }
616 if let Ok(decoded) = Eip712DomainChangedFilter::decode_log(log) {
617 return Ok(ERC721VotesEvents::Eip712DomainChangedFilter(decoded));
618 }
619 if let Ok(decoded) = TransferFilter::decode_log(log) {
620 return Ok(ERC721VotesEvents::TransferFilter(decoded));
621 }
622 Err(::ethers_core::abi::Error::InvalidData)
623 }
624 }
625 impl ::core::fmt::Display for ERC721VotesEvents {
626 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
627 match self {
628 Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
629 Self::ApprovalForAllFilter(element) => {
630 ::core::fmt::Display::fmt(element, f)
631 }
632 Self::DelegateChangedFilter(element) => {
633 ::core::fmt::Display::fmt(element, f)
634 }
635 Self::DelegateVotesChangedFilter(element) => {
636 ::core::fmt::Display::fmt(element, f)
637 }
638 Self::Eip712DomainChangedFilter(element) => {
639 ::core::fmt::Display::fmt(element, f)
640 }
641 Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
642 }
643 }
644 }
645 impl ::core::convert::From<ApprovalFilter> for ERC721VotesEvents {
646 fn from(value: ApprovalFilter) -> Self {
647 Self::ApprovalFilter(value)
648 }
649 }
650 impl ::core::convert::From<ApprovalForAllFilter> for ERC721VotesEvents {
651 fn from(value: ApprovalForAllFilter) -> Self {
652 Self::ApprovalForAllFilter(value)
653 }
654 }
655 impl ::core::convert::From<DelegateChangedFilter> for ERC721VotesEvents {
656 fn from(value: DelegateChangedFilter) -> Self {
657 Self::DelegateChangedFilter(value)
658 }
659 }
660 impl ::core::convert::From<DelegateVotesChangedFilter> for ERC721VotesEvents {
661 fn from(value: DelegateVotesChangedFilter) -> Self {
662 Self::DelegateVotesChangedFilter(value)
663 }
664 }
665 impl ::core::convert::From<Eip712DomainChangedFilter> for ERC721VotesEvents {
666 fn from(value: Eip712DomainChangedFilter) -> Self {
667 Self::Eip712DomainChangedFilter(value)
668 }
669 }
670 impl ::core::convert::From<TransferFilter> for ERC721VotesEvents {
671 fn from(value: TransferFilter) -> Self {
672 Self::TransferFilter(value)
673 }
674 }
675 #[derive(
677 Clone,
678 ::ethers_contract::EthCall,
679 ::ethers_contract::EthDisplay,
680 Default,
681 Debug,
682 PartialEq,
683 Eq,
684 Hash
685 )]
686 #[ethcall(name = "CLOCK_MODE", abi = "CLOCK_MODE()")]
687 pub struct ClockModeCall;
688 #[derive(
690 Clone,
691 ::ethers_contract::EthCall,
692 ::ethers_contract::EthDisplay,
693 Default,
694 Debug,
695 PartialEq,
696 Eq,
697 Hash
698 )]
699 #[ethcall(name = "DOMAIN_SEPARATOR", abi = "DOMAIN_SEPARATOR()")]
700 pub struct DomainSeparatorCall;
701 #[derive(
703 Clone,
704 ::ethers_contract::EthCall,
705 ::ethers_contract::EthDisplay,
706 Default,
707 Debug,
708 PartialEq,
709 Eq,
710 Hash
711 )]
712 #[ethcall(name = "approve", abi = "approve(address,uint256)")]
713 pub struct ApproveCall {
714 pub to: ::ethers_core::types::Address,
715 pub token_id: ::ethers_core::types::U256,
716 }
717 #[derive(
719 Clone,
720 ::ethers_contract::EthCall,
721 ::ethers_contract::EthDisplay,
722 Default,
723 Debug,
724 PartialEq,
725 Eq,
726 Hash
727 )]
728 #[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
729 pub struct BalanceOfCall {
730 pub owner: ::ethers_core::types::Address,
731 }
732 #[derive(
734 Clone,
735 ::ethers_contract::EthCall,
736 ::ethers_contract::EthDisplay,
737 Default,
738 Debug,
739 PartialEq,
740 Eq,
741 Hash
742 )]
743 #[ethcall(name = "clock", abi = "clock()")]
744 pub struct ClockCall;
745 #[derive(
747 Clone,
748 ::ethers_contract::EthCall,
749 ::ethers_contract::EthDisplay,
750 Default,
751 Debug,
752 PartialEq,
753 Eq,
754 Hash
755 )]
756 #[ethcall(name = "delegate", abi = "delegate(address)")]
757 pub struct DelegateCall {
758 pub delegatee: ::ethers_core::types::Address,
759 }
760 #[derive(
762 Clone,
763 ::ethers_contract::EthCall,
764 ::ethers_contract::EthDisplay,
765 Default,
766 Debug,
767 PartialEq,
768 Eq,
769 Hash
770 )]
771 #[ethcall(
772 name = "delegateBySig",
773 abi = "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"
774 )]
775 pub struct DelegateBySigCall {
776 pub delegatee: ::ethers_core::types::Address,
777 pub nonce: ::ethers_core::types::U256,
778 pub expiry: ::ethers_core::types::U256,
779 pub v: u8,
780 pub r: [u8; 32],
781 pub s: [u8; 32],
782 }
783 #[derive(
785 Clone,
786 ::ethers_contract::EthCall,
787 ::ethers_contract::EthDisplay,
788 Default,
789 Debug,
790 PartialEq,
791 Eq,
792 Hash
793 )]
794 #[ethcall(name = "delegates", abi = "delegates(address)")]
795 pub struct DelegatesCall {
796 pub account: ::ethers_core::types::Address,
797 }
798 #[derive(
800 Clone,
801 ::ethers_contract::EthCall,
802 ::ethers_contract::EthDisplay,
803 Default,
804 Debug,
805 PartialEq,
806 Eq,
807 Hash
808 )]
809 #[ethcall(name = "eip712Domain", abi = "eip712Domain()")]
810 pub struct Eip712DomainCall;
811 #[derive(
813 Clone,
814 ::ethers_contract::EthCall,
815 ::ethers_contract::EthDisplay,
816 Default,
817 Debug,
818 PartialEq,
819 Eq,
820 Hash
821 )]
822 #[ethcall(name = "getApproved", abi = "getApproved(uint256)")]
823 pub struct GetApprovedCall {
824 pub token_id: ::ethers_core::types::U256,
825 }
826 #[derive(
828 Clone,
829 ::ethers_contract::EthCall,
830 ::ethers_contract::EthDisplay,
831 Default,
832 Debug,
833 PartialEq,
834 Eq,
835 Hash
836 )]
837 #[ethcall(name = "getPastTotalSupply", abi = "getPastTotalSupply(uint256)")]
838 pub struct GetPastTotalSupplyCall {
839 pub timepoint: ::ethers_core::types::U256,
840 }
841 #[derive(
843 Clone,
844 ::ethers_contract::EthCall,
845 ::ethers_contract::EthDisplay,
846 Default,
847 Debug,
848 PartialEq,
849 Eq,
850 Hash
851 )]
852 #[ethcall(name = "getPastVotes", abi = "getPastVotes(address,uint256)")]
853 pub struct GetPastVotesCall {
854 pub account: ::ethers_core::types::Address,
855 pub timepoint: ::ethers_core::types::U256,
856 }
857 #[derive(
859 Clone,
860 ::ethers_contract::EthCall,
861 ::ethers_contract::EthDisplay,
862 Default,
863 Debug,
864 PartialEq,
865 Eq,
866 Hash
867 )]
868 #[ethcall(name = "getVotes", abi = "getVotes(address)")]
869 pub struct GetVotesCall {
870 pub account: ::ethers_core::types::Address,
871 }
872 #[derive(
874 Clone,
875 ::ethers_contract::EthCall,
876 ::ethers_contract::EthDisplay,
877 Default,
878 Debug,
879 PartialEq,
880 Eq,
881 Hash
882 )]
883 #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
884 pub struct IsApprovedForAllCall {
885 pub owner: ::ethers_core::types::Address,
886 pub operator: ::ethers_core::types::Address,
887 }
888 #[derive(
890 Clone,
891 ::ethers_contract::EthCall,
892 ::ethers_contract::EthDisplay,
893 Default,
894 Debug,
895 PartialEq,
896 Eq,
897 Hash
898 )]
899 #[ethcall(name = "name", abi = "name()")]
900 pub struct NameCall;
901 #[derive(
903 Clone,
904 ::ethers_contract::EthCall,
905 ::ethers_contract::EthDisplay,
906 Default,
907 Debug,
908 PartialEq,
909 Eq,
910 Hash
911 )]
912 #[ethcall(name = "nonces", abi = "nonces(address)")]
913 pub struct NoncesCall {
914 pub owner: ::ethers_core::types::Address,
915 }
916 #[derive(
918 Clone,
919 ::ethers_contract::EthCall,
920 ::ethers_contract::EthDisplay,
921 Default,
922 Debug,
923 PartialEq,
924 Eq,
925 Hash
926 )]
927 #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")]
928 pub struct OwnerOfCall {
929 pub token_id: ::ethers_core::types::U256,
930 }
931 #[derive(
933 Clone,
934 ::ethers_contract::EthCall,
935 ::ethers_contract::EthDisplay,
936 Default,
937 Debug,
938 PartialEq,
939 Eq,
940 Hash
941 )]
942 #[ethcall(
943 name = "safeTransferFrom",
944 abi = "safeTransferFrom(address,address,uint256)"
945 )]
946 pub struct SafeTransferFromCall {
947 pub from: ::ethers_core::types::Address,
948 pub to: ::ethers_core::types::Address,
949 pub token_id: ::ethers_core::types::U256,
950 }
951 #[derive(
953 Clone,
954 ::ethers_contract::EthCall,
955 ::ethers_contract::EthDisplay,
956 Default,
957 Debug,
958 PartialEq,
959 Eq,
960 Hash
961 )]
962 #[ethcall(
963 name = "safeTransferFrom",
964 abi = "safeTransferFrom(address,address,uint256,bytes)"
965 )]
966 pub struct SafeTransferFromWithFromAndToAndDataCall {
967 pub from: ::ethers_core::types::Address,
968 pub to: ::ethers_core::types::Address,
969 pub token_id: ::ethers_core::types::U256,
970 pub data: ::ethers_core::types::Bytes,
971 }
972 #[derive(
974 Clone,
975 ::ethers_contract::EthCall,
976 ::ethers_contract::EthDisplay,
977 Default,
978 Debug,
979 PartialEq,
980 Eq,
981 Hash
982 )]
983 #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
984 pub struct SetApprovalForAllCall {
985 pub operator: ::ethers_core::types::Address,
986 pub approved: bool,
987 }
988 #[derive(
990 Clone,
991 ::ethers_contract::EthCall,
992 ::ethers_contract::EthDisplay,
993 Default,
994 Debug,
995 PartialEq,
996 Eq,
997 Hash
998 )]
999 #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
1000 pub struct SupportsInterfaceCall {
1001 pub interface_id: [u8; 4],
1002 }
1003 #[derive(
1005 Clone,
1006 ::ethers_contract::EthCall,
1007 ::ethers_contract::EthDisplay,
1008 Default,
1009 Debug,
1010 PartialEq,
1011 Eq,
1012 Hash
1013 )]
1014 #[ethcall(name = "symbol", abi = "symbol()")]
1015 pub struct SymbolCall;
1016 #[derive(
1018 Clone,
1019 ::ethers_contract::EthCall,
1020 ::ethers_contract::EthDisplay,
1021 Default,
1022 Debug,
1023 PartialEq,
1024 Eq,
1025 Hash
1026 )]
1027 #[ethcall(name = "tokenURI", abi = "tokenURI(uint256)")]
1028 pub struct TokenURICall {
1029 pub token_id: ::ethers_core::types::U256,
1030 }
1031 #[derive(
1033 Clone,
1034 ::ethers_contract::EthCall,
1035 ::ethers_contract::EthDisplay,
1036 Default,
1037 Debug,
1038 PartialEq,
1039 Eq,
1040 Hash
1041 )]
1042 #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
1043 pub struct TransferFromCall {
1044 pub from: ::ethers_core::types::Address,
1045 pub to: ::ethers_core::types::Address,
1046 pub token_id: ::ethers_core::types::U256,
1047 }
1048 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
1050 pub enum ERC721VotesCalls {
1051 ClockMode(ClockModeCall),
1052 DomainSeparator(DomainSeparatorCall),
1053 Approve(ApproveCall),
1054 BalanceOf(BalanceOfCall),
1055 Clock(ClockCall),
1056 Delegate(DelegateCall),
1057 DelegateBySig(DelegateBySigCall),
1058 Delegates(DelegatesCall),
1059 Eip712Domain(Eip712DomainCall),
1060 GetApproved(GetApprovedCall),
1061 GetPastTotalSupply(GetPastTotalSupplyCall),
1062 GetPastVotes(GetPastVotesCall),
1063 GetVotes(GetVotesCall),
1064 IsApprovedForAll(IsApprovedForAllCall),
1065 Name(NameCall),
1066 Nonces(NoncesCall),
1067 OwnerOf(OwnerOfCall),
1068 SafeTransferFrom(SafeTransferFromCall),
1069 SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall),
1070 SetApprovalForAll(SetApprovalForAllCall),
1071 SupportsInterface(SupportsInterfaceCall),
1072 Symbol(SymbolCall),
1073 TokenURI(TokenURICall),
1074 TransferFrom(TransferFromCall),
1075 }
1076 impl ::ethers_core::abi::AbiDecode for ERC721VotesCalls {
1077 fn decode(
1078 data: impl AsRef<[u8]>,
1079 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
1080 let data = data.as_ref();
1081 if let Ok(decoded)
1082 = <ClockModeCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1083 return Ok(Self::ClockMode(decoded));
1084 }
1085 if let Ok(decoded)
1086 = <DomainSeparatorCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1087 return Ok(Self::DomainSeparator(decoded));
1088 }
1089 if let Ok(decoded)
1090 = <ApproveCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1091 return Ok(Self::Approve(decoded));
1092 }
1093 if let Ok(decoded)
1094 = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1095 return Ok(Self::BalanceOf(decoded));
1096 }
1097 if let Ok(decoded)
1098 = <ClockCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1099 return Ok(Self::Clock(decoded));
1100 }
1101 if let Ok(decoded)
1102 = <DelegateCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1103 return Ok(Self::Delegate(decoded));
1104 }
1105 if let Ok(decoded)
1106 = <DelegateBySigCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1107 return Ok(Self::DelegateBySig(decoded));
1108 }
1109 if let Ok(decoded)
1110 = <DelegatesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1111 return Ok(Self::Delegates(decoded));
1112 }
1113 if let Ok(decoded)
1114 = <Eip712DomainCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1115 return Ok(Self::Eip712Domain(decoded));
1116 }
1117 if let Ok(decoded)
1118 = <GetApprovedCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1119 return Ok(Self::GetApproved(decoded));
1120 }
1121 if let Ok(decoded)
1122 = <GetPastTotalSupplyCall as ::ethers_core::abi::AbiDecode>::decode(
1123 data,
1124 ) {
1125 return Ok(Self::GetPastTotalSupply(decoded));
1126 }
1127 if let Ok(decoded)
1128 = <GetPastVotesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1129 return Ok(Self::GetPastVotes(decoded));
1130 }
1131 if let Ok(decoded)
1132 = <GetVotesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1133 return Ok(Self::GetVotes(decoded));
1134 }
1135 if let Ok(decoded)
1136 = <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1137 return Ok(Self::IsApprovedForAll(decoded));
1138 }
1139 if let Ok(decoded)
1140 = <NameCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1141 return Ok(Self::Name(decoded));
1142 }
1143 if let Ok(decoded)
1144 = <NoncesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1145 return Ok(Self::Nonces(decoded));
1146 }
1147 if let Ok(decoded)
1148 = <OwnerOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1149 return Ok(Self::OwnerOf(decoded));
1150 }
1151 if let Ok(decoded)
1152 = <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1153 return Ok(Self::SafeTransferFrom(decoded));
1154 }
1155 if let Ok(decoded)
1156 = <SafeTransferFromWithFromAndToAndDataCall as ::ethers_core::abi::AbiDecode>::decode(
1157 data,
1158 ) {
1159 return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded));
1160 }
1161 if let Ok(decoded)
1162 = <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
1163 data,
1164 ) {
1165 return Ok(Self::SetApprovalForAll(decoded));
1166 }
1167 if let Ok(decoded)
1168 = <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
1169 data,
1170 ) {
1171 return Ok(Self::SupportsInterface(decoded));
1172 }
1173 if let Ok(decoded)
1174 = <SymbolCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1175 return Ok(Self::Symbol(decoded));
1176 }
1177 if let Ok(decoded)
1178 = <TokenURICall as ::ethers_core::abi::AbiDecode>::decode(data) {
1179 return Ok(Self::TokenURI(decoded));
1180 }
1181 if let Ok(decoded)
1182 = <TransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1183 return Ok(Self::TransferFrom(decoded));
1184 }
1185 Err(::ethers_core::abi::Error::InvalidData.into())
1186 }
1187 }
1188 impl ::ethers_core::abi::AbiEncode for ERC721VotesCalls {
1189 fn encode(self) -> Vec<u8> {
1190 match self {
1191 Self::ClockMode(element) => {
1192 ::ethers_core::abi::AbiEncode::encode(element)
1193 }
1194 Self::DomainSeparator(element) => {
1195 ::ethers_core::abi::AbiEncode::encode(element)
1196 }
1197 Self::Approve(element) => ::ethers_core::abi::AbiEncode::encode(element),
1198 Self::BalanceOf(element) => {
1199 ::ethers_core::abi::AbiEncode::encode(element)
1200 }
1201 Self::Clock(element) => ::ethers_core::abi::AbiEncode::encode(element),
1202 Self::Delegate(element) => ::ethers_core::abi::AbiEncode::encode(element),
1203 Self::DelegateBySig(element) => {
1204 ::ethers_core::abi::AbiEncode::encode(element)
1205 }
1206 Self::Delegates(element) => {
1207 ::ethers_core::abi::AbiEncode::encode(element)
1208 }
1209 Self::Eip712Domain(element) => {
1210 ::ethers_core::abi::AbiEncode::encode(element)
1211 }
1212 Self::GetApproved(element) => {
1213 ::ethers_core::abi::AbiEncode::encode(element)
1214 }
1215 Self::GetPastTotalSupply(element) => {
1216 ::ethers_core::abi::AbiEncode::encode(element)
1217 }
1218 Self::GetPastVotes(element) => {
1219 ::ethers_core::abi::AbiEncode::encode(element)
1220 }
1221 Self::GetVotes(element) => ::ethers_core::abi::AbiEncode::encode(element),
1222 Self::IsApprovedForAll(element) => {
1223 ::ethers_core::abi::AbiEncode::encode(element)
1224 }
1225 Self::Name(element) => ::ethers_core::abi::AbiEncode::encode(element),
1226 Self::Nonces(element) => ::ethers_core::abi::AbiEncode::encode(element),
1227 Self::OwnerOf(element) => ::ethers_core::abi::AbiEncode::encode(element),
1228 Self::SafeTransferFrom(element) => {
1229 ::ethers_core::abi::AbiEncode::encode(element)
1230 }
1231 Self::SafeTransferFromWithFromAndToAndData(element) => {
1232 ::ethers_core::abi::AbiEncode::encode(element)
1233 }
1234 Self::SetApprovalForAll(element) => {
1235 ::ethers_core::abi::AbiEncode::encode(element)
1236 }
1237 Self::SupportsInterface(element) => {
1238 ::ethers_core::abi::AbiEncode::encode(element)
1239 }
1240 Self::Symbol(element) => ::ethers_core::abi::AbiEncode::encode(element),
1241 Self::TokenURI(element) => ::ethers_core::abi::AbiEncode::encode(element),
1242 Self::TransferFrom(element) => {
1243 ::ethers_core::abi::AbiEncode::encode(element)
1244 }
1245 }
1246 }
1247 }
1248 impl ::core::fmt::Display for ERC721VotesCalls {
1249 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1250 match self {
1251 Self::ClockMode(element) => ::core::fmt::Display::fmt(element, f),
1252 Self::DomainSeparator(element) => ::core::fmt::Display::fmt(element, f),
1253 Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
1254 Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
1255 Self::Clock(element) => ::core::fmt::Display::fmt(element, f),
1256 Self::Delegate(element) => ::core::fmt::Display::fmt(element, f),
1257 Self::DelegateBySig(element) => ::core::fmt::Display::fmt(element, f),
1258 Self::Delegates(element) => ::core::fmt::Display::fmt(element, f),
1259 Self::Eip712Domain(element) => ::core::fmt::Display::fmt(element, f),
1260 Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f),
1261 Self::GetPastTotalSupply(element) => {
1262 ::core::fmt::Display::fmt(element, f)
1263 }
1264 Self::GetPastVotes(element) => ::core::fmt::Display::fmt(element, f),
1265 Self::GetVotes(element) => ::core::fmt::Display::fmt(element, f),
1266 Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
1267 Self::Name(element) => ::core::fmt::Display::fmt(element, f),
1268 Self::Nonces(element) => ::core::fmt::Display::fmt(element, f),
1269 Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f),
1270 Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
1271 Self::SafeTransferFromWithFromAndToAndData(element) => {
1272 ::core::fmt::Display::fmt(element, f)
1273 }
1274 Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
1275 Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
1276 Self::Symbol(element) => ::core::fmt::Display::fmt(element, f),
1277 Self::TokenURI(element) => ::core::fmt::Display::fmt(element, f),
1278 Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
1279 }
1280 }
1281 }
1282 impl ::core::convert::From<ClockModeCall> for ERC721VotesCalls {
1283 fn from(value: ClockModeCall) -> Self {
1284 Self::ClockMode(value)
1285 }
1286 }
1287 impl ::core::convert::From<DomainSeparatorCall> for ERC721VotesCalls {
1288 fn from(value: DomainSeparatorCall) -> Self {
1289 Self::DomainSeparator(value)
1290 }
1291 }
1292 impl ::core::convert::From<ApproveCall> for ERC721VotesCalls {
1293 fn from(value: ApproveCall) -> Self {
1294 Self::Approve(value)
1295 }
1296 }
1297 impl ::core::convert::From<BalanceOfCall> for ERC721VotesCalls {
1298 fn from(value: BalanceOfCall) -> Self {
1299 Self::BalanceOf(value)
1300 }
1301 }
1302 impl ::core::convert::From<ClockCall> for ERC721VotesCalls {
1303 fn from(value: ClockCall) -> Self {
1304 Self::Clock(value)
1305 }
1306 }
1307 impl ::core::convert::From<DelegateCall> for ERC721VotesCalls {
1308 fn from(value: DelegateCall) -> Self {
1309 Self::Delegate(value)
1310 }
1311 }
1312 impl ::core::convert::From<DelegateBySigCall> for ERC721VotesCalls {
1313 fn from(value: DelegateBySigCall) -> Self {
1314 Self::DelegateBySig(value)
1315 }
1316 }
1317 impl ::core::convert::From<DelegatesCall> for ERC721VotesCalls {
1318 fn from(value: DelegatesCall) -> Self {
1319 Self::Delegates(value)
1320 }
1321 }
1322 impl ::core::convert::From<Eip712DomainCall> for ERC721VotesCalls {
1323 fn from(value: Eip712DomainCall) -> Self {
1324 Self::Eip712Domain(value)
1325 }
1326 }
1327 impl ::core::convert::From<GetApprovedCall> for ERC721VotesCalls {
1328 fn from(value: GetApprovedCall) -> Self {
1329 Self::GetApproved(value)
1330 }
1331 }
1332 impl ::core::convert::From<GetPastTotalSupplyCall> for ERC721VotesCalls {
1333 fn from(value: GetPastTotalSupplyCall) -> Self {
1334 Self::GetPastTotalSupply(value)
1335 }
1336 }
1337 impl ::core::convert::From<GetPastVotesCall> for ERC721VotesCalls {
1338 fn from(value: GetPastVotesCall) -> Self {
1339 Self::GetPastVotes(value)
1340 }
1341 }
1342 impl ::core::convert::From<GetVotesCall> for ERC721VotesCalls {
1343 fn from(value: GetVotesCall) -> Self {
1344 Self::GetVotes(value)
1345 }
1346 }
1347 impl ::core::convert::From<IsApprovedForAllCall> for ERC721VotesCalls {
1348 fn from(value: IsApprovedForAllCall) -> Self {
1349 Self::IsApprovedForAll(value)
1350 }
1351 }
1352 impl ::core::convert::From<NameCall> for ERC721VotesCalls {
1353 fn from(value: NameCall) -> Self {
1354 Self::Name(value)
1355 }
1356 }
1357 impl ::core::convert::From<NoncesCall> for ERC721VotesCalls {
1358 fn from(value: NoncesCall) -> Self {
1359 Self::Nonces(value)
1360 }
1361 }
1362 impl ::core::convert::From<OwnerOfCall> for ERC721VotesCalls {
1363 fn from(value: OwnerOfCall) -> Self {
1364 Self::OwnerOf(value)
1365 }
1366 }
1367 impl ::core::convert::From<SafeTransferFromCall> for ERC721VotesCalls {
1368 fn from(value: SafeTransferFromCall) -> Self {
1369 Self::SafeTransferFrom(value)
1370 }
1371 }
1372 impl ::core::convert::From<SafeTransferFromWithFromAndToAndDataCall>
1373 for ERC721VotesCalls {
1374 fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self {
1375 Self::SafeTransferFromWithFromAndToAndData(value)
1376 }
1377 }
1378 impl ::core::convert::From<SetApprovalForAllCall> for ERC721VotesCalls {
1379 fn from(value: SetApprovalForAllCall) -> Self {
1380 Self::SetApprovalForAll(value)
1381 }
1382 }
1383 impl ::core::convert::From<SupportsInterfaceCall> for ERC721VotesCalls {
1384 fn from(value: SupportsInterfaceCall) -> Self {
1385 Self::SupportsInterface(value)
1386 }
1387 }
1388 impl ::core::convert::From<SymbolCall> for ERC721VotesCalls {
1389 fn from(value: SymbolCall) -> Self {
1390 Self::Symbol(value)
1391 }
1392 }
1393 impl ::core::convert::From<TokenURICall> for ERC721VotesCalls {
1394 fn from(value: TokenURICall) -> Self {
1395 Self::TokenURI(value)
1396 }
1397 }
1398 impl ::core::convert::From<TransferFromCall> for ERC721VotesCalls {
1399 fn from(value: TransferFromCall) -> Self {
1400 Self::TransferFrom(value)
1401 }
1402 }
1403 #[derive(
1405 Clone,
1406 ::ethers_contract::EthAbiType,
1407 ::ethers_contract::EthAbiCodec,
1408 Default,
1409 Debug,
1410 PartialEq,
1411 Eq,
1412 Hash
1413 )]
1414 pub struct ClockModeReturn(pub ::std::string::String);
1415 #[derive(
1417 Clone,
1418 ::ethers_contract::EthAbiType,
1419 ::ethers_contract::EthAbiCodec,
1420 Default,
1421 Debug,
1422 PartialEq,
1423 Eq,
1424 Hash
1425 )]
1426 pub struct DomainSeparatorReturn(pub [u8; 32]);
1427 #[derive(
1429 Clone,
1430 ::ethers_contract::EthAbiType,
1431 ::ethers_contract::EthAbiCodec,
1432 Default,
1433 Debug,
1434 PartialEq,
1435 Eq,
1436 Hash
1437 )]
1438 pub struct BalanceOfReturn(pub ::ethers_core::types::U256);
1439 #[derive(
1441 Clone,
1442 ::ethers_contract::EthAbiType,
1443 ::ethers_contract::EthAbiCodec,
1444 Default,
1445 Debug,
1446 PartialEq,
1447 Eq,
1448 Hash
1449 )]
1450 pub struct ClockReturn(pub u64);
1451 #[derive(
1453 Clone,
1454 ::ethers_contract::EthAbiType,
1455 ::ethers_contract::EthAbiCodec,
1456 Default,
1457 Debug,
1458 PartialEq,
1459 Eq,
1460 Hash
1461 )]
1462 pub struct DelegatesReturn(pub ::ethers_core::types::Address);
1463 #[derive(
1465 Clone,
1466 ::ethers_contract::EthAbiType,
1467 ::ethers_contract::EthAbiCodec,
1468 Default,
1469 Debug,
1470 PartialEq,
1471 Eq,
1472 Hash
1473 )]
1474 pub struct Eip712DomainReturn {
1475 pub fields: [u8; 1],
1476 pub name: ::std::string::String,
1477 pub version: ::std::string::String,
1478 pub chain_id: ::ethers_core::types::U256,
1479 pub verifying_contract: ::ethers_core::types::Address,
1480 pub salt: [u8; 32],
1481 pub extensions: ::std::vec::Vec<::ethers_core::types::U256>,
1482 }
1483 #[derive(
1485 Clone,
1486 ::ethers_contract::EthAbiType,
1487 ::ethers_contract::EthAbiCodec,
1488 Default,
1489 Debug,
1490 PartialEq,
1491 Eq,
1492 Hash
1493 )]
1494 pub struct GetApprovedReturn(pub ::ethers_core::types::Address);
1495 #[derive(
1497 Clone,
1498 ::ethers_contract::EthAbiType,
1499 ::ethers_contract::EthAbiCodec,
1500 Default,
1501 Debug,
1502 PartialEq,
1503 Eq,
1504 Hash
1505 )]
1506 pub struct GetPastTotalSupplyReturn(pub ::ethers_core::types::U256);
1507 #[derive(
1509 Clone,
1510 ::ethers_contract::EthAbiType,
1511 ::ethers_contract::EthAbiCodec,
1512 Default,
1513 Debug,
1514 PartialEq,
1515 Eq,
1516 Hash
1517 )]
1518 pub struct GetPastVotesReturn(pub ::ethers_core::types::U256);
1519 #[derive(
1521 Clone,
1522 ::ethers_contract::EthAbiType,
1523 ::ethers_contract::EthAbiCodec,
1524 Default,
1525 Debug,
1526 PartialEq,
1527 Eq,
1528 Hash
1529 )]
1530 pub struct GetVotesReturn(pub ::ethers_core::types::U256);
1531 #[derive(
1533 Clone,
1534 ::ethers_contract::EthAbiType,
1535 ::ethers_contract::EthAbiCodec,
1536 Default,
1537 Debug,
1538 PartialEq,
1539 Eq,
1540 Hash
1541 )]
1542 pub struct IsApprovedForAllReturn(pub bool);
1543 #[derive(
1545 Clone,
1546 ::ethers_contract::EthAbiType,
1547 ::ethers_contract::EthAbiCodec,
1548 Default,
1549 Debug,
1550 PartialEq,
1551 Eq,
1552 Hash
1553 )]
1554 pub struct NameReturn(pub ::std::string::String);
1555 #[derive(
1557 Clone,
1558 ::ethers_contract::EthAbiType,
1559 ::ethers_contract::EthAbiCodec,
1560 Default,
1561 Debug,
1562 PartialEq,
1563 Eq,
1564 Hash
1565 )]
1566 pub struct NoncesReturn(pub ::ethers_core::types::U256);
1567 #[derive(
1569 Clone,
1570 ::ethers_contract::EthAbiType,
1571 ::ethers_contract::EthAbiCodec,
1572 Default,
1573 Debug,
1574 PartialEq,
1575 Eq,
1576 Hash
1577 )]
1578 pub struct OwnerOfReturn(pub ::ethers_core::types::Address);
1579 #[derive(
1581 Clone,
1582 ::ethers_contract::EthAbiType,
1583 ::ethers_contract::EthAbiCodec,
1584 Default,
1585 Debug,
1586 PartialEq,
1587 Eq,
1588 Hash
1589 )]
1590 pub struct SupportsInterfaceReturn(pub bool);
1591 #[derive(
1593 Clone,
1594 ::ethers_contract::EthAbiType,
1595 ::ethers_contract::EthAbiCodec,
1596 Default,
1597 Debug,
1598 PartialEq,
1599 Eq,
1600 Hash
1601 )]
1602 pub struct SymbolReturn(pub ::std::string::String);
1603 #[derive(
1605 Clone,
1606 ::ethers_contract::EthAbiType,
1607 ::ethers_contract::EthAbiCodec,
1608 Default,
1609 Debug,
1610 PartialEq,
1611 Eq,
1612 Hash
1613 )]
1614 pub struct TokenURIReturn(pub ::std::string::String);
1615}