Skip to content

Commit

Permalink
api: add redeemerCount field to Transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
sorki committed Oct 11, 2021
1 parent 39183be commit 6fe49c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions blockfrost-api/CHANGELOG.md
Expand Up @@ -2,6 +2,7 @@

* Alonzo additions
* `collateral` field to `UtxoInput`
* `redeemerCount` field to `Transaction`

# Version [0.1.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/initial...0.1.0.0) (2021-09-14)

Expand Down
2 changes: 2 additions & 0 deletions blockfrost-api/src/Blockfrost/Types/Cardano/Transactions.hs
Expand Up @@ -47,6 +47,7 @@ data Transaction = Transaction
, _transactionPoolUpdateCount :: Integer -- ^ Count of the stake pool registration and update certificates within the transaction
, _transactionPoolRetireCount :: Integer -- ^ Count of the stake pool retirement certificates within the transaction
, _transactionAssetMintOrBurnCount :: Integer -- ^ Count of asset mints and burns within the transaction
, _transactionRedeemerCount :: Integer -- ^ Count of redeemers within the transaction
}
deriving stock (Show, Eq, Generic)
deriving (FromJSON, ToJSON)
Expand Down Expand Up @@ -74,6 +75,7 @@ instance ToSample Transaction where
, _transactionPoolUpdateCount = 0
, _transactionPoolRetireCount = 0
, _transactionAssetMintOrBurnCount = 0
, _transactionRedeemerCount = 0
}

-- | Transaction input UTxO
Expand Down
4 changes: 3 additions & 1 deletion blockfrost-api/test/Cardano/Transactions.hs
Expand Up @@ -96,7 +96,8 @@ transactionSample = [r|
"stake_cert_count": 0,
"pool_update_count": 0,
"pool_retire_count": 0,
"asset_mint_or_burn_count": 0
"asset_mint_or_burn_count": 0,
"redeemer_count": 0
}
|]

Expand Down Expand Up @@ -131,6 +132,7 @@ transactionExpected =
, _transactionPoolUpdateCount = 0
, _transactionPoolRetireCount = 0
, _transactionAssetMintOrBurnCount = 0
, _transactionRedeemerCount = 0
}

transactionUtxosSample = [r|
Expand Down

0 comments on commit 6fe49c0

Please sign in to comment.