Skip to content

Commit a3ad573

Browse files
authored
Module submission helpers (#95)
- Adds the `moduleSubmissionTransaction` function which creates a transaction for submitting modules.
1 parent 0904b09 commit a3ad573

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Applib/Helpers.juvix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,14 @@ fromResult
106106
case result of
107107
| ok data := data
108108
| error err := failwith (Show.show err);
109+
110+
modulesAppData (modules : List Nat) : AppData :=
111+
Map.fromList [RawTag.fromNat 0, map (AnomaAtom.fromNat) modules]
112+
|> AppData.fromMap;
113+
114+
moduleSubmissionTransaction
115+
{M : Type -> Type}
116+
{{Tx M}}
117+
{{Monad M}}
118+
(modules : List Nat)
119+
: M Transaction := prepareStandardTransaction [] [] (modulesAppData modules);

juvix.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Do not edit this file manually.
33

44
version: 2
5-
checksum: fdae04b8525adca1be7ebefbdfd1c08a8e4e855df1059cfbcae37f731c88a1d1
5+
checksum: 2404b847a6ab80e90e31ffa933a0abdd98d3b35458f523ec157a7c6d15ffa6f9
66
dependencies:
77
- git:
88
name: anoma_juvix-stdlib

0 commit comments

Comments
 (0)