neo3/neo_protocol/responses/
express_contract_state.rs

1use primitive_types::H160;
2use serde::{Deserialize, Serialize};
3
4use neo3::prelude::{deserialize_script_hash, serialize_script_hash, ContractManifest, ScriptHash};
5
6#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Hash)]
7pub struct ExpressContractState {
8	#[serde(serialize_with = "serialize_script_hash")]
9	#[serde(deserialize_with = "deserialize_script_hash")]
10	pub hash: ScriptHash,
11	pub manifest: ContractManifest,
12}
13
14impl ExpressContractState {
15	pub fn new(hash: H160, manifest: ContractManifest) -> Self {
16		Self { hash, manifest }
17	}
18}
19
20// PartialEq is now derived