@sig-net/midnight 0.24.0-rc.8 → 0.24.0-rc.9
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/README.md +18 -5
- package/dist/abi-serde.d.ts +105 -52
- package/dist/abi-serde.d.ts.map +1 -1
- package/dist/abi-serde.js +231 -147
- package/dist/abi-serde.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +25 -7
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +252 -249
- package/dist/managed/contract/index.js +331 -307
- package/dist/managed/contract/index.js.map +1 -1
- package/package.json +2 -2
- package/src/Signet.compact +31 -15
- package/src/circuits.compact +13 -13
package/dist/abi-serde.js
CHANGED
|
@@ -8,10 +8,10 @@ import { ethers } from "ethers";
|
|
|
8
8
|
* into named values, driven by the request's outputDeserializationSchema.
|
|
9
9
|
* The decode-side counterpart of {@link serializeRespondOutput}. Type
|
|
10
10
|
* validation is FULLY delegated to ethers: this function checks the schema's
|
|
11
|
-
* shape only
|
|
12
|
-
* decodes
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* shape only, so it decodes ABI types the respond side refuses. An empty
|
|
12
|
+
* schema decodes to an empty object. Returns a plain object (never an
|
|
13
|
+
* ethers `Result`), so it survives JSON round-trips and structural
|
|
14
|
+
* comparison.
|
|
15
15
|
*
|
|
16
16
|
* @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
|
|
17
17
|
* @param callResult - The ABI-encoded return data (hex string or bytes).
|
|
@@ -30,92 +30,204 @@ export function deserializeEvmOutput(schema, callResult) {
|
|
|
30
30
|
return output;
|
|
31
31
|
}
|
|
32
32
|
// ---------------------------------------------------------------------------
|
|
33
|
-
// 2. decoded values -> respond bytes (
|
|
33
|
+
// 2. decoded values -> respond bytes (Borsh schema derived from the output schema)
|
|
34
34
|
// ---------------------------------------------------------------------------
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* The ABI output types the MPC attests, and what each maps to. The respond
|
|
37
|
+
* bytes are the Borsh serialisation of a struct with one member per output
|
|
38
|
+
* field, in schema order, typed by this mapping:
|
|
37
39
|
*
|
|
38
|
-
* @
|
|
39
|
-
* @
|
|
40
|
-
*
|
|
40
|
+
* - {@link EvmOutputTypeKind.Bool}: ABI `bool`, Borsh `bool`, Compact `Boolean` (1 byte).
|
|
41
|
+
* - {@link EvmOutputTypeKind.Uint256}: ABI `uint256`, Borsh `[u8; 32]`
|
|
42
|
+
* holding the value LITTLE-endian, the byte order of every Borsh and
|
|
43
|
+
* Compact integer, Compact `Bytes<32>` (32 bytes). A circuit that wants a
|
|
44
|
+
* number narrows it with `checkedTruncationU128`, which aborts above
|
|
45
|
+
* 2^128 - 1. The ABI wire word is big-endian: the MPC reverses it once,
|
|
46
|
+
* here, so no circuit has to.
|
|
47
|
+
* - {@link EvmOutputTypeKind.Address}: ABI `address`, Borsh `[u8; 20]`
|
|
48
|
+
* holding the address bytes, Compact `Bytes<20>` (20 bytes).
|
|
49
|
+
* - {@link EvmOutputTypeKind.FixedBytes}: ABI `bytes1` to `bytes32`, Borsh
|
|
50
|
+
* `[u8; N]`, Compact `Bytes<N>` (N bytes).
|
|
51
|
+
*
|
|
52
|
+
* Every other ABI type is unsupported: the MPC drops a request whose output
|
|
53
|
+
* schema names one, and {@link deriveRespondSchema} throws on it.
|
|
54
|
+
*/
|
|
55
|
+
export var EvmOutputTypeKind;
|
|
56
|
+
(function (EvmOutputTypeKind) {
|
|
57
|
+
EvmOutputTypeKind["Bool"] = "bool";
|
|
58
|
+
EvmOutputTypeKind["Uint256"] = "uint256";
|
|
59
|
+
EvmOutputTypeKind["Address"] = "address";
|
|
60
|
+
EvmOutputTypeKind["FixedBytes"] = "bytesN";
|
|
61
|
+
})(EvmOutputTypeKind || (EvmOutputTypeKind = {}));
|
|
62
|
+
/** The byte width of an ABI word, and of the Borsh array a `uint256` output maps to. */
|
|
63
|
+
const ABI_WORD_BYTES = 32;
|
|
64
|
+
/** The byte width of an EVM address, and of the Borsh array an `address` output maps to. */
|
|
65
|
+
const EVM_ADDRESS_BYTES = 20;
|
|
66
|
+
/**
|
|
67
|
+
* Classify an ABI type string into the supported output subset.
|
|
68
|
+
*
|
|
69
|
+
* @param type - The ABI type string of an output schema field.
|
|
70
|
+
* @returns The field's kind and respond byte width, or `undefined` for an unsupported type.
|
|
41
71
|
*/
|
|
42
|
-
function
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
45
|
-
if (
|
|
46
|
-
return
|
|
72
|
+
function classifyEvmOutputType(type) {
|
|
73
|
+
if (type === "bool")
|
|
74
|
+
return { kind: EvmOutputTypeKind.Bool, bytes: 1 };
|
|
75
|
+
if (type === "uint256")
|
|
76
|
+
return { kind: EvmOutputTypeKind.Uint256, bytes: ABI_WORD_BYTES };
|
|
77
|
+
if (type === "address")
|
|
78
|
+
return { kind: EvmOutputTypeKind.Address, bytes: EVM_ADDRESS_BYTES };
|
|
79
|
+
const fixedBytes = /^bytes([1-9]|[12][0-9]|3[0-2])$/.exec(type);
|
|
80
|
+
if (fixedBytes !== null) {
|
|
81
|
+
return { kind: EvmOutputTypeKind.FixedBytes, bytes: Number(fixedBytes[1]) };
|
|
47
82
|
}
|
|
48
|
-
return
|
|
83
|
+
return undefined;
|
|
49
84
|
}
|
|
50
85
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
86
|
+
* The fields of an outputDeserializationSchema whose ABI type is outside the
|
|
87
|
+
* supported subset ({@link EvmOutputTypeKind}). The check itself never
|
|
88
|
+
* throws on an unsupported type: an empty result means the MPC attests the
|
|
89
|
+
* request, a non-empty one means it drops it.
|
|
53
90
|
*
|
|
54
|
-
* @param schema -
|
|
55
|
-
* @
|
|
56
|
-
* @
|
|
57
|
-
* @throws {RangeError} If an integer cannot be represented without loss.
|
|
91
|
+
* @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
|
|
92
|
+
* @returns The unsupported fields in schema order, empty when every field is supported.
|
|
93
|
+
* @throws {Error} If the schema is not an array of uniquely named fields (its shape, not its types).
|
|
58
94
|
*/
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
return value;
|
|
95
|
+
export function unsupportedEvmOutputFields(schema) {
|
|
96
|
+
return parseSchemaShape(schema).filter((field) => classifyEvmOutputType(field.type) === undefined);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Parse an output schema and classify every field, refusing the schema as a
|
|
100
|
+
* whole when any field is unsupported.
|
|
101
|
+
*
|
|
102
|
+
* @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
|
|
103
|
+
* @returns The classified fields in schema order.
|
|
104
|
+
* @throws {Error} If the schema is malformed or names an unsupported ABI type.
|
|
105
|
+
*/
|
|
106
|
+
function classifiedEvmOutputFields(schema) {
|
|
107
|
+
const fields = parseSchemaShape(schema);
|
|
108
|
+
const unsupported = fields.filter((field) => classifyEvmOutputType(field.type) === undefined);
|
|
109
|
+
if (unsupported.length > 0) {
|
|
110
|
+
throw new Error(`respond output: unsupported ABI output type${unsupported.length > 1 ? "s" : ""} ` +
|
|
111
|
+
unsupported.map((field) => `'${field.name}' (${field.type})`).join(", ") +
|
|
112
|
+
": the MPC attests bool, uint256, address and bytes1 to bytes32 only");
|
|
79
113
|
}
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
114
|
+
return fields.flatMap((field) => {
|
|
115
|
+
const classified = classifyEvmOutputType(field.type);
|
|
116
|
+
return classified === undefined ? [] : [{ ...field, ...classified }];
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The Borsh schema the respond bytes of an executed call are serialised
|
|
121
|
+
* with: a struct with one member per output field, in schema order, each
|
|
122
|
+
* typed by {@link EvmOutputTypeKind}. An empty output schema derives an
|
|
123
|
+
* empty struct, which serialises to zero bytes.
|
|
124
|
+
*
|
|
125
|
+
* @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
|
|
126
|
+
* @returns The derived Borsh struct schema.
|
|
127
|
+
* @throws {Error} If the schema is malformed or names an unsupported ABI type.
|
|
128
|
+
*/
|
|
129
|
+
export function deriveRespondSchema(schema) {
|
|
130
|
+
return {
|
|
131
|
+
struct: Object.fromEntries(classifiedEvmOutputFields(schema).map((field) => [
|
|
132
|
+
field.name,
|
|
133
|
+
field.kind === EvmOutputTypeKind.Bool
|
|
134
|
+
? "bool"
|
|
135
|
+
: { array: { type: "u8", len: field.bytes } },
|
|
136
|
+
])),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The byte width of the respond bytes an output schema derives: the sum of
|
|
141
|
+
* its fields' widths under {@link EvmOutputTypeKind}, what a settle circuit
|
|
142
|
+
* declares as its `Bytes<N>` output argument.
|
|
143
|
+
*
|
|
144
|
+
* @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
|
|
145
|
+
* @returns The exact serialised width, 0 for an empty schema.
|
|
146
|
+
* @throws {Error} If the schema is malformed or names an unsupported ABI type.
|
|
147
|
+
*/
|
|
148
|
+
export function respondOutputWidth(schema) {
|
|
149
|
+
return classifiedEvmOutputFields(schema).reduce((width, field) => width + field.bytes, 0);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The 32-byte LITTLE-endian encoding of a `uint256` output value, as ethers
|
|
153
|
+
* decodes it (bigint) or as indexer JSON renders it (a number or a decimal
|
|
154
|
+
* string). This is the ABI wire word reversed: the Borsh integer byte order,
|
|
155
|
+
* which a Compact `Uint<128>` reads directly.
|
|
156
|
+
*
|
|
157
|
+
* @param value - The decoded value.
|
|
158
|
+
* @param name - The field name, for the error message.
|
|
159
|
+
* @returns The value's 32 little-endian bytes.
|
|
160
|
+
* @throws {RangeError} If the value is not an integer in `0 <= value < 2^256`.
|
|
161
|
+
*/
|
|
162
|
+
function uint256Word(value, name) {
|
|
163
|
+
if (typeof value !== "bigint" && typeof value !== "number" && typeof value !== "string") {
|
|
164
|
+
throw new TypeError(`respond output: '${name}' (uint256) expects an integer`);
|
|
88
165
|
}
|
|
89
|
-
if ("
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
: value;
|
|
95
|
-
if (Array.isArray(array)) {
|
|
96
|
-
return array.map((element) => toBorshValue(schema.array.type, element));
|
|
97
|
-
}
|
|
166
|
+
if (typeof value === "number" && !Number.isSafeInteger(value)) {
|
|
167
|
+
throw new RangeError(`respond output: '${name}' (uint256) is not a safe integer`);
|
|
168
|
+
}
|
|
169
|
+
if (typeof value === "string" && !/^\s*\d+\s*$/.test(value)) {
|
|
170
|
+
throw new RangeError(`respond output: '${name}' (uint256) is not a decimal integer string`);
|
|
98
171
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const variant = schema.enum.find((item) => Object.keys(item.struct).some((key) => Object.hasOwn(value, key)));
|
|
103
|
-
if (variant !== undefined)
|
|
104
|
-
return toBorshValue(variant, value);
|
|
172
|
+
const integer = BigInt(value);
|
|
173
|
+
if (integer < 0n || integer >= 1n << 256n) {
|
|
174
|
+
throw new RangeError(`respond output: '${name}' (uint256) ${String(integer)} is outside uint256`);
|
|
105
175
|
}
|
|
106
|
-
return
|
|
176
|
+
return Array.from(ethers.getBytes(ethers.toBeHex(integer, ABI_WORD_BYTES))).reverse();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The bytes of an `address` or `bytesN` output value, as ethers decodes it
|
|
180
|
+
* (a hex string, checksummed for an address) or as bytes. Byte order is the
|
|
181
|
+
* wire's: these are byte strings, not numbers.
|
|
182
|
+
*
|
|
183
|
+
* @param value - The decoded value.
|
|
184
|
+
* @param field - The field, for the error message.
|
|
185
|
+
* @returns The value's bytes, length-checked by Borsh against the schema.
|
|
186
|
+
* @throws {TypeError} If the value is neither a hex string nor bytes.
|
|
187
|
+
*/
|
|
188
|
+
function byteString(value, field) {
|
|
189
|
+
if (value instanceof Uint8Array)
|
|
190
|
+
return Array.from(value);
|
|
191
|
+
if (typeof value === "string")
|
|
192
|
+
return Array.from(ethers.getBytes(value));
|
|
193
|
+
throw new TypeError(`respond output: '${field.name}' (${field.type}) expects hex or bytes`);
|
|
107
194
|
}
|
|
108
195
|
/**
|
|
109
|
-
*
|
|
196
|
+
* Serialise ABI-decoded output into the respond bytes the MPC attests: the
|
|
197
|
+
* Borsh encoding of {@link deriveRespondSchema}'s struct over the output's
|
|
198
|
+
* values. A `uint256` is carried whole as 32 little-endian bytes, so no
|
|
199
|
+
* value is narrowed off chain: a circuit that wants a number narrows the
|
|
200
|
+
* `Bytes<32>` with `checkedTruncationU128`.
|
|
110
201
|
*
|
|
111
|
-
* @param schema -
|
|
112
|
-
* @param output -
|
|
113
|
-
* @returns
|
|
114
|
-
* @throws {Error} If
|
|
202
|
+
* @param schema - The outputDeserializationSchema: parsed, JSON text, or the raw NUL-padded on-chain bytes.
|
|
203
|
+
* @param output - The decoded values keyed by field name, as {@link deserializeEvmOutput} returns them.
|
|
204
|
+
* @returns The unpadded respond bytes, {@link respondOutputWidth} long.
|
|
205
|
+
* @throws {Error} If the schema is malformed or names an unsupported type, a
|
|
206
|
+
* field is missing from `output`, or a value is outside its type.
|
|
115
207
|
*/
|
|
116
208
|
export function serializeRespondOutput(schema, output) {
|
|
117
|
-
const
|
|
118
|
-
|
|
209
|
+
const values = {};
|
|
210
|
+
for (const field of classifiedEvmOutputFields(schema)) {
|
|
211
|
+
const value = output[field.name];
|
|
212
|
+
if (value === undefined)
|
|
213
|
+
throw new Error(`respond output: missing value for '${field.name}'`);
|
|
214
|
+
switch (field.kind) {
|
|
215
|
+
case EvmOutputTypeKind.Bool:
|
|
216
|
+
if (typeof value !== "boolean") {
|
|
217
|
+
throw new TypeError(`respond output: '${field.name}' (bool) expects a boolean`);
|
|
218
|
+
}
|
|
219
|
+
values[field.name] = value;
|
|
220
|
+
break;
|
|
221
|
+
case EvmOutputTypeKind.Uint256:
|
|
222
|
+
values[field.name] = uint256Word(value, field.name);
|
|
223
|
+
break;
|
|
224
|
+
case EvmOutputTypeKind.Address:
|
|
225
|
+
case EvmOutputTypeKind.FixedBytes:
|
|
226
|
+
values[field.name] = byteString(value, field);
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return compactSerialize(deriveRespondSchema(schema), values);
|
|
119
231
|
}
|
|
120
232
|
// ---------------------------------------------------------------------------
|
|
121
233
|
// 3. executed EVM transaction -> attested respond bytes
|
|
@@ -152,89 +264,62 @@ export var EvmTraceOutputKind;
|
|
|
152
264
|
/** The top call frame carries no string `output` field. */
|
|
153
265
|
EvmTraceOutputKind["NoReturnData"] = "NoReturnData";
|
|
154
266
|
})(EvmTraceOutputKind || (EvmTraceOutputKind = {}));
|
|
155
|
-
/** The string default the MPC synthesises for an execution without call output. */
|
|
156
|
-
const NON_FUNCTION_CALL_SUCCESS = "non_function_call_success";
|
|
157
267
|
/**
|
|
158
|
-
* The
|
|
159
|
-
*
|
|
160
|
-
*
|
|
268
|
+
* The exact respond output the MPC attests for an EVM transaction that
|
|
269
|
+
* executed (the payload of an `OutputKind.executed` attestation), derived
|
|
270
|
+
* from the request's outputDeserializationSchema alone. The schema and the
|
|
271
|
+
* execution's return data MUST agree: an empty schema declares that the
|
|
272
|
+
* execution returns nothing, a non-empty schema that it returns data.
|
|
161
273
|
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (typeof parsed === "string" || !("struct" in parsed)) {
|
|
170
|
-
throw new Error("Non-function-call defaults require a Borsh struct");
|
|
171
|
-
}
|
|
172
|
-
const output = {};
|
|
173
|
-
for (const [name, type] of Object.entries(parsed.struct)) {
|
|
174
|
-
if (type === "bool")
|
|
175
|
-
output[name] = true;
|
|
176
|
-
else if (type === "string")
|
|
177
|
-
output[name] = NON_FUNCTION_CALL_SUCCESS;
|
|
178
|
-
else
|
|
179
|
-
throw new Error(`Response field '${name}' has no non-function-call default`);
|
|
180
|
-
}
|
|
181
|
-
return output;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* The exact serialised respond output the MPC attests for an EVM transaction
|
|
185
|
-
* that executed (the payload of an `OutputKind.executed` attestation),
|
|
186
|
-
* mirroring the MPC's `build_serialized_output` under the Midnight respond
|
|
187
|
-
* format:
|
|
188
|
-
*
|
|
189
|
-
* - Not a contract call: the output schema and the trace are ignored, and
|
|
190
|
-
* the respond fields get synthesised defaults (bool `true`, string
|
|
191
|
-
* `"non_function_call_success"`, any other kind
|
|
192
|
-
* throws).
|
|
193
|
-
* - A contract call under an EMPTY output schema (a void call): the same
|
|
194
|
-
* defaults when the trace has no or empty return data, a throw when it
|
|
195
|
-
* returned data.
|
|
196
|
-
* - A contract call under a non-empty output schema: the return data
|
|
197
|
-
* decoded by {@link deserializeEvmOutput} and packed by
|
|
198
|
-
* {@link serializeRespondOutput}, a throw when the trace has no return
|
|
199
|
-
* data.
|
|
274
|
+
* - Not a contract call (a plain transfer): there is no return data, so the
|
|
275
|
+
* schema must be empty and the output is EMPTY.
|
|
276
|
+
* - A contract call whose trace carries no return data, or empty return
|
|
277
|
+
* data (`0x`): the schema must be empty and the output is EMPTY.
|
|
278
|
+
* - A contract call that returned data: the schema must be non-empty, and
|
|
279
|
+
* the output is the return data decoded by {@link deserializeEvmOutput}
|
|
280
|
+
* and serialised by {@link serializeRespondOutput}.
|
|
200
281
|
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
282
|
+
* The schema's types are checked on every path, a plain transfer included,
|
|
283
|
+
* so a request the MPC should have dropped never attests anything. A failed
|
|
284
|
+
* or unviable execution is attested over an empty output instead, which
|
|
285
|
+
* needs no call. An empty output under `executed` is therefore ordinary for
|
|
286
|
+
* an empty schema: its settle circuit verifies at width 0 and must route on
|
|
287
|
+
* the verified `outputKind`, never on the width.
|
|
203
288
|
*
|
|
204
|
-
* @param
|
|
289
|
+
* @param schema - The request's outputDeserializationSchema (a request record's field satisfies this).
|
|
205
290
|
* @param isContractCall - Whether the transaction is a contract call, as {@link isEvmContractCall} decides it.
|
|
206
291
|
* @param trace - The transaction's traced return data (`NotTraced` for an untraced plain transfer).
|
|
207
|
-
* @returns The
|
|
292
|
+
* @returns The respond bytes, unpadded, empty for an empty schema.
|
|
208
293
|
* @throws {Error} Exactly where the MPC refuses to attest an execution: a
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
294
|
+
* malformed schema or an unsupported output type, a contract call not
|
|
295
|
+
* traced, return data under an empty schema, no or empty return data
|
|
296
|
+
* under a non-empty schema, return data the schema cannot decode, and
|
|
297
|
+
* every {@link serializeRespondOutput} rejection.
|
|
213
298
|
*/
|
|
214
|
-
export function executedEvmRespondOutput(
|
|
215
|
-
const
|
|
299
|
+
export function executedEvmRespondOutput(schema, isContractCall, trace) {
|
|
300
|
+
const expectsOutput = classifiedEvmOutputFields(schema).length > 0;
|
|
216
301
|
if (!isContractCall) {
|
|
217
|
-
|
|
302
|
+
if (expectsOutput) {
|
|
303
|
+
throw new Error("respond output: a plain transfer returns nothing, but the output schema declares return values");
|
|
304
|
+
}
|
|
305
|
+
return new Uint8Array(0);
|
|
306
|
+
}
|
|
307
|
+
if (trace.kind === EvmTraceOutputKind.NotTraced) {
|
|
308
|
+
throw new Error("respond output: a contract call's output needs its trace");
|
|
309
|
+
}
|
|
310
|
+
const returnData = trace.kind === EvmTraceOutputKind.Output
|
|
311
|
+
? ethers.getBytes(trace.returnData)
|
|
312
|
+
: new Uint8Array(0);
|
|
313
|
+
if (returnData.length === 0) {
|
|
314
|
+
if (expectsOutput) {
|
|
315
|
+
throw new Error("respond output: the contract call returned no data, but the output schema declares return values");
|
|
316
|
+
}
|
|
317
|
+
return new Uint8Array(0);
|
|
218
318
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
case EvmTraceOutputKind.NotTraced:
|
|
222
|
-
throw new Error("respond output: a contract call's output needs its trace");
|
|
223
|
-
case EvmTraceOutputKind.NoReturnData:
|
|
224
|
-
if (!expectsNoOutput) {
|
|
225
|
-
throw new Error("respond output: the contract call's trace has no return data for a non-empty output schema");
|
|
226
|
-
}
|
|
227
|
-
break;
|
|
228
|
-
case EvmTraceOutputKind.Output:
|
|
229
|
-
if (!expectsNoOutput) {
|
|
230
|
-
return serializeRespondOutput(respondSerializationSchema, deserializeEvmOutput(outputDeserializationSchema, trace.returnData));
|
|
231
|
-
}
|
|
232
|
-
if (ethers.getBytes(trace.returnData).length > 0) {
|
|
233
|
-
throw new Error("respond output: the contract call returned data but its output schema declares no return values");
|
|
234
|
-
}
|
|
235
|
-
break;
|
|
319
|
+
if (!expectsOutput) {
|
|
320
|
+
throw new Error("respond output: the contract call returned data, but the output schema declares no return values");
|
|
236
321
|
}
|
|
237
|
-
return serializeRespondOutput(
|
|
322
|
+
return serializeRespondOutput(schema, deserializeEvmOutput(schema, returnData));
|
|
238
323
|
}
|
|
239
324
|
/**
|
|
240
325
|
* Whether a JSON value is an object. A type guard, as `Array.isArray` does
|
|
@@ -344,9 +429,8 @@ function parseSchemaJson(text) {
|
|
|
344
429
|
/**
|
|
345
430
|
* Parse a schema in any input form and check its SHAPE only: an array of
|
|
346
431
|
* fields with non-empty, unique names and non-empty type strings. An empty
|
|
347
|
-
* schema is valid here:
|
|
348
|
-
*
|
|
349
|
-
* {@link executedEvmRespondOutput} synthesises defaults for a void call).
|
|
432
|
+
* schema is valid here: {@link deserializeEvmOutput} decodes nothing from
|
|
433
|
+
* it and {@link executedEvmRespondOutput} attests an empty output.
|
|
350
434
|
*
|
|
351
435
|
* @param schema - The schema as JSON text, packed bytes, or a field array.
|
|
352
436
|
* @returns The schema's fields, names and type strings unvalidated beyond shape.
|
package/dist/abi-serde.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abi-serde.js","sourceRoot":"","sources":["../src/abi-serde.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAqChC,8EAA8E;AAC9E,sEAAsE;AACtE,8EAA8E;AAE9E;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAsB,EACtB,UAA4B;IAE5B,MAAM,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,CACtD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EACjC,UAAU,CACX,CAAC;IACF,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAC1B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,mEAAmE;AACnE,8EAA8E;AAE9E;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,MAA0B;IAC/C,IA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,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -236,6 +236,24 @@
|
|
|
236
236
|
"maxval": 340282366920938463463374607431768211455
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
+
{
|
|
240
|
+
"name": "checkedTruncationU128",
|
|
241
|
+
"pure": true,
|
|
242
|
+
"proof": false,
|
|
243
|
+
"arguments": [
|
|
244
|
+
{
|
|
245
|
+
"name": "x",
|
|
246
|
+
"type": {
|
|
247
|
+
"type-name": "Bytes",
|
|
248
|
+
"length": 32
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"result-type": {
|
|
253
|
+
"type-name": "Uint",
|
|
254
|
+
"maxval": 340282366920938463463374607431768211455
|
|
255
|
+
}
|
|
256
|
+
},
|
|
239
257
|
{
|
|
240
258
|
"name": "abiWordToBool",
|
|
241
259
|
"pure": true,
|
|
@@ -820,7 +838,7 @@
|
|
|
820
838
|
}
|
|
821
839
|
},
|
|
822
840
|
{
|
|
823
|
-
"name": "
|
|
841
|
+
"name": "calculateEvmType2RequestIdV1_1_0_0_34",
|
|
824
842
|
"pure": true,
|
|
825
843
|
"proof": false,
|
|
826
844
|
"arguments": [
|
|
@@ -1070,7 +1088,7 @@
|
|
|
1070
1088
|
"name": "respondSerializationSchema",
|
|
1071
1089
|
"type": {
|
|
1072
1090
|
"type-name": "Bytes",
|
|
1073
|
-
"length":
|
|
1091
|
+
"length": 0
|
|
1074
1092
|
}
|
|
1075
1093
|
}
|
|
1076
1094
|
]
|
|
@@ -1087,7 +1105,7 @@
|
|
|
1087
1105
|
}
|
|
1088
1106
|
},
|
|
1089
1107
|
{
|
|
1090
|
-
"name": "
|
|
1108
|
+
"name": "calculateEvmType2RequestIdV1_2_1_2_34",
|
|
1091
1109
|
"pure": true,
|
|
1092
1110
|
"proof": false,
|
|
1093
1111
|
"arguments": [
|
|
@@ -1337,7 +1355,7 @@
|
|
|
1337
1355
|
"name": "respondSerializationSchema",
|
|
1338
1356
|
"type": {
|
|
1339
1357
|
"type-name": "Bytes",
|
|
1340
|
-
"length":
|
|
1358
|
+
"length": 0
|
|
1341
1359
|
}
|
|
1342
1360
|
}
|
|
1343
1361
|
]
|
|
@@ -1608,7 +1626,7 @@
|
|
|
1608
1626
|
}
|
|
1609
1627
|
},
|
|
1610
1628
|
{
|
|
1611
|
-
"name": "
|
|
1629
|
+
"name": "constructSignBidirectionalEventV1_1_0_0_34",
|
|
1612
1630
|
"pure": true,
|
|
1613
1631
|
"proof": false,
|
|
1614
1632
|
"arguments": [
|
|
@@ -1858,7 +1876,7 @@
|
|
|
1858
1876
|
"name": "respondSerializationSchema",
|
|
1859
1877
|
"type": {
|
|
1860
1878
|
"type-name": "Bytes",
|
|
1861
|
-
"length":
|
|
1879
|
+
"length": 0
|
|
1862
1880
|
}
|
|
1863
1881
|
}
|
|
1864
1882
|
]
|
|
@@ -2109,7 +2127,7 @@
|
|
|
2109
2127
|
"name": "respondSerializationSchema",
|
|
2110
2128
|
"type": {
|
|
2111
2129
|
"type-name": "Bytes",
|
|
2112
|
-
"length":
|
|
2130
|
+
"length": 0
|
|
2113
2131
|
}
|
|
2114
2132
|
}
|
|
2115
2133
|
]
|
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
"type": "directory",
|
|
8
8
|
"contract-info.json": {
|
|
9
9
|
"type": "file",
|
|
10
|
-
"size":
|
|
11
|
-
"hash": "
|
|
10
|
+
"size": 62336,
|
|
11
|
+
"hash": "2c695611a4b0e4a60933cdf64d8e23b4de6238445322cf7873160e8217bc4677"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"contract": {
|
|
15
15
|
"type": "directory",
|
|
16
16
|
"index.d.ts": {
|
|
17
17
|
"type": "file",
|
|
18
|
-
"size":
|
|
19
|
-
"hash": "
|
|
18
|
+
"size": 43425,
|
|
19
|
+
"hash": "2ee224eeb52643d8577c8b6c22e8ef40d82312a7dfd515dbdb0834b9b7ed3fbf"
|
|
20
20
|
},
|
|
21
21
|
"index.js": {
|
|
22
22
|
"type": "file",
|
|
23
|
-
"size":
|
|
24
|
-
"hash": "
|
|
23
|
+
"size": 132263,
|
|
24
|
+
"hash": "675560d58c594b843dc936cc66528e6defe73d1ab4db6cdb41f1760514084695"
|
|
25
25
|
},
|
|
26
26
|
"index.js.map": {
|
|
27
27
|
"type": "file",
|
|
28
|
-
"size":
|
|
29
|
-
"hash": "
|
|
28
|
+
"size": 10289,
|
|
29
|
+
"hash": "bcfe97de649ecbff1e65c572ea62ec4f4cf90e6729a2203cbaf91968a525651d"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|