16 lines
484 B
Plaintext
16 lines
484 B
Plaintext
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): list(rbx_tuple) =
|
|
Map.lookup(name, state)
|