Skip to main content

blockfrost_openapi/models/
proposal_parameters.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct ProposalParameters {
6    /// Governance Action Identifier (CIP-0129)
7    #[serde(rename = "id")]
8    pub id: String,
9    /// Off-chain metadata of a proposal with a specific transaction hash
10    #[serde(rename = "tx_hash")]
11    pub tx_hash: String,
12    /// Off-chain metadata of a proposal with a specific transaction cert_index
13    #[serde(rename = "cert_index")]
14    pub cert_index: i32,
15    #[serde(rename = "parameters")]
16    pub parameters: Box<models::ProposalParametersParameters>,
17}
18
19impl ProposalParameters {
20    pub fn new(id: String, tx_hash: String, cert_index: i32, parameters: models::ProposalParametersParameters) -> ProposalParameters {
21        ProposalParameters {
22            id,
23            tx_hash,
24            cert_index,
25            parameters: Box::new(parameters),
26        }
27    }
28}
29