Signed Integer | IntX (Where X can be 32, 64, 128, or 256)
eg. Int32
| field a: Option Int32 = None {Int32}
| field a: Int32 = Int32 5
| a = Int32 5
| let a = Int32 5
|
---|
Unsigned Integer | UintX (Where X can be 32, 64, 128, or 256)
eg. Uint32
| field a: Option Uint32 = None {Uint32}
| field a: Uint32 = Uint32 5
| a = Uint32 5
| let a = Uint32 5
|
---|
String | String
| field a: String = ""
| field a: String = "hello"
| a = "hello"
| let a = "xyz"
|
---|
Hash | ByStr32
| field a: Option ByStr32 = None {ByStr32}
| field a: ByStr32 = 0x1234...0abff
| a = 0x1234...0abff
| let a = 0x1234...0abff
|
---|
Address | ByStr20
| field a: Option ByStr20 = None {ByStr20}
| field a: ByStr20 = 0x1234...0abff
| a = 0x1234...0abff
| let a = 0x1234...0abff
|
---|
Block Number | BNum
| field a: Option BNum = None {BNum}
| field a: BNum = BNum 5
| a = BNum 5
| let a = BNum 5
|
---|
Boolean | Bool
| field a: Option Bool = None {Bool}
| field a: Bool = True
| a = True
| let a = True
|
---|
List | List
| field a: List(Int32) = Nil {Int32}
| field a: List(Int32) = let b = Nil {Int32} in
let c = Int32 5 in
Cons {Int32} c b
| a = Nil {Int32}
| let a = Nil {Int32}
|
---|
Pair | Pair (FieldType1) (Fieldtype2)
| field a: Pair (String) (Option Uint32) =
let b = "" in
let c = None {Uint32} in
Pair {(String) (Option Uint32)} b c
| field a: Pair (String) (Uint32) =
let b = "Hello" in
let c = {Uint32} 5 in
Pair {(String) (Uint32)} b c
| a = let b = "Hello" in
let c = {Uint32} 5 in
Pair {(String) (Uint32)} b c
| let a = let b= "Hello" in
let c = {Uint32} 5 in
Pair {(String) (Uint32)} b c
|
---|
Map | Map FieldType1(Key) FieldType2(Value)
Keys can have the following types:
IntX
UintX
String
ByStr32
ByStr20 Values can be of any type. | field a: Map FieldType1 FieldType2
= Emp FieldType1 FieldType2
| field a: Map ByStr20 String = let b = Emp ByStr20 String in
let c = 0x1234...0abff in
let d = ""Hello"" in
builtin put b c d "
| a = let b = Emp ByStr20 String in
let c = 0x1234...0abff in
let d = ""Hello"" in
builtin put b c d "
| let a = let b = Emp ByStr20 String in
let c = 0x1234...0abff in
let d = ""Hello"" in
builtin put b c d "
|
---|