@@ -12,6 +12,7 @@ local initialize = {}
12
12
--- owner: string,
13
13
--- controllers: string[],
14
14
--- records: table<string, Record>,
15
+ --- logo: string,
15
16
--- }
16
17
17
18
--- Initializes the ANT state from a JSON string
@@ -27,6 +28,8 @@ function initialize.initializeANTState(state)
27
28
local description = encoded .description
28
29
local keywords = encoded .keywords
29
30
local owner = encoded .owner
31
+ local logo = encoded .logo or " "
32
+
30
33
assert (type (name ) == " string" , " name must be a string" )
31
34
assert (type (ticker ) == " string" , " ticker must be a string" )
32
35
assert (type (description ) == " string" , " description must be a string" )
@@ -38,6 +41,8 @@ function initialize.initializeANTState(state)
38
41
assert (type (controllers ) == " table" , " controllers must be a table" )
39
42
assert (type (records ) == " table" , " records must be a table" )
40
43
assert (type (owner ) == " string" , " owner must be a string" )
44
+ assert (type (logo ) == " string" , " logo must be a string" )
45
+
41
46
for k , v in pairs (records ) do
42
47
utils .validateUndername (k )
43
48
assert (type (v ) == " table" , " records values must be tables" )
@@ -56,6 +61,7 @@ function initialize.initializeANTState(state)
56
61
Records = records
57
62
Initialized = true
58
63
Owner = owner
64
+ Logo = logo
59
65
60
66
return json .encode ({
61
67
name = Name ,
@@ -67,6 +73,7 @@ function initialize.initializeANTState(state)
67
73
records = Records ,
68
74
owner = Owner ,
69
75
initialized = Initialized ,
76
+ logo = Logo ,
70
77
})
71
78
end
72
79
0 commit comments