This commit is contained in:
Peter Harpending
2026-09-21 17:12:53 -07:00
parent c23eed3a4d
commit fcd61c122e
11 changed files with 234 additions and 90 deletions
+19
View File
@@ -0,0 +1,19 @@
contract interface Rubicon =
entrypoint lookup: () => list(string * int * string * string * address * bytes)
contract Names =
type rbx_tuple = string * int * string * string * address * bytes
type state = map(string, Rubicon)
entrypoint init(): state =
{}
stateful entrypoint register(name: string, addr: Rubicon): unit =
put(state{[name] = addr})
stateful entrypoint lookup(name: string): option(list(rbx_tuple)) =
switch(Map.lookup(name, state))
Some(addr) =>
Some(addr.lookup())
None =>
None