2020-02-10 19:27:58 +01:00
|
|
|
function id_string (const p : string) : option (string) is block {
|
2020-02-27 19:09:14 +01:00
|
|
|
const packed : bytes = Bytes.pack (p)
|
|
|
|
} with (Bytes.unpack (packed) : option (string))
|
2020-01-02 16:19:21 +01:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function id_int (const p : int) : option (int) is block {
|
2020-02-27 19:09:14 +01:00
|
|
|
const packed : bytes = Bytes.pack (p)
|
|
|
|
} with (Bytes.unpack (packed) : option (int))
|
2020-01-02 16:19:21 +01:00
|
|
|
|
2020-02-10 19:27:58 +01:00
|
|
|
function id_address (const p : address) : option (address) is block {
|
2020-02-27 19:09:14 +01:00
|
|
|
const packed : bytes = Bytes.pack (p)
|
|
|
|
} with (Bytes.unpack (packed) : option (address))
|