niftygate_bindings/openzeppelin/contracts_upgradeable/generated/
i_compound_timelock_upgradeable.rs

1#[allow(dead_code)]
2pub mod i_compound_timelock_upgradeable {
3  # [rustfmt :: skip] use ethcontract as ethcontract ;
4  #[doc = "Generated by `ethcontract`"]
5  #[derive(Clone)]
6  pub struct Contract {
7    methods: Methods,
8  }
9  impl Contract {
10    #[doc = r" Retrieves the raw contract instance used to generate the type safe"]
11    #[doc = r" API for this contract."]
12    pub fn raw_contract() -> &'static self::ethcontract::Contract {
13      use self::ethcontract::common::artifact::truffle::TruffleLoader;
14      use self::ethcontract::private::lazy_static;
15      use self::ethcontract::Contract;
16      lazy_static! {
17        pub static ref CONTRACT: Contract = {
18          # [allow (unused_mut)] let mut contract = TruffleLoader :: new () . load_contract_from_str ("{\"contractName\":\"ICompoundTimelockUpgradeable\",\"abi\":[{\"type\":\"function\",\"name\":\"admin\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"constant\":false,\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MINIMUM_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"constant\":false,\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingAdmin\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"constant\":false,\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MAXIMUM_DELAY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"constant\":false,\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelTransaction\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"signature\",\"type\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"eta\",\"type\":\"uint256\"}],\"outputs\":[],\"constant\":false,\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"acceptAdmin\",\"inputs\":[],\"outputs\":[],\"constant\":false,\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"GRACE_PERIOD\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"constant\":false,\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"constant\":false,\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"executeTransaction\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"signature\",\"type\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"eta\",\"type\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\"}],\"constant\":false,\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"queuedTransactions\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"constant\":false,\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setDelay\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"outputs\":[],\"constant\":false,\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"queueTransaction\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"signature\",\"type\":\"string\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"eta\",\"type\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"constant\":false,\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPendingAdmin\",\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"outputs\":[],\"constant\":false,\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\"}],\"bytecode\":\"\",\"networks\":{},\"devdoc\":{\"details\":null,\"methods\":{}},\"userdoc\":{\"details\":null,\"methods\":{}}}") . expect ("valid contract JSON") ;
19          contract
20        };
21      }
22      &CONTRACT
23    }
24    #[doc = r" Creates a new contract instance with the specified `web3`"]
25    #[doc = r" provider at the given `Address`."]
26    #[doc = r""]
27    #[doc = r" Note that this does not verify that a contract with a matching"]
28    #[doc = r" `Abi` is actually deployed at the given address."]
29    pub fn at<F, B, T>(
30      web3: &self::ethcontract::web3::api::Web3<T>,
31      address: self::ethcontract::Address,
32    ) -> Self
33    where
34      F: std::future::Future<
35          Output = Result<self::ethcontract::json::Value, self::ethcontract::web3::Error>,
36        > + Send
37        + 'static,
38      B: std::future::Future<
39          Output = Result<
40            Vec<Result<self::ethcontract::json::Value, self::ethcontract::web3::Error>>,
41            self::ethcontract::web3::Error,
42          >,
43        > + Send
44        + 'static,
45      T: self::ethcontract::web3::Transport<Out = F>
46        + self::ethcontract::web3::BatchTransport<Batch = B>
47        + Send
48        + Sync
49        + 'static,
50    {
51      Contract::with_deployment_info(web3, address, None)
52    }
53    #[doc = r" Creates a new contract instance with the specified `web3` provider with"]
54    #[doc = r" the given `Abi` at the given `Address` and an optional transaction hash."]
55    #[doc = r" This hash is used to retrieve contract related information such as the"]
56    #[doc = r" creation block (which is useful for fetching all historic events)."]
57    #[doc = r""]
58    #[doc = r" Note that this does not verify that a contract with a matching `Abi` is"]
59    #[doc = r" actually deployed at the given address nor that the transaction hash,"]
60    #[doc = r" when provided, is actually for this contract deployment."]
61    pub fn with_deployment_info<F, B, T>(
62      web3: &self::ethcontract::web3::api::Web3<T>,
63      address: self::ethcontract::Address,
64      deployment_information: Option<ethcontract::common::DeploymentInformation>,
65    ) -> Self
66    where
67      F: std::future::Future<
68          Output = Result<self::ethcontract::json::Value, self::ethcontract::web3::Error>,
69        > + Send
70        + 'static,
71      B: std::future::Future<
72          Output = Result<
73            Vec<Result<self::ethcontract::json::Value, self::ethcontract::web3::Error>>,
74            self::ethcontract::web3::Error,
75          >,
76        > + Send
77        + 'static,
78      T: self::ethcontract::web3::Transport<Out = F>
79        + self::ethcontract::web3::BatchTransport<Batch = B>
80        + Send
81        + Sync
82        + 'static,
83    {
84      use self::ethcontract::transport::DynTransport;
85      use self::ethcontract::web3::api::Web3;
86      use self::ethcontract::Instance;
87      let transport = DynTransport::new(web3.transport().clone());
88      let web3 = Web3::new(transport);
89      let abi = Self::raw_contract().abi.clone();
90      let instance = Instance::with_deployment_info(web3, abi, address, deployment_information);
91      Contract::from_raw(instance)
92    }
93    #[doc = r" Creates a contract from a raw instance."]
94    fn from_raw(instance: self::ethcontract::dyns::DynInstance) -> Self {
95      let methods = Methods { instance };
96      Contract { methods }
97    }
98    #[doc = r" Returns the contract address being used by this instance."]
99    pub fn address(&self) -> self::ethcontract::Address {
100      self.raw_instance().address()
101    }
102    #[doc = r" Returns the deployment information of the contract"]
103    #[doc = r" if it is known, `None` otherwise."]
104    pub fn deployment_information(&self) -> Option<ethcontract::common::DeploymentInformation> {
105      self.raw_instance().deployment_information()
106    }
107    #[doc = r" Returns a reference to the default method options used by this"]
108    #[doc = r" contract."]
109    pub fn defaults(&self) -> &self::ethcontract::contract::MethodDefaults {
110      &self.raw_instance().defaults
111    }
112    #[doc = r" Returns a mutable reference to the default method options used"]
113    #[doc = r" by this contract."]
114    pub fn defaults_mut(&mut self) -> &mut self::ethcontract::contract::MethodDefaults {
115      &mut self.raw_instance_mut().defaults
116    }
117    #[doc = r" Returns a reference to the raw runtime instance used by this"]
118    #[doc = r" contract."]
119    pub fn raw_instance(&self) -> &self::ethcontract::dyns::DynInstance {
120      &self.methods.instance
121    }
122    #[doc = r" Returns a mutable reference to the raw runtime instance used by"]
123    #[doc = r" this contract."]
124    fn raw_instance_mut(&mut self) -> &mut self::ethcontract::dyns::DynInstance {
125      &mut self.methods.instance
126    }
127  }
128  impl std::fmt::Debug for Contract {
129    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
130      f.debug_tuple(stringify!(ICompoundTimelockUpgradeable))
131        .field(&self.address())
132        .finish()
133    }
134  }
135  impl Contract {
136    #[doc = r" Returns an object that allows accessing typed method signatures."]
137    pub fn signatures() -> Signatures {
138      Signatures
139    }
140    #[doc = r" Retrieves a reference to type containing all the generated"]
141    #[doc = r" contract methods. This can be used for methods where the name"]
142    #[doc = r" would collide with a common method (like `at` or `deployed`)."]
143    pub fn methods(&self) -> &Methods {
144      &self.methods
145    }
146  }
147  #[doc = r" Type containing signatures for all methods for generated contract type."]
148  #[derive(Clone, Copy)]
149  pub struct Signatures;
150  impl Signatures {
151    #[doc = "Returns signature for method `admin():(address)`."]
152    #[allow(clippy::type_complexity)]
153    pub fn admin(&self) -> self::ethcontract::contract::Signature<(), self::ethcontract::Address> {
154      self::ethcontract::contract::Signature::new([248, 81, 164, 64])
155    }
156    #[doc = "Returns signature for method `MINIMUM_DELAY():(uint256)`."]
157    #[allow(clippy::type_complexity)]
158    pub fn minimum_delay(
159      &self,
160    ) -> self::ethcontract::contract::Signature<(), self::ethcontract::U256> {
161      self::ethcontract::contract::Signature::new([177, 180, 58, 229])
162    }
163    #[doc = "Returns signature for method `pendingAdmin():(address)`."]
164    #[allow(clippy::type_complexity)]
165    pub fn pending_admin(
166      &self,
167    ) -> self::ethcontract::contract::Signature<(), self::ethcontract::Address> {
168      self::ethcontract::contract::Signature::new([38, 120, 34, 71])
169    }
170    #[doc = "Returns signature for method `MAXIMUM_DELAY():(uint256)`."]
171    #[allow(clippy::type_complexity)]
172    pub fn maximum_delay(
173      &self,
174    ) -> self::ethcontract::contract::Signature<(), self::ethcontract::U256> {
175      self::ethcontract::contract::Signature::new([125, 100, 95, 171])
176    }
177    #[doc = "Returns signature for method `cancelTransaction(address,uint256,string,bytes,uint256)`."]
178    #[allow(clippy::type_complexity)]
179    pub fn cancel_transaction(
180      &self,
181    ) -> self::ethcontract::contract::Signature<
182      (
183        self::ethcontract::Address,
184        self::ethcontract::U256,
185        String,
186        self::ethcontract::tokens::Bytes<Vec<u8>>,
187        self::ethcontract::U256,
188      ),
189      (),
190    > {
191      self::ethcontract::contract::Signature::new([89, 31, 205, 254])
192    }
193    #[doc = "Returns signature for method `acceptAdmin()`."]
194    #[allow(clippy::type_complexity)]
195    pub fn accept_admin(&self) -> self::ethcontract::contract::Signature<(), ()> {
196      self::ethcontract::contract::Signature::new([14, 24, 182, 129])
197    }
198    #[doc = "Returns signature for method `GRACE_PERIOD():(uint256)`."]
199    #[allow(clippy::type_complexity)]
200    pub fn grace_period(
201      &self,
202    ) -> self::ethcontract::contract::Signature<(), self::ethcontract::U256> {
203      self::ethcontract::contract::Signature::new([193, 162, 135, 226])
204    }
205    #[doc = "Returns signature for method `delay():(uint256)`."]
206    #[allow(clippy::type_complexity)]
207    pub fn delay(&self) -> self::ethcontract::contract::Signature<(), self::ethcontract::U256> {
208      self::ethcontract::contract::Signature::new([106, 66, 184, 248])
209    }
210    #[doc = "Returns signature for method `executeTransaction(address,uint256,string,bytes,uint256):(bytes)`."]
211    #[allow(clippy::type_complexity)]
212    pub fn execute_transaction(
213      &self,
214    ) -> self::ethcontract::contract::Signature<
215      (
216        self::ethcontract::Address,
217        self::ethcontract::U256,
218        String,
219        self::ethcontract::tokens::Bytes<Vec<u8>>,
220        self::ethcontract::U256,
221      ),
222      self::ethcontract::tokens::Bytes<Vec<u8>>,
223    > {
224      self::ethcontract::contract::Signature::new([8, 37, 243, 143])
225    }
226    #[doc = "Returns signature for method `queuedTransactions(bytes32):(bool)`."]
227    #[allow(clippy::type_complexity)]
228    pub fn queued_transactions(
229      &self,
230    ) -> self::ethcontract::contract::Signature<(self::ethcontract::tokens::Bytes<[u8; 32]>,), bool>
231    {
232      self::ethcontract::contract::Signature::new([242, 176, 101, 55])
233    }
234    #[doc = "Returns signature for method `setDelay(uint256)`."]
235    #[allow(clippy::type_complexity)]
236    pub fn set_delay(
237      &self,
238    ) -> self::ethcontract::contract::Signature<(self::ethcontract::U256,), ()> {
239      self::ethcontract::contract::Signature::new([225, 119, 36, 110])
240    }
241    #[doc = "Returns signature for method `queueTransaction(address,uint256,string,bytes,uint256):(bytes32)`."]
242    #[allow(clippy::type_complexity)]
243    pub fn queue_transaction(
244      &self,
245    ) -> self::ethcontract::contract::Signature<
246      (
247        self::ethcontract::Address,
248        self::ethcontract::U256,
249        String,
250        self::ethcontract::tokens::Bytes<Vec<u8>>,
251        self::ethcontract::U256,
252      ),
253      self::ethcontract::tokens::Bytes<[u8; 32]>,
254    > {
255      self::ethcontract::contract::Signature::new([58, 102, 249, 1])
256    }
257    #[doc = "Returns signature for method `setPendingAdmin(address)`."]
258    #[allow(clippy::type_complexity)]
259    pub fn set_pending_admin(
260      &self,
261    ) -> self::ethcontract::contract::Signature<(self::ethcontract::Address,), ()> {
262      self::ethcontract::contract::Signature::new([77, 209, 139, 245])
263    }
264  }
265  #[doc = r" Type containing all contract methods for generated contract type."]
266  #[derive(Clone)]
267  pub struct Methods {
268    instance: self::ethcontract::dyns::DynInstance,
269  }
270  #[allow(clippy::too_many_arguments, clippy::type_complexity)]
271  impl Methods {
272    #[doc = "Generated by `ethcontract`"]
273    pub fn admin(
274      &self,
275    ) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::Address> {
276      self
277        .instance
278        .view_method([248, 81, 164, 64], ())
279        .expect("generated call")
280    }
281    #[doc = "Generated by `ethcontract`"]
282    pub fn minimum_delay(
283      &self,
284    ) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::U256> {
285      self
286        .instance
287        .view_method([177, 180, 58, 229], ())
288        .expect("generated call")
289    }
290    #[doc = "Generated by `ethcontract`"]
291    pub fn pending_admin(
292      &self,
293    ) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::Address> {
294      self
295        .instance
296        .view_method([38, 120, 34, 71], ())
297        .expect("generated call")
298    }
299    #[doc = "Generated by `ethcontract`"]
300    pub fn maximum_delay(
301      &self,
302    ) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::U256> {
303      self
304        .instance
305        .view_method([125, 100, 95, 171], ())
306        .expect("generated call")
307    }
308    #[doc = "Generated by `ethcontract`"]
309    pub fn cancel_transaction(
310      &self,
311      target: self::ethcontract::Address,
312      value: self::ethcontract::U256,
313      signature: String,
314      data: self::ethcontract::tokens::Bytes<Vec<u8>>,
315      eta: self::ethcontract::U256,
316    ) -> self::ethcontract::dyns::DynMethodBuilder<()> {
317      self
318        .instance
319        .method([89, 31, 205, 254], (target, value, signature, data, eta))
320        .expect("generated call")
321    }
322    #[doc = "Generated by `ethcontract`"]
323    pub fn accept_admin(&self) -> self::ethcontract::dyns::DynMethodBuilder<()> {
324      self
325        .instance
326        .method([14, 24, 182, 129], ())
327        .expect("generated call")
328    }
329    #[doc = "Generated by `ethcontract`"]
330    pub fn grace_period(
331      &self,
332    ) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::U256> {
333      self
334        .instance
335        .view_method([193, 162, 135, 226], ())
336        .expect("generated call")
337    }
338    #[doc = "Generated by `ethcontract`"]
339    pub fn delay(&self) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::U256> {
340      self
341        .instance
342        .view_method([106, 66, 184, 248], ())
343        .expect("generated call")
344    }
345    #[doc = "Generated by `ethcontract`"]
346    pub fn execute_transaction(
347      &self,
348      target: self::ethcontract::Address,
349      value: self::ethcontract::U256,
350      signature: String,
351      data: self::ethcontract::tokens::Bytes<Vec<u8>>,
352      eta: self::ethcontract::U256,
353    ) -> self::ethcontract::dyns::DynMethodBuilder<self::ethcontract::tokens::Bytes<Vec<u8>>> {
354      self
355        .instance
356        .method([8, 37, 243, 143], (target, value, signature, data, eta))
357        .expect("generated call")
358    }
359    #[doc = "Generated by `ethcontract`"]
360    pub fn queued_transactions(
361      &self,
362      p0: self::ethcontract::tokens::Bytes<[u8; 32]>,
363    ) -> self::ethcontract::dyns::DynViewMethodBuilder<bool> {
364      self
365        .instance
366        .view_method([242, 176, 101, 55], (p0,))
367        .expect("generated call")
368    }
369    #[doc = "Generated by `ethcontract`"]
370    pub fn set_delay(
371      &self,
372      p0: self::ethcontract::U256,
373    ) -> self::ethcontract::dyns::DynMethodBuilder<()> {
374      self
375        .instance
376        .method([225, 119, 36, 110], (p0,))
377        .expect("generated call")
378    }
379    #[doc = "Generated by `ethcontract`"]
380    pub fn queue_transaction(
381      &self,
382      target: self::ethcontract::Address,
383      value: self::ethcontract::U256,
384      signature: String,
385      data: self::ethcontract::tokens::Bytes<Vec<u8>>,
386      eta: self::ethcontract::U256,
387    ) -> self::ethcontract::dyns::DynMethodBuilder<self::ethcontract::tokens::Bytes<[u8; 32]>> {
388      self
389        .instance
390        .method([58, 102, 249, 1], (target, value, signature, data, eta))
391        .expect("generated call")
392    }
393    #[doc = "Generated by `ethcontract`"]
394    pub fn set_pending_admin(
395      &self,
396      p0: self::ethcontract::Address,
397    ) -> self::ethcontract::dyns::DynMethodBuilder<()> {
398      self
399        .instance
400        .method([77, 209, 139, 245], (p0,))
401        .expect("generated call")
402    }
403  }
404  impl std::ops::Deref for Contract {
405    type Target = Methods;
406    fn deref(&self) -> &Self::Target {
407      &self.methods
408    }
409  }
410  impl Contract {
411    #[doc = r" Returns a method builder to setup a call to a smart"]
412    #[doc = r" contract's fallback function."]
413    pub fn fallback<D>(&self, data: D) -> self::ethcontract::dyns::DynMethodBuilder<()>
414    where
415      D: Into<Vec<u8>>,
416    {
417      self
418        .raw_instance()
419        .fallback(data)
420        .expect("generated fallback method")
421    }
422  }
423}
424pub use self::i_compound_timelock_upgradeable::Contract as ICompoundTimelockUpgradeable;