Skip to content

Commit

Permalink
use Tx instead of Reader
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Jan 17, 2025
1 parent dd6b74e commit c42ecb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Applib/Helpers.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ emptyTx : BaseLayer.Transaction :=
--- @return The transaction object.
prepareStandardTransaction
{M : Type -> Type}
{{Reader StandardInputs M}}
{{Tx M}}
{{Monad M}}
(consumed created : List Resource)
{app-data : Nat := 0}
: M BaseLayer.Transaction :=
do {
si <- ask;
si <- getStandardInputs;
pure
mkTransactionHelper@{
roots := [StandardInputs.currentRoot si];
Expand Down
3 changes: 2 additions & 1 deletion Applib/Trait/Tx.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ end;
open Private using {StandardTx} public;

--- Run the transaction builder
runTx (seed : Nat) (si : StandardInputs) : StandardTx Transaction -> Transaction :=
runTx
(seed : Nat) (si : StandardInputs) : StandardTx Transaction -> Transaction :=
evalState (mkPrng seed) >> runReader si >> Mtl.run;

0 comments on commit c42ecb8

Please sign in to comment.