Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more fields to AssetInfo type #68

Merged
merged 9 commits into from
Aug 19, 2024
Prev Previous commit
Next Next commit
feat: export EraBoundTime, EpochSlotLength and change cost model …
…representation to `[Int64]` from `[Natural]`
sourabhxyz committed Aug 19, 2024
commit 16c57ff2b6e8c8812a07f8f0b96c122c42cf286a
5 changes: 4 additions & 1 deletion src/Maestro/Types/V1/General.hs
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ module Maestro.Types.V1.General
, EraSummary (..)
, EraParameters (..)
, EraBound (..)
, EraBoundTime (..)
, EpochSlotLength (..)
-- * Types for @/protocol-parameters@ endpoint
, ProtocolVersion (..)
, MemoryCpuWith (..)
@@ -26,6 +28,7 @@ module Maestro.Types.V1.General
import Control.Monad (unless, when)
import Data.Aeson (FromJSON (parseJSON), toEncoding,
toJSON, withText)
import Data.Int (Int64)
import Data.Ratio (denominator, numerator, (%))
import Data.Text (Text)
import qualified Data.Text as Txt
@@ -171,7 +174,7 @@ data MemoryCpuWith i = MemoryCpuWith
deriving (FromJSON, ToJSON) via CustomJSON '[FieldLabelModifier '[StripPrefix "memoryCpuWith", LowerFirst]] (MemoryCpuWith i)

-- | A cost model is a vector of coefficients that are used to compute the execution units required to execute a script. Its specifics depend on specific versions of the Plutus interpreter it is used with.
newtype CostModel = CostModel [Natural]
newtype CostModel = CostModel [Int64]
deriving (Eq, Show)
deriving newtype (ToJSON, FromJSON)