neo3/neo_wallets/wallet/
nep6contract.rs1use getset::Getters;
2use serde::{Deserialize, Serialize};
3
4use neo3::prelude::ContractParameterType;
5
6#[derive(Clone, Debug, Serialize, Deserialize, Getters)]
8pub struct NEP6Contract {
9 #[getset(get = "pub")]
11 #[serde(rename = "script")]
12 pub script: Option<String>,
13
14 #[getset(get = "pub")]
16 #[serde(rename = "deployed")]
17 pub is_deployed: bool,
18
19 #[getset(get = "pub")]
21 #[serde(rename = "parameters")]
22 pub nep6_parameters: Vec<NEP6Parameter>,
23}
24
25#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Getters)]
27pub struct NEP6Parameter {
28 #[getset(get = "pub")]
30 #[serde(rename = "name")]
31 pub param_name: String,
32
33 #[getset(get = "pub")]
35 #[serde(rename = "type")]
36 pub param_type: ContractParameterType,
37}
38
39impl PartialEq for NEP6Contract {
40 fn eq(&self, other: &Self) -> bool {
52 self.script == other.script
53 && self.nep6_parameters == other.nep6_parameters
54 && self.is_deployed == other.is_deployed
55 }
56}