Skip to content

Instantly share code, notes, and snippets.

View tbinetruy's full-sized avatar

Thomas Binétruy-Pic tbinetruy

View GitHub Profile
let generate_id_from_addr (p: address) : bytes = Crypto.sha256 (Bytes.pack p)
let require (cond: bool) (msg: string) : unit = if cond then () else failwith(msg)
type registrar_storage_t = nat
type constructor_t = address set * nat
let constructor (p: constructor_t) (s: registrar_storage_t) : registrar_storage_t =
let owners = p.0 in
let threshold = p.1 in
let check1 = require (threshold > 0n) "Threshold should be greater than 0." in
### Keybase proof
I hereby claim:
* I am tbinetruy on github.
* I am tbinetruy (https://keybase.io/tbinetruy) on keybase.
* I have a public key ASC2wmUbMLbTLdo4MBm6PcamttykFa03zh0sPkQ5zCzyvgo
To claim this, I am signing this object: