File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ module BotPlutusInterface.Types (
2121 SpendBudgets ,
2222 MintBudgets ,
2323 ContractStats (.. ),
24- emptyStats ,
2524 addBudget ,
2625) where
2726
@@ -108,14 +107,6 @@ data TxFile
108107 | -- | for using with ".signed" files
109108 Signed ! FilePath
110109
111- -- TODO; maybe, Monoid instance could be handy later
112- emptyStats :: ContractStats
113- emptyStats = ContractStats mempty
114-
115- addBudget :: TxId -> TxBudget -> ContractStats -> ContractStats
116- addBudget txId budget stats =
117- stats {estimatedBudgets = Map. insert txId budget (estimatedBudgets stats)}
118-
119110-- | Result of budget estimation
120111data TxBudget = TxBudget
121112 { -- | budgets for spending inputs
@@ -125,6 +116,11 @@ data TxBudget = TxBudget
125116 }
126117 deriving stock (Show )
127118
119+ addBudget :: TxId -> TxBudget -> ContractStats -> ContractStats
120+ addBudget txId budget stats =
121+ stats {estimatedBudgets = Map. insert txId budget (estimatedBudgets stats)}
122+
123+
128124instance Semigroup TxBudget where
129125 TxBudget s m <> TxBudget s' m' = TxBudget (s <> s') (m <> m')
130126
You can’t perform that action at this time.
0 commit comments