Skip to content

Commit

Permalink
add more conway support
Browse files Browse the repository at this point in the history
  • Loading branch information
Vardominator committed Aug 28, 2024
1 parent 3281281 commit e73e758
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/models/pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ pub struct PoolMintedBlocks {

#[derive(Deserialize, Debug, Clone)]
pub struct StakePoolDelegator {
pub active_epoch_no: i64,
pub amount: String,
pub latest_delegation_tx_hash: String,
pub stake_address: String,
Expand Down Expand Up @@ -79,7 +78,6 @@ pub struct Relay {

#[derive(Deserialize, Debug, Clone)]
pub struct StakePoolDetails {
pub active_epoch_no: i64,
pub active_stake: i64,
pub block_count: i64,
pub fixed_cost: i64,
Expand Down
1 change: 1 addition & 0 deletions src/models/scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use serde::Serialize;
pub enum ScriptVersion {
PlutusV1,
PlutusV2,
PlutusV3,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down
24 changes: 22 additions & 2 deletions src/models/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@ use super::{addresses::Utxo, scripts::Script};

#[derive(Deserialize, Debug, Clone)]
pub struct Certificates {
pub auth_committee_hot_certs: Vec<serde_json::Value>,
pub mir_transfers: Vec<serde_json::Value>,
pub pool_registrations: Vec<serde_json::Value>,
pub pool_retirements: Vec<serde_json::Value>,
pub reg_certs: Vec<serde_json::Value>,
pub reg_drep_certs: Vec<serde_json::Value>,
pub resign_committee_cold_certs: Vec<serde_json::Value>,
pub stake_delegations: Vec<serde_json::Value>,
pub stake_deregistrations: Vec<serde_json::Value>,
pub stake_registrations_reserves: Vec<serde_json::Value>,
pub stake_reg_delegations: Vec<serde_json::Value>,
pub stake_registrations: Vec<serde_json::Value>,
pub stake_vote_delegations: Vec<serde_json::Value>,
pub stake_vote_reg_delegations: Vec<serde_json::Value>,
pub unreg_certs: Vec<serde_json::Value>,
pub unreg_drep_certs: Vec<serde_json::Value>,
pub update_drep_certs: Vec<serde_json::Value>,
pub vote_delegations: Vec<serde_json::Value>,
pub vote_reg_delegations: Vec<serde_json::Value>,
}

#[derive(Deserialize, Debug, Clone)]
Expand All @@ -19,6 +31,14 @@ pub struct Redeemers {
pub mints: Vec<serde_json::Value>,
pub spends: Vec<serde_json::Value>,
pub withdrawals: Vec<serde_json::Value>,
pub votes: Vec<serde_json::Value>,
pub proposals: Vec<serde_json::Value>,
}

#[derive(Deserialize, Debug, Clone)]
pub struct MintAsset {
pub unit: String,
pub amount: serde_json::Value,
}

#[derive(Deserialize, Debug, Clone)]
Expand All @@ -38,7 +58,7 @@ pub struct TransactionDetail {
pub invalid_before: i64,
pub invalid_hereafter: i64,
pub metadata: serde_json::Value,
pub mint: Vec<serde_json::Value>,
pub mint: Vec<MintAsset>,
pub outputs: Vec<Utxo>,
pub redeemers: Vec<Redeemers>,
pub reference_inputs: Vec<serde_json::Value>,
Expand Down

0 comments on commit e73e758

Please sign in to comment.