use getset::Getters;
use serde::{Deserialize, Serialize};
use neo3::prelude::ContractParameterType;
#[derive(Clone, Debug, Serialize, Deserialize, Getters)]
pub struct NEP6Contract {
#[getset(get = "pub")]
#[serde(rename = "script")]
pub script: Option<String>,
#[getset(get = "pub")]
#[serde(rename = "deployed")]
pub is_deployed: bool,
#[getset(get = "pub")]
#[serde(rename = "parameters")]
pub nep6_parameters: Vec<NEP6Parameter>,
}
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Getters)]
pub struct NEP6Parameter {
#[getset(get = "pub")]
#[serde(rename = "name")]
pub param_name: String,
#[getset(get = "pub")]
#[serde(rename = "type")]
pub param_type: ContractParameterType,
}
impl PartialEq for NEP6Contract {
fn eq(&self, other: &Self) -> bool {
self.script == other.script
&& self.nep6_parameters == other.nep6_parameters
&& self.is_deployed == other.is_deployed
}
}