I'm having the following sample contract, where I'm trying to pass the record
value as a parameter and also want to pass empty map
as storage; can someone help me?
type string_rec = {
a : string;
b : string
}
type parameter =
Add of string_rec
| Get of string_rec
type storage = (string, string_rec) map
type return = operation list * storage
let add (store, k : storage * string_rec) : storage =
Map.add("abc" : string) (k) store
let get (store, k : storage * string_rec) : storage =
Map.add("abc" : string) (k) store
let main (action, store : parameter * storage) : return =
([] : operation list),
(match action with
Add n -> add (store, n)
| Get n -> get (store, n))