@graphprotocol/graph-cli 0.33.1 → 0.34.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/README.md +1 -1
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/chain/ethereum.ts +200 -0
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/global/global.ts +28 -28
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/methods.txt +18 -0
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/package.json +1 -1
- package/examples/basic-event-handlers/node_modules/keccak/build/Makefile +342 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/Release/.deps/Release/obj.target/keccak/src/addon.o.d.raw +69 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/binding.Makefile +6 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/config.gypi +27 -11
- package/examples/basic-event-handlers/node_modules/keccak/build/gyp-mac-tool +772 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/keccak.target.mk +207 -0
- package/examples/basic-event-handlers/node_modules/websocket/build/Makefile +347 -0
- package/examples/basic-event-handlers/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw +67 -0
- package/examples/basic-event-handlers/node_modules/websocket/build/binding.Makefile +6 -0
- package/examples/basic-event-handlers/node_modules/websocket/build/bufferutil.target.mk +190 -0
- package/examples/basic-event-handlers/node_modules/websocket/build/config.gypi +23 -7
- package/examples/basic-event-handlers/node_modules/websocket/build/gyp-mac-tool +772 -0
- package/examples/basic-event-handlers/node_modules/websocket/build/validation.target.mk +190 -0
- package/examples/basic-event-handlers/package.json +1 -1
- package/examples/basic-event-handlers/yarn.lock +4 -4
- package/examples/example-subgraph/package.json +1 -1
- package/examples/example-subgraph/yarn.lock +4 -4
- package/package.json +1 -1
- package/src/codegen/types/conversions.js +101 -0
- package/src/codegen/types/index.test.js +347 -0
- package/src/scaffold/index.js +1 -1
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# This file is generated by gyp; do not edit.
|
|
2
|
+
|
|
3
|
+
TOOLSET := target
|
|
4
|
+
TARGET := validation
|
|
5
|
+
DEFS_Debug := \
|
|
6
|
+
'-DNODE_GYP_MODULE_NAME=validation' \
|
|
7
|
+
'-DUSING_UV_SHARED=1' \
|
|
8
|
+
'-DUSING_V8_SHARED=1' \
|
|
9
|
+
'-DV8_DEPRECATION_WARNINGS=1' \
|
|
10
|
+
'-DV8_DEPRECATION_WARNINGS' \
|
|
11
|
+
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
|
12
|
+
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
|
13
|
+
'-D_DARWIN_USE_64_BIT_INODE=1' \
|
|
14
|
+
'-D_LARGEFILE_SOURCE' \
|
|
15
|
+
'-D_FILE_OFFSET_BITS=64' \
|
|
16
|
+
'-DOPENSSL_NO_PINSHARED' \
|
|
17
|
+
'-DOPENSSL_THREADS' \
|
|
18
|
+
'-DBUILDING_NODE_EXTENSION' \
|
|
19
|
+
'-DDEBUG' \
|
|
20
|
+
'-D_DEBUG' \
|
|
21
|
+
'-DV8_ENABLE_CHECKS'
|
|
22
|
+
|
|
23
|
+
# Flags passed to all source files.
|
|
24
|
+
CFLAGS_Debug := \
|
|
25
|
+
-O0 \
|
|
26
|
+
-gdwarf-2 \
|
|
27
|
+
-mmacosx-version-min=10.15 \
|
|
28
|
+
-arch arm64 \
|
|
29
|
+
-Wall \
|
|
30
|
+
-Wendif-labels \
|
|
31
|
+
-W \
|
|
32
|
+
-Wno-unused-parameter
|
|
33
|
+
|
|
34
|
+
# Flags passed to only C files.
|
|
35
|
+
CFLAGS_C_Debug := \
|
|
36
|
+
-fno-strict-aliasing
|
|
37
|
+
|
|
38
|
+
# Flags passed to only C++ files.
|
|
39
|
+
CFLAGS_CC_Debug := \
|
|
40
|
+
-std=gnu++17 \
|
|
41
|
+
-stdlib=libc++ \
|
|
42
|
+
-fno-rtti \
|
|
43
|
+
-fno-exceptions \
|
|
44
|
+
-fno-strict-aliasing
|
|
45
|
+
|
|
46
|
+
# Flags passed to only ObjC files.
|
|
47
|
+
CFLAGS_OBJC_Debug :=
|
|
48
|
+
|
|
49
|
+
# Flags passed to only ObjC++ files.
|
|
50
|
+
CFLAGS_OBJCC_Debug :=
|
|
51
|
+
|
|
52
|
+
INCS_Debug := \
|
|
53
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/include/node \
|
|
54
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/src \
|
|
55
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/openssl/config \
|
|
56
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/openssl/openssl/include \
|
|
57
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/uv/include \
|
|
58
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/zlib \
|
|
59
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/v8/include \
|
|
60
|
+
-I$(srcdir)/../nan
|
|
61
|
+
|
|
62
|
+
DEFS_Release := \
|
|
63
|
+
'-DNODE_GYP_MODULE_NAME=validation' \
|
|
64
|
+
'-DUSING_UV_SHARED=1' \
|
|
65
|
+
'-DUSING_V8_SHARED=1' \
|
|
66
|
+
'-DV8_DEPRECATION_WARNINGS=1' \
|
|
67
|
+
'-DV8_DEPRECATION_WARNINGS' \
|
|
68
|
+
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
|
69
|
+
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
|
70
|
+
'-D_DARWIN_USE_64_BIT_INODE=1' \
|
|
71
|
+
'-D_LARGEFILE_SOURCE' \
|
|
72
|
+
'-D_FILE_OFFSET_BITS=64' \
|
|
73
|
+
'-DOPENSSL_NO_PINSHARED' \
|
|
74
|
+
'-DOPENSSL_THREADS' \
|
|
75
|
+
'-DBUILDING_NODE_EXTENSION'
|
|
76
|
+
|
|
77
|
+
# Flags passed to all source files.
|
|
78
|
+
CFLAGS_Release := \
|
|
79
|
+
-O3 \
|
|
80
|
+
-gdwarf-2 \
|
|
81
|
+
-mmacosx-version-min=10.15 \
|
|
82
|
+
-arch arm64 \
|
|
83
|
+
-Wall \
|
|
84
|
+
-Wendif-labels \
|
|
85
|
+
-W \
|
|
86
|
+
-Wno-unused-parameter
|
|
87
|
+
|
|
88
|
+
# Flags passed to only C files.
|
|
89
|
+
CFLAGS_C_Release := \
|
|
90
|
+
-fno-strict-aliasing
|
|
91
|
+
|
|
92
|
+
# Flags passed to only C++ files.
|
|
93
|
+
CFLAGS_CC_Release := \
|
|
94
|
+
-std=gnu++17 \
|
|
95
|
+
-stdlib=libc++ \
|
|
96
|
+
-fno-rtti \
|
|
97
|
+
-fno-exceptions \
|
|
98
|
+
-fno-strict-aliasing
|
|
99
|
+
|
|
100
|
+
# Flags passed to only ObjC files.
|
|
101
|
+
CFLAGS_OBJC_Release :=
|
|
102
|
+
|
|
103
|
+
# Flags passed to only ObjC++ files.
|
|
104
|
+
CFLAGS_OBJCC_Release :=
|
|
105
|
+
|
|
106
|
+
INCS_Release := \
|
|
107
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/include/node \
|
|
108
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/src \
|
|
109
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/openssl/config \
|
|
110
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/openssl/openssl/include \
|
|
111
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/uv/include \
|
|
112
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/zlib \
|
|
113
|
+
-I/Users/eva/Library/Caches/node-gyp/18.2.0/deps/v8/include \
|
|
114
|
+
-I$(srcdir)/../nan
|
|
115
|
+
|
|
116
|
+
OBJS := \
|
|
117
|
+
$(obj).target/$(TARGET)/src/validation.o
|
|
118
|
+
|
|
119
|
+
# Add to the list of files we specially track dependencies for.
|
|
120
|
+
all_deps += $(OBJS)
|
|
121
|
+
|
|
122
|
+
# CFLAGS et al overrides must be target-local.
|
|
123
|
+
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
124
|
+
$(OBJS): TOOLSET := $(TOOLSET)
|
|
125
|
+
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
126
|
+
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
127
|
+
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
|
|
128
|
+
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
|
|
129
|
+
|
|
130
|
+
# Suffix rules, putting all outputs into $(obj).
|
|
131
|
+
|
|
132
|
+
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
133
|
+
@$(call do_cmd,cxx,1)
|
|
134
|
+
|
|
135
|
+
# Try building from generated source, too.
|
|
136
|
+
|
|
137
|
+
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
138
|
+
@$(call do_cmd,cxx,1)
|
|
139
|
+
|
|
140
|
+
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
141
|
+
@$(call do_cmd,cxx,1)
|
|
142
|
+
|
|
143
|
+
# End of this set of suffix rules
|
|
144
|
+
### Rules for final target.
|
|
145
|
+
LDFLAGS_Debug := \
|
|
146
|
+
-undefined dynamic_lookup \
|
|
147
|
+
-Wl,-search_paths_first \
|
|
148
|
+
-mmacosx-version-min=10.15 \
|
|
149
|
+
-arch arm64 \
|
|
150
|
+
-L$(builddir) \
|
|
151
|
+
-stdlib=libc++
|
|
152
|
+
|
|
153
|
+
LIBTOOLFLAGS_Debug := \
|
|
154
|
+
-undefined dynamic_lookup \
|
|
155
|
+
-Wl,-search_paths_first
|
|
156
|
+
|
|
157
|
+
LDFLAGS_Release := \
|
|
158
|
+
-undefined dynamic_lookup \
|
|
159
|
+
-Wl,-search_paths_first \
|
|
160
|
+
-mmacosx-version-min=10.15 \
|
|
161
|
+
-arch arm64 \
|
|
162
|
+
-L$(builddir) \
|
|
163
|
+
-stdlib=libc++
|
|
164
|
+
|
|
165
|
+
LIBTOOLFLAGS_Release := \
|
|
166
|
+
-undefined dynamic_lookup \
|
|
167
|
+
-Wl,-search_paths_first
|
|
168
|
+
|
|
169
|
+
LIBS :=
|
|
170
|
+
|
|
171
|
+
$(builddir)/validation.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
172
|
+
$(builddir)/validation.node: LIBS := $(LIBS)
|
|
173
|
+
$(builddir)/validation.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))
|
|
174
|
+
$(builddir)/validation.node: TOOLSET := $(TOOLSET)
|
|
175
|
+
$(builddir)/validation.node: $(OBJS) FORCE_DO_CMD
|
|
176
|
+
$(call do_cmd,solink_module)
|
|
177
|
+
|
|
178
|
+
all_deps += $(builddir)/validation.node
|
|
179
|
+
# Add target alias
|
|
180
|
+
.PHONY: validation
|
|
181
|
+
validation: $(builddir)/validation.node
|
|
182
|
+
|
|
183
|
+
# Short alias for building this executable.
|
|
184
|
+
.PHONY: validation.node
|
|
185
|
+
validation.node: $(builddir)/validation.node
|
|
186
|
+
|
|
187
|
+
# Add executable to "all" target.
|
|
188
|
+
.PHONY: all
|
|
189
|
+
all: $(builddir)/validation.node
|
|
190
|
+
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"deploy-test": "../../bin/graph deploy test/basic-event-handlers --version-label v0.0.1 --ipfs http://localhost:15001 --node http://127.0.0.1:18020"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@graphprotocol/graph-ts": "0.
|
|
12
|
+
"@graphprotocol/graph-ts": "0.28.0-alpha.0",
|
|
13
13
|
"apollo-fetch": "^0.7.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# yarn lockfile v1
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
"@graphprotocol/graph-ts@0.
|
|
6
|
-
version "0.
|
|
7
|
-
resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.
|
|
8
|
-
integrity sha512-
|
|
5
|
+
"@graphprotocol/graph-ts@0.28.0-alpha.0":
|
|
6
|
+
version "0.28.0-alpha.0"
|
|
7
|
+
resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.28.0-alpha.0.tgz#2d687842c42a25b306e49591cecc413af5ded91f"
|
|
8
|
+
integrity sha512-3ZaYh8Xs9cMGcfW8ft+HR0rpT1/SM3wRnUsyPHjPpdVaOykjRTz5noRKYkYFw8r6tdlC+xIWc34/Qp6RaT9SBg==
|
|
9
9
|
dependencies:
|
|
10
10
|
assemblyscript "0.19.10"
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# yarn lockfile v1
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
"@graphprotocol/graph-ts@0.
|
|
6
|
-
version "0.
|
|
7
|
-
resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.
|
|
8
|
-
integrity sha512-
|
|
5
|
+
"@graphprotocol/graph-ts@0.28.0-alpha.0":
|
|
6
|
+
version "0.28.0-alpha.0"
|
|
7
|
+
resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.28.0-alpha.0.tgz#2d687842c42a25b306e49591cecc413af5ded91f"
|
|
8
|
+
integrity sha512-3ZaYh8Xs9cMGcfW8ft+HR0rpT1/SM3wRnUsyPHjPpdVaOykjRTz5noRKYkYFw8r6tdlC+xIWc34/Qp6RaT9SBg==
|
|
9
9
|
dependencies:
|
|
10
10
|
assemblyscript "0.19.10"
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -52,6 +52,32 @@ const ETHEREUM_VALUE_TO_ASSEMBLYSCRIPT = [
|
|
|
52
52
|
'Array<ethereum.Tuple>',
|
|
53
53
|
(code, type) => `${code}.toTupleArray<${type}>()`,
|
|
54
54
|
],
|
|
55
|
+
|
|
56
|
+
// Multi dimensional arrays
|
|
57
|
+
|
|
58
|
+
[/^address\[([0-9]+)?\]\[([0-9]+)?\]$/, 'Array<Array<Address>>', code => `${code}.toAddressMatrix()`],
|
|
59
|
+
[/^bool\[([0-9]+)?\]\[([0-9]+)?\]$/, 'Array<Array<boolean>>', code => `${code}.toBooleanMatrix()`],
|
|
60
|
+
[/^byte\[([0-9]+)?\]\[([0-9]+)?\]$/, 'Array<Array<Bytes>>', code => `${code}.toBytesMatrix()`],
|
|
61
|
+
[
|
|
62
|
+
/^bytes(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32)?\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
63
|
+
'Array<Array<Bytes>>',
|
|
64
|
+
code => `${code}.toBytesMatrix()`,
|
|
65
|
+
],
|
|
66
|
+
[/^int(8|16|24|32)\[([0-9]+)?\]\[([0-9]+)?\]$/, 'Array<Array<i32>>', code => `${code}.toI32Matrix()`],
|
|
67
|
+
[/^uint(8|16|24)\[([0-9]+)?\]\[([0-9]+)?\]$/, 'Array<Array<i32>>', code => `${code}.toI32Matrix()`],
|
|
68
|
+
[/^uint32\[([0-9]+)?\]\[([0-9]+)?\]$/, 'Array<Array<BigInt>>', code => `${code}.toBigIntMatrix()`],
|
|
69
|
+
[
|
|
70
|
+
/^u?int(40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
71
|
+
'Array<Array<BigInt>>',
|
|
72
|
+
code => `${code}.toBigIntMatrix()`,
|
|
73
|
+
],
|
|
74
|
+
[/^string\[([0-9]+)?\]\[([0-9]+)?\]$/, 'Array<Array<string>>', code => `${code}.toStringMatrix()`],
|
|
75
|
+
[
|
|
76
|
+
/^tuple\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
77
|
+
'Array<Array<ethereum.Tuple>>',
|
|
78
|
+
(code, type) => `${code}.toTupleMatrix<${type}>()`,
|
|
79
|
+
],
|
|
80
|
+
|
|
55
81
|
]
|
|
56
82
|
|
|
57
83
|
/**
|
|
@@ -143,12 +169,74 @@ const ASSEMBLYSCRIPT_TO_ETHEREUM_VALUE = [
|
|
|
143
169
|
/^string\[([0-9]+)?\]$/,
|
|
144
170
|
code => `ethereum.Value.fromStringArray(${code})`,
|
|
145
171
|
],
|
|
172
|
+
|
|
173
|
+
// Tuples
|
|
174
|
+
|
|
146
175
|
['ethereum.Tuple', 'tuple', code => `ethereum.Value.fromTuple(${code})`],
|
|
147
176
|
[
|
|
148
177
|
'Array<ethereum.Tuple>',
|
|
149
178
|
/^tuple\[([0-9]+)?\]$/,
|
|
150
179
|
code => `ethereum.Value.fromTupleArray(${code})`,
|
|
151
180
|
],
|
|
181
|
+
|
|
182
|
+
// ethereumToAsc
|
|
183
|
+
// Multi dimentional arrays
|
|
184
|
+
|
|
185
|
+
[
|
|
186
|
+
'Array<Array<Address>>',
|
|
187
|
+
/^address\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
188
|
+
code => `ethereum.Value.fromAddressMatrix(${code})`,
|
|
189
|
+
],
|
|
190
|
+
[
|
|
191
|
+
'Array<Array<boolean>>',
|
|
192
|
+
/^bool\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
193
|
+
code => `ethereum.Value.fromBooleanMatrix(${code})`,
|
|
194
|
+
],
|
|
195
|
+
[
|
|
196
|
+
'Array<Array<Bytes>>',
|
|
197
|
+
/^byte\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
198
|
+
code => `ethereum.Value.fromFixedBytesMatrix(${code})`,
|
|
199
|
+
],
|
|
200
|
+
[
|
|
201
|
+
'Array<Array<Bytes>>',
|
|
202
|
+
/bytes\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
203
|
+
code => `ethereum.Value.fromBytesMatrix(${code})`,
|
|
204
|
+
],
|
|
205
|
+
[
|
|
206
|
+
'Array<Array<Bytes>>',
|
|
207
|
+
/^bytes(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32)\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
208
|
+
code => `ethereum.Value.fromFixedBytesMatrix(${code})`,
|
|
209
|
+
],
|
|
210
|
+
[
|
|
211
|
+
'Array<Array<i32>>',
|
|
212
|
+
/^int(8|16|24|32)\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
213
|
+
code => `ethereum.Value.fromI32Matrix(${code})`,
|
|
214
|
+
],
|
|
215
|
+
[
|
|
216
|
+
'Array<Array<i32>>',
|
|
217
|
+
/^uint(8|16|24)\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
218
|
+
code => `ethereum.Value.fromI32Matrix(${code})`,
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
'Array<Array<BigInt>>',
|
|
222
|
+
/^int(40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
223
|
+
code => `ethereum.Value.fromSignedBigIntMatrix(${code})`,
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
'Array<Array<BigInt>>',
|
|
227
|
+
/^uint(32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
228
|
+
code => `ethereum.Value.fromUnsignedBigIntMatrix(${code})`,
|
|
229
|
+
],
|
|
230
|
+
[
|
|
231
|
+
'Array<Array<string>>',
|
|
232
|
+
/^string\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
233
|
+
code => `ethereum.Value.fromStringMatrix(${code})`,
|
|
234
|
+
],
|
|
235
|
+
[
|
|
236
|
+
'Array<Array<ethereum.Tuple>>',
|
|
237
|
+
/^tuple\[([0-9]+)?\]\[([0-9]+)?\]$/,
|
|
238
|
+
code => `ethereum.Value.fromTupleMatrix(${code})`,
|
|
239
|
+
],
|
|
152
240
|
]
|
|
153
241
|
|
|
154
242
|
/**
|
|
@@ -186,6 +274,19 @@ const VALUE_TO_ASSEMBLYSCRIPT = [
|
|
|
186
274
|
* for them.
|
|
187
275
|
*/
|
|
188
276
|
const ASSEMBLYSCRIPT_TO_VALUE = [
|
|
277
|
+
// Matrices
|
|
278
|
+
|
|
279
|
+
['Array<Array<Address>>', '[[Bytes]]', code => `Value.fromBytesMatrix(${code})`],
|
|
280
|
+
['Array<Array<Bytes>>', '[[Bytes]]', code => `Value.fromBytesMatrix(${code})`],
|
|
281
|
+
['Array<Array<boolean>>', '[[Boolean]]', code => `Value.fromBooleanMatrix(${code})`],
|
|
282
|
+
['Array<Array<i32>>', '[[Int]]', code => `Value.fromI32Matrix(${code})`],
|
|
283
|
+
['Array<Array<BigInt>>', '[[BigInt]]', code => `Value.fromBigIntMatrix(${code})`],
|
|
284
|
+
['Array<Array<string>>', '[[String]]', code => `Value.fromStringMatrix(${code})`],
|
|
285
|
+
['Array<Array<string>>', '[[ID]]', code => `Value.fromStringMatrix(${code})`],
|
|
286
|
+
['Array<Array<BigDecimal>>', '[[BigDecimal]]', code => `Value.fromBigDecimalMatrix(${code})`],
|
|
287
|
+
['Array<Array<string>>', /\[\[.*\]\]/, code => `Value.fromStringMatrix(${code})`],
|
|
288
|
+
['Array<Array<string | null>>', null, code => `Value.fromStringMatrix(${code})`],// is this overwriting the Array null below?
|
|
289
|
+
|
|
189
290
|
// Arrays
|
|
190
291
|
|
|
191
292
|
['Array<Address>', '[Bytes]', code => `Value.fromBytesArray(${code})`],
|