@ark-us/wasmxjs 0.0.1 → 0.0.2
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/main/codegen/cosmos/bundle.js +4 -4
- package/main/codegen/wasmx/bundle.js +18 -8
- package/main/codegen/wasmx/client.js +4 -2
- package/main/codegen/wasmx/rpc.query.js +11 -4
- package/main/codegen/wasmx/rpc.tx.js +13 -4
- package/main/codegen/wasmx/wasmx/contract.js +66 -18
- package/main/codegen/wasmx/wasmx/genesis.js +44 -14
- package/main/codegen/wasmx/wasmx/tx.amino.js +106 -68
- package/main/codegen/wasmx/wasmx/tx.js +221 -12
- package/main/codegen/wasmx/wasmx/tx.registry.js +61 -1
- package/main/codegen/wasmx/wasmx/tx.rpc.msg.js +20 -0
- package/main/codegen/wasmx/websrv/genesis.js +59 -0
- package/main/codegen/wasmx/websrv/params.js +59 -0
- package/main/codegen/wasmx/websrv/proposal.js +167 -0
- package/main/codegen/wasmx/websrv/query.js +806 -0
- package/main/codegen/wasmx/websrv/query.rpc.Query.js +128 -0
- package/main/codegen/wasmx/websrv/tx.amino.js +71 -0
- package/main/codegen/wasmx/websrv/tx.js +312 -0
- package/main/codegen/wasmx/websrv/tx.registry.js +123 -0
- package/main/codegen/wasmx/websrv/tx.rpc.msg.js +55 -0
- package/module/codegen/cosmos/bundle.js +4 -4
- package/module/codegen/wasmx/bundle.js +18 -8
- package/module/codegen/wasmx/client.js +4 -2
- package/module/codegen/wasmx/rpc.query.js +2 -1
- package/module/codegen/wasmx/rpc.tx.js +2 -1
- package/module/codegen/wasmx/wasmx/contract.js +62 -16
- package/module/codegen/wasmx/wasmx/genesis.js +45 -15
- package/module/codegen/wasmx/wasmx/tx.amino.js +42 -0
- package/module/codegen/wasmx/wasmx/tx.js +211 -10
- package/module/codegen/wasmx/wasmx/tx.registry.js +62 -2
- package/module/codegen/wasmx/wasmx/tx.rpc.msg.js +13 -1
- package/module/codegen/wasmx/websrv/genesis.js +50 -0
- package/module/codegen/wasmx/websrv/params.js +50 -0
- package/module/codegen/wasmx/websrv/proposal.js +156 -0
- package/module/codegen/wasmx/websrv/query.js +739 -0
- package/module/codegen/wasmx/websrv/query.rpc.Query.js +83 -0
- package/module/codegen/wasmx/websrv/tx.amino.js +70 -0
- package/module/codegen/wasmx/websrv/tx.js +291 -0
- package/module/codegen/wasmx/websrv/tx.registry.js +109 -0
- package/module/codegen/wasmx/websrv/tx.rpc.msg.js +29 -0
- package/package.json +1 -1
- package/src/codegen/cosmos/bundle.ts +4 -4
- package/src/codegen/wasmx/bundle.ts +28 -9
- package/src/codegen/wasmx/client.ts +5 -2
- package/src/codegen/wasmx/rpc.query.ts +2 -1
- package/src/codegen/wasmx/rpc.tx.ts +2 -1
- package/src/codegen/wasmx/wasmx/contract.ts +90 -19
- package/src/codegen/wasmx/wasmx/genesis.ts +68 -18
- package/src/codegen/wasmx/wasmx/tx.amino.ts +57 -1
- package/src/codegen/wasmx/wasmx/tx.registry.ts +72 -2
- package/src/codegen/wasmx/wasmx/tx.rpc.msg.ts +21 -1
- package/src/codegen/wasmx/wasmx/tx.ts +302 -0
- package/src/codegen/wasmx/websrv/genesis.ts +70 -0
- package/src/codegen/wasmx/websrv/params.ts +69 -0
- package/src/codegen/wasmx/websrv/proposal.ts +254 -0
- package/src/codegen/wasmx/websrv/query.rpc.Query.ts +121 -0
- package/src/codegen/wasmx/websrv/query.ts +1151 -0
- package/src/codegen/wasmx/websrv/tx.amino.ts +94 -0
- package/src/codegen/wasmx/websrv/tx.registry.ts +125 -0
- package/src/codegen/wasmx/websrv/tx.rpc.msg.ts +44 -0
- package/src/codegen/wasmx/websrv/tx.ts +406 -0
- package/types/codegen/cosmos/bundle.d.ts +2 -2
- package/types/codegen/wasmx/bundle.d.ts +418 -5
- package/types/codegen/wasmx/client.d.ts +69 -12
- package/types/codegen/wasmx/rpc.query.d.ts +18 -9
- package/types/codegen/wasmx/rpc.tx.d.ts +1 -0
- package/types/codegen/wasmx/wasmx/contract.d.ts +19 -2
- package/types/codegen/wasmx/wasmx/genesis.d.ts +19 -5
- package/types/codegen/wasmx/wasmx/tx.amino.d.ts +25 -1
- package/types/codegen/wasmx/wasmx/tx.d.ts +72 -0
- package/types/codegen/wasmx/wasmx/tx.registry.d.ts +41 -1
- package/types/codegen/wasmx/wasmx/tx.rpc.msg.d.ts +7 -1
- package/types/codegen/wasmx/websrv/genesis.d.ts +17 -0
- package/types/codegen/wasmx/websrv/params.d.ts +16 -0
- package/types/codegen/wasmx/websrv/proposal.d.ts +65 -0
- package/types/codegen/wasmx/websrv/query.d.ts +315 -0
- package/types/codegen/wasmx/websrv/query.rpc.Query.d.ts +40 -0
- package/types/codegen/wasmx/websrv/tx.amino.d.ts +41 -0
- package/types/codegen/wasmx/websrv/tx.d.ts +90 -0
- package/types/codegen/wasmx/websrv/tx.registry.d.ts +76 -0
- package/types/codegen/wasmx/websrv/tx.rpc.msg.d.ts +18 -0
|
@@ -16,7 +16,8 @@ export const createRPCQueryClient = async ({
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
wasmx: {
|
|
19
|
-
wasmx: (await import("./wasmx/query.rpc.Query")).createRpcQueryExtension(client)
|
|
19
|
+
wasmx: (await import("./wasmx/query.rpc.Query")).createRpcQueryExtension(client),
|
|
20
|
+
websrv: (await import("./websrv/query.rpc.Query")).createRpcQueryExtension(client)
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
};
|
|
@@ -5,6 +5,7 @@ export const createRPCMsgClient = async ({
|
|
|
5
5
|
rpc: Rpc;
|
|
6
6
|
}) => ({
|
|
7
7
|
wasmx: {
|
|
8
|
-
wasmx: new (await import("./wasmx/tx.rpc.msg")).MsgClientImpl(rpc)
|
|
8
|
+
wasmx: new (await import("./wasmx/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
9
|
+
websrv: new (await import("./websrv/tx.rpc.msg")).MsgClientImpl(rpc)
|
|
9
10
|
}
|
|
10
11
|
});
|
|
@@ -32,8 +32,9 @@ export interface CodeInfo {
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
deps: string[];
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
/** Pinned contract */
|
|
36
|
+
|
|
37
|
+
pinned: boolean;
|
|
37
38
|
}
|
|
38
39
|
/** CodeInfo is data for the uploaded contract WASM code */
|
|
39
40
|
|
|
@@ -49,6 +50,19 @@ export interface CodeInfoSDKType {
|
|
|
49
50
|
*/
|
|
50
51
|
|
|
51
52
|
deps: string[];
|
|
53
|
+
/** Pinned contract */
|
|
54
|
+
|
|
55
|
+
pinned: boolean;
|
|
56
|
+
}
|
|
57
|
+
/** Metadata for each codeId */
|
|
58
|
+
|
|
59
|
+
export interface CodeMetadata {
|
|
60
|
+
abi: string;
|
|
61
|
+
jsonSchema: string;
|
|
62
|
+
}
|
|
63
|
+
/** Metadata for each codeId */
|
|
64
|
+
|
|
65
|
+
export interface CodeMetadataSDKType {
|
|
52
66
|
abi: string;
|
|
53
67
|
json_schema: string;
|
|
54
68
|
}
|
|
@@ -189,8 +203,7 @@ function createBaseCodeInfo(): CodeInfo {
|
|
|
189
203
|
codeHash: new Uint8Array(),
|
|
190
204
|
creator: "",
|
|
191
205
|
deps: [],
|
|
192
|
-
|
|
193
|
-
jsonSchema: ""
|
|
206
|
+
pinned: false
|
|
194
207
|
};
|
|
195
208
|
}
|
|
196
209
|
|
|
@@ -208,12 +221,8 @@ export const CodeInfo = {
|
|
|
208
221
|
writer.uint32(26).string(v!);
|
|
209
222
|
}
|
|
210
223
|
|
|
211
|
-
if (message.
|
|
212
|
-
writer.uint32(
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
if (message.jsonSchema !== "") {
|
|
216
|
-
writer.uint32(42).string(message.jsonSchema);
|
|
224
|
+
if (message.pinned === true) {
|
|
225
|
+
writer.uint32(32).bool(message.pinned);
|
|
217
226
|
}
|
|
218
227
|
|
|
219
228
|
return writer;
|
|
@@ -241,11 +250,7 @@ export const CodeInfo = {
|
|
|
241
250
|
break;
|
|
242
251
|
|
|
243
252
|
case 4:
|
|
244
|
-
message.
|
|
245
|
-
break;
|
|
246
|
-
|
|
247
|
-
case 5:
|
|
248
|
-
message.jsonSchema = reader.string();
|
|
253
|
+
message.pinned = reader.bool();
|
|
249
254
|
break;
|
|
250
255
|
|
|
251
256
|
default:
|
|
@@ -262,8 +267,7 @@ export const CodeInfo = {
|
|
|
262
267
|
codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(),
|
|
263
268
|
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
264
269
|
deps: Array.isArray(object?.deps) ? object.deps.map((e: any) => String(e)) : [],
|
|
265
|
-
|
|
266
|
-
jsonSchema: isSet(object.jsonSchema) ? String(object.jsonSchema) : ""
|
|
270
|
+
pinned: isSet(object.pinned) ? Boolean(object.pinned) : false
|
|
267
271
|
};
|
|
268
272
|
},
|
|
269
273
|
|
|
@@ -278,8 +282,7 @@ export const CodeInfo = {
|
|
|
278
282
|
obj.deps = [];
|
|
279
283
|
}
|
|
280
284
|
|
|
281
|
-
message.
|
|
282
|
-
message.jsonSchema !== undefined && (obj.jsonSchema = message.jsonSchema);
|
|
285
|
+
message.pinned !== undefined && (obj.pinned = message.pinned);
|
|
283
286
|
return obj;
|
|
284
287
|
},
|
|
285
288
|
|
|
@@ -288,6 +291,74 @@ export const CodeInfo = {
|
|
|
288
291
|
message.codeHash = object.codeHash ?? new Uint8Array();
|
|
289
292
|
message.creator = object.creator ?? "";
|
|
290
293
|
message.deps = object.deps?.map(e => e) || [];
|
|
294
|
+
message.pinned = object.pinned ?? false;
|
|
295
|
+
return message;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
function createBaseCodeMetadata(): CodeMetadata {
|
|
301
|
+
return {
|
|
302
|
+
abi: "",
|
|
303
|
+
jsonSchema: ""
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export const CodeMetadata = {
|
|
308
|
+
encode(message: CodeMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
309
|
+
if (message.abi !== "") {
|
|
310
|
+
writer.uint32(10).string(message.abi);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (message.jsonSchema !== "") {
|
|
314
|
+
writer.uint32(18).string(message.jsonSchema);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return writer;
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): CodeMetadata {
|
|
321
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
322
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
323
|
+
const message = createBaseCodeMetadata();
|
|
324
|
+
|
|
325
|
+
while (reader.pos < end) {
|
|
326
|
+
const tag = reader.uint32();
|
|
327
|
+
|
|
328
|
+
switch (tag >>> 3) {
|
|
329
|
+
case 1:
|
|
330
|
+
message.abi = reader.string();
|
|
331
|
+
break;
|
|
332
|
+
|
|
333
|
+
case 2:
|
|
334
|
+
message.jsonSchema = reader.string();
|
|
335
|
+
break;
|
|
336
|
+
|
|
337
|
+
default:
|
|
338
|
+
reader.skipType(tag & 7);
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
return message;
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
fromJSON(object: any): CodeMetadata {
|
|
347
|
+
return {
|
|
348
|
+
abi: isSet(object.abi) ? String(object.abi) : "",
|
|
349
|
+
jsonSchema: isSet(object.jsonSchema) ? String(object.jsonSchema) : ""
|
|
350
|
+
};
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
toJSON(message: CodeMetadata): unknown {
|
|
354
|
+
const obj: any = {};
|
|
355
|
+
message.abi !== undefined && (obj.abi = message.abi);
|
|
356
|
+
message.jsonSchema !== undefined && (obj.jsonSchema = message.jsonSchema);
|
|
357
|
+
return obj;
|
|
358
|
+
},
|
|
359
|
+
|
|
360
|
+
fromPartial(object: Partial<CodeMetadata>): CodeMetadata {
|
|
361
|
+
const message = createBaseCodeMetadata();
|
|
291
362
|
message.abi = object.abi ?? "";
|
|
292
363
|
message.jsonSchema = object.jsonSchema ?? "";
|
|
293
364
|
return message;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Params, ParamsSDKType } from "./params";
|
|
2
|
-
import { CodeInfo, CodeInfoSDKType, ContractInfo, ContractInfoSDKType, ContractStorage, ContractStorageSDKType } from "./contract";
|
|
2
|
+
import { CodeInfo, CodeInfoSDKType, CodeMetadata, CodeMetadataSDKType, ContractInfo, ContractInfoSDKType, ContractStorage, ContractStorageSDKType } from "./contract";
|
|
3
3
|
import * as _m0 from "protobufjs/minimal";
|
|
4
4
|
import { isSet, bytesFromBase64, base64FromBytes, Long } from "../../helpers";
|
|
5
5
|
/** GenesisState defines the wasmx module's genesis state. */
|
|
@@ -13,6 +13,13 @@ export interface GenesisState {
|
|
|
13
13
|
codes: Code[];
|
|
14
14
|
contracts: Contract[];
|
|
15
15
|
sequences: Sequence[];
|
|
16
|
+
/**
|
|
17
|
+
* not recommended
|
|
18
|
+
* initiate pinned/AOT compiled contracts from a provided folder
|
|
19
|
+
* instead of compiling the contracts from wasm
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
compiledFolderPath: string;
|
|
16
23
|
}
|
|
17
24
|
/** GenesisState defines the wasmx module's genesis state. */
|
|
18
25
|
|
|
@@ -25,16 +32,27 @@ export interface GenesisStateSDKType {
|
|
|
25
32
|
codes: CodeSDKType[];
|
|
26
33
|
contracts: ContractSDKType[];
|
|
27
34
|
sequences: SequenceSDKType[];
|
|
35
|
+
/**
|
|
36
|
+
* not recommended
|
|
37
|
+
* initiate pinned/AOT compiled contracts from a provided folder
|
|
38
|
+
* instead of compiling the contracts from wasm
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
compiled_folder_path: string;
|
|
28
42
|
}
|
|
29
43
|
export interface SystemContract {
|
|
30
44
|
address: string;
|
|
31
45
|
label: string;
|
|
32
46
|
initMessage: Uint8Array;
|
|
47
|
+
pinned: boolean;
|
|
48
|
+
native: boolean;
|
|
33
49
|
}
|
|
34
50
|
export interface SystemContractSDKType {
|
|
35
51
|
address: string;
|
|
36
52
|
label: string;
|
|
37
53
|
init_message: Uint8Array;
|
|
54
|
+
pinned: boolean;
|
|
55
|
+
native: boolean;
|
|
38
56
|
}
|
|
39
57
|
/** Code - for importing and exporting code data */
|
|
40
58
|
|
|
@@ -42,9 +60,7 @@ export interface Code {
|
|
|
42
60
|
codeId: Long;
|
|
43
61
|
codeInfo?: CodeInfo;
|
|
44
62
|
codeBytes: Uint8Array;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
pinned: boolean;
|
|
63
|
+
codeMetadata?: CodeMetadata;
|
|
48
64
|
}
|
|
49
65
|
/** Code - for importing and exporting code data */
|
|
50
66
|
|
|
@@ -52,9 +68,7 @@ export interface CodeSDKType {
|
|
|
52
68
|
code_id: Long;
|
|
53
69
|
code_info?: CodeInfoSDKType;
|
|
54
70
|
code_bytes: Uint8Array;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
pinned: boolean;
|
|
71
|
+
code_metadata?: CodeMetadataSDKType;
|
|
58
72
|
}
|
|
59
73
|
/** Contract struct encompasses ContractAddress, ContractInfo, and ContractState */
|
|
60
74
|
|
|
@@ -90,7 +104,8 @@ function createBaseGenesisState(): GenesisState {
|
|
|
90
104
|
systemContracts: [],
|
|
91
105
|
codes: [],
|
|
92
106
|
contracts: [],
|
|
93
|
-
sequences: []
|
|
107
|
+
sequences: [],
|
|
108
|
+
compiledFolderPath: ""
|
|
94
109
|
};
|
|
95
110
|
}
|
|
96
111
|
|
|
@@ -120,6 +135,10 @@ export const GenesisState = {
|
|
|
120
135
|
Sequence.encode(v!, writer.uint32(50).fork()).ldelim();
|
|
121
136
|
}
|
|
122
137
|
|
|
138
|
+
if (message.compiledFolderPath !== "") {
|
|
139
|
+
writer.uint32(58).string(message.compiledFolderPath);
|
|
140
|
+
}
|
|
141
|
+
|
|
123
142
|
return writer;
|
|
124
143
|
},
|
|
125
144
|
|
|
@@ -156,6 +175,10 @@ export const GenesisState = {
|
|
|
156
175
|
message.sequences.push(Sequence.decode(reader, reader.uint32()));
|
|
157
176
|
break;
|
|
158
177
|
|
|
178
|
+
case 7:
|
|
179
|
+
message.compiledFolderPath = reader.string();
|
|
180
|
+
break;
|
|
181
|
+
|
|
159
182
|
default:
|
|
160
183
|
reader.skipType(tag & 7);
|
|
161
184
|
break;
|
|
@@ -172,7 +195,8 @@ export const GenesisState = {
|
|
|
172
195
|
systemContracts: Array.isArray(object?.systemContracts) ? object.systemContracts.map((e: any) => SystemContract.fromJSON(e)) : [],
|
|
173
196
|
codes: Array.isArray(object?.codes) ? object.codes.map((e: any) => Code.fromJSON(e)) : [],
|
|
174
197
|
contracts: Array.isArray(object?.contracts) ? object.contracts.map((e: any) => Contract.fromJSON(e)) : [],
|
|
175
|
-
sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Sequence.fromJSON(e)) : []
|
|
198
|
+
sequences: Array.isArray(object?.sequences) ? object.sequences.map((e: any) => Sequence.fromJSON(e)) : [],
|
|
199
|
+
compiledFolderPath: isSet(object.compiledFolderPath) ? String(object.compiledFolderPath) : ""
|
|
176
200
|
};
|
|
177
201
|
},
|
|
178
202
|
|
|
@@ -205,6 +229,7 @@ export const GenesisState = {
|
|
|
205
229
|
obj.sequences = [];
|
|
206
230
|
}
|
|
207
231
|
|
|
232
|
+
message.compiledFolderPath !== undefined && (obj.compiledFolderPath = message.compiledFolderPath);
|
|
208
233
|
return obj;
|
|
209
234
|
},
|
|
210
235
|
|
|
@@ -216,6 +241,7 @@ export const GenesisState = {
|
|
|
216
241
|
message.codes = object.codes?.map(e => Code.fromPartial(e)) || [];
|
|
217
242
|
message.contracts = object.contracts?.map(e => Contract.fromPartial(e)) || [];
|
|
218
243
|
message.sequences = object.sequences?.map(e => Sequence.fromPartial(e)) || [];
|
|
244
|
+
message.compiledFolderPath = object.compiledFolderPath ?? "";
|
|
219
245
|
return message;
|
|
220
246
|
}
|
|
221
247
|
|
|
@@ -225,7 +251,9 @@ function createBaseSystemContract(): SystemContract {
|
|
|
225
251
|
return {
|
|
226
252
|
address: "",
|
|
227
253
|
label: "",
|
|
228
|
-
initMessage: new Uint8Array()
|
|
254
|
+
initMessage: new Uint8Array(),
|
|
255
|
+
pinned: false,
|
|
256
|
+
native: false
|
|
229
257
|
};
|
|
230
258
|
}
|
|
231
259
|
|
|
@@ -243,6 +271,14 @@ export const SystemContract = {
|
|
|
243
271
|
writer.uint32(26).bytes(message.initMessage);
|
|
244
272
|
}
|
|
245
273
|
|
|
274
|
+
if (message.pinned === true) {
|
|
275
|
+
writer.uint32(32).bool(message.pinned);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (message.native === true) {
|
|
279
|
+
writer.uint32(40).bool(message.native);
|
|
280
|
+
}
|
|
281
|
+
|
|
246
282
|
return writer;
|
|
247
283
|
},
|
|
248
284
|
|
|
@@ -267,6 +303,14 @@ export const SystemContract = {
|
|
|
267
303
|
message.initMessage = reader.bytes();
|
|
268
304
|
break;
|
|
269
305
|
|
|
306
|
+
case 4:
|
|
307
|
+
message.pinned = reader.bool();
|
|
308
|
+
break;
|
|
309
|
+
|
|
310
|
+
case 5:
|
|
311
|
+
message.native = reader.bool();
|
|
312
|
+
break;
|
|
313
|
+
|
|
270
314
|
default:
|
|
271
315
|
reader.skipType(tag & 7);
|
|
272
316
|
break;
|
|
@@ -280,7 +324,9 @@ export const SystemContract = {
|
|
|
280
324
|
return {
|
|
281
325
|
address: isSet(object.address) ? String(object.address) : "",
|
|
282
326
|
label: isSet(object.label) ? String(object.label) : "",
|
|
283
|
-
initMessage: isSet(object.initMessage) ? bytesFromBase64(object.initMessage) : new Uint8Array()
|
|
327
|
+
initMessage: isSet(object.initMessage) ? bytesFromBase64(object.initMessage) : new Uint8Array(),
|
|
328
|
+
pinned: isSet(object.pinned) ? Boolean(object.pinned) : false,
|
|
329
|
+
native: isSet(object.native) ? Boolean(object.native) : false
|
|
284
330
|
};
|
|
285
331
|
},
|
|
286
332
|
|
|
@@ -289,6 +335,8 @@ export const SystemContract = {
|
|
|
289
335
|
message.address !== undefined && (obj.address = message.address);
|
|
290
336
|
message.label !== undefined && (obj.label = message.label);
|
|
291
337
|
message.initMessage !== undefined && (obj.initMessage = base64FromBytes(message.initMessage !== undefined ? message.initMessage : new Uint8Array()));
|
|
338
|
+
message.pinned !== undefined && (obj.pinned = message.pinned);
|
|
339
|
+
message.native !== undefined && (obj.native = message.native);
|
|
292
340
|
return obj;
|
|
293
341
|
},
|
|
294
342
|
|
|
@@ -297,6 +345,8 @@ export const SystemContract = {
|
|
|
297
345
|
message.address = object.address ?? "";
|
|
298
346
|
message.label = object.label ?? "";
|
|
299
347
|
message.initMessage = object.initMessage ?? new Uint8Array();
|
|
348
|
+
message.pinned = object.pinned ?? false;
|
|
349
|
+
message.native = object.native ?? false;
|
|
300
350
|
return message;
|
|
301
351
|
}
|
|
302
352
|
|
|
@@ -307,7 +357,7 @@ function createBaseCode(): Code {
|
|
|
307
357
|
codeId: Long.UZERO,
|
|
308
358
|
codeInfo: undefined,
|
|
309
359
|
codeBytes: new Uint8Array(),
|
|
310
|
-
|
|
360
|
+
codeMetadata: undefined
|
|
311
361
|
};
|
|
312
362
|
}
|
|
313
363
|
|
|
@@ -325,8 +375,8 @@ export const Code = {
|
|
|
325
375
|
writer.uint32(26).bytes(message.codeBytes);
|
|
326
376
|
}
|
|
327
377
|
|
|
328
|
-
if (message.
|
|
329
|
-
writer.uint32(
|
|
378
|
+
if (message.codeMetadata !== undefined) {
|
|
379
|
+
CodeMetadata.encode(message.codeMetadata, writer.uint32(34).fork()).ldelim();
|
|
330
380
|
}
|
|
331
381
|
|
|
332
382
|
return writer;
|
|
@@ -354,7 +404,7 @@ export const Code = {
|
|
|
354
404
|
break;
|
|
355
405
|
|
|
356
406
|
case 4:
|
|
357
|
-
message.
|
|
407
|
+
message.codeMetadata = CodeMetadata.decode(reader, reader.uint32());
|
|
358
408
|
break;
|
|
359
409
|
|
|
360
410
|
default:
|
|
@@ -371,7 +421,7 @@ export const Code = {
|
|
|
371
421
|
codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
|
|
372
422
|
codeInfo: isSet(object.codeInfo) ? CodeInfo.fromJSON(object.codeInfo) : undefined,
|
|
373
423
|
codeBytes: isSet(object.codeBytes) ? bytesFromBase64(object.codeBytes) : new Uint8Array(),
|
|
374
|
-
|
|
424
|
+
codeMetadata: isSet(object.codeMetadata) ? CodeMetadata.fromJSON(object.codeMetadata) : undefined
|
|
375
425
|
};
|
|
376
426
|
},
|
|
377
427
|
|
|
@@ -380,7 +430,7 @@ export const Code = {
|
|
|
380
430
|
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
|
381
431
|
message.codeInfo !== undefined && (obj.codeInfo = message.codeInfo ? CodeInfo.toJSON(message.codeInfo) : undefined);
|
|
382
432
|
message.codeBytes !== undefined && (obj.codeBytes = base64FromBytes(message.codeBytes !== undefined ? message.codeBytes : new Uint8Array()));
|
|
383
|
-
message.
|
|
433
|
+
message.codeMetadata !== undefined && (obj.codeMetadata = message.codeMetadata ? CodeMetadata.toJSON(message.codeMetadata) : undefined);
|
|
384
434
|
return obj;
|
|
385
435
|
},
|
|
386
436
|
|
|
@@ -389,7 +439,7 @@ export const Code = {
|
|
|
389
439
|
message.codeId = object.codeId !== undefined && object.codeId !== null ? Long.fromValue(object.codeId) : Long.UZERO;
|
|
390
440
|
message.codeInfo = object.codeInfo !== undefined && object.codeInfo !== null ? CodeInfo.fromPartial(object.codeInfo) : undefined;
|
|
391
441
|
message.codeBytes = object.codeBytes ?? new Uint8Array();
|
|
392
|
-
message.
|
|
442
|
+
message.codeMetadata = object.codeMetadata !== undefined && object.codeMetadata !== null ? CodeMetadata.fromPartial(object.codeMetadata) : undefined;
|
|
393
443
|
return message;
|
|
394
444
|
}
|
|
395
445
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AminoMsg } from "@cosmjs/amino";
|
|
2
2
|
import { fromUtf8, toUtf8 } from "@cosmjs/encoding";
|
|
3
3
|
import { Long } from "../../helpers";
|
|
4
|
-
import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgExecuteWithOriginContract, MsgExecuteDelegateContract } from "./tx";
|
|
4
|
+
import { MsgStoreCode, MsgStoreCodeEvm, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgExecuteWithOriginContract, MsgExecuteDelegateContract, MsgCompileContract } from "./tx";
|
|
5
5
|
export interface AminoMsgStoreCode extends AminoMsg {
|
|
6
6
|
type: "/wasmx.wasmx.MsgStoreCode";
|
|
7
7
|
value: {
|
|
@@ -9,6 +9,13 @@ export interface AminoMsgStoreCode extends AminoMsg {
|
|
|
9
9
|
wasm_byte_code: Uint8Array;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
+
export interface AminoMsgStoreCodeEvm extends AminoMsg {
|
|
13
|
+
type: "/wasmx.wasmx.MsgStoreCodeEvm";
|
|
14
|
+
value: {
|
|
15
|
+
sender: string;
|
|
16
|
+
evm_byte_code: Uint8Array;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
12
19
|
export interface AminoMsgInstantiateContract extends AminoMsg {
|
|
13
20
|
type: "/wasmx.wasmx.MsgInstantiateContract";
|
|
14
21
|
value: {
|
|
@@ -78,6 +85,13 @@ export interface AminoMsgExecuteDelegateContract extends AminoMsg {
|
|
|
78
85
|
}[];
|
|
79
86
|
};
|
|
80
87
|
}
|
|
88
|
+
export interface AminoMsgCompileContract extends AminoMsg {
|
|
89
|
+
type: "/wasmx.wasmx.MsgCompileContract";
|
|
90
|
+
value: {
|
|
91
|
+
sender: string;
|
|
92
|
+
codeId: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
81
95
|
export const AminoConverter = {
|
|
82
96
|
"/wasmx.wasmx.MsgStoreCode": {
|
|
83
97
|
aminoType: "/wasmx.wasmx.MsgStoreCode",
|
|
@@ -100,6 +114,27 @@ export const AminoConverter = {
|
|
|
100
114
|
};
|
|
101
115
|
}
|
|
102
116
|
},
|
|
117
|
+
"/wasmx.wasmx.MsgStoreCodeEvm": {
|
|
118
|
+
aminoType: "/wasmx.wasmx.MsgStoreCodeEvm",
|
|
119
|
+
toAmino: ({
|
|
120
|
+
sender,
|
|
121
|
+
evmByteCode
|
|
122
|
+
}: MsgStoreCodeEvm): AminoMsgStoreCodeEvm["value"] => {
|
|
123
|
+
return {
|
|
124
|
+
sender,
|
|
125
|
+
evm_byte_code: evmByteCode
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
fromAmino: ({
|
|
129
|
+
sender,
|
|
130
|
+
evm_byte_code
|
|
131
|
+
}: AminoMsgStoreCodeEvm["value"]): MsgStoreCodeEvm => {
|
|
132
|
+
return {
|
|
133
|
+
sender,
|
|
134
|
+
evmByteCode: evm_byte_code
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
},
|
|
103
138
|
"/wasmx.wasmx.MsgInstantiateContract": {
|
|
104
139
|
aminoType: "/wasmx.wasmx.MsgInstantiateContract",
|
|
105
140
|
toAmino: ({
|
|
@@ -310,5 +345,26 @@ export const AminoConverter = {
|
|
|
310
345
|
}))
|
|
311
346
|
};
|
|
312
347
|
}
|
|
348
|
+
},
|
|
349
|
+
"/wasmx.wasmx.MsgCompileContract": {
|
|
350
|
+
aminoType: "/wasmx.wasmx.MsgCompileContract",
|
|
351
|
+
toAmino: ({
|
|
352
|
+
sender,
|
|
353
|
+
codeId
|
|
354
|
+
}: MsgCompileContract): AminoMsgCompileContract["value"] => {
|
|
355
|
+
return {
|
|
356
|
+
sender,
|
|
357
|
+
codeId: codeId.toString()
|
|
358
|
+
};
|
|
359
|
+
},
|
|
360
|
+
fromAmino: ({
|
|
361
|
+
sender,
|
|
362
|
+
codeId
|
|
363
|
+
}: AminoMsgCompileContract["value"]): MsgCompileContract => {
|
|
364
|
+
return {
|
|
365
|
+
sender,
|
|
366
|
+
codeId: Long.fromString(codeId)
|
|
367
|
+
};
|
|
368
|
+
}
|
|
313
369
|
}
|
|
314
370
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GeneratedType, Registry } from "@cosmjs/proto-signing";
|
|
2
|
-
import { MsgStoreCode, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgExecuteWithOriginContract, MsgExecuteDelegateContract } from "./tx";
|
|
3
|
-
export const registry: ReadonlyArray<[string, GeneratedType]> = [["/wasmx.wasmx.MsgStoreCode", MsgStoreCode], ["/wasmx.wasmx.MsgInstantiateContract", MsgInstantiateContract], ["/wasmx.wasmx.MsgInstantiateContract2", MsgInstantiateContract2], ["/wasmx.wasmx.MsgExecuteContract", MsgExecuteContract], ["/wasmx.wasmx.MsgExecuteWithOriginContract", MsgExecuteWithOriginContract], ["/wasmx.wasmx.MsgExecuteDelegateContract", MsgExecuteDelegateContract]];
|
|
2
|
+
import { MsgStoreCode, MsgStoreCodeEvm, MsgInstantiateContract, MsgInstantiateContract2, MsgExecuteContract, MsgExecuteWithOriginContract, MsgExecuteDelegateContract, MsgCompileContract } from "./tx";
|
|
3
|
+
export const registry: ReadonlyArray<[string, GeneratedType]> = [["/wasmx.wasmx.MsgStoreCode", MsgStoreCode], ["/wasmx.wasmx.MsgStoreCodeEvm", MsgStoreCodeEvm], ["/wasmx.wasmx.MsgInstantiateContract", MsgInstantiateContract], ["/wasmx.wasmx.MsgInstantiateContract2", MsgInstantiateContract2], ["/wasmx.wasmx.MsgExecuteContract", MsgExecuteContract], ["/wasmx.wasmx.MsgExecuteWithOriginContract", MsgExecuteWithOriginContract], ["/wasmx.wasmx.MsgExecuteDelegateContract", MsgExecuteDelegateContract], ["/wasmx.wasmx.MsgCompileContract", MsgCompileContract]];
|
|
4
4
|
export const load = (protoRegistry: Registry) => {
|
|
5
5
|
registry.forEach(([typeUrl, mod]) => {
|
|
6
6
|
protoRegistry.register(typeUrl, mod);
|
|
@@ -15,6 +15,13 @@ export const MessageComposer = {
|
|
|
15
15
|
};
|
|
16
16
|
},
|
|
17
17
|
|
|
18
|
+
storeCodeEvm(value: MsgStoreCodeEvm) {
|
|
19
|
+
return {
|
|
20
|
+
typeUrl: "/wasmx.wasmx.MsgStoreCodeEvm",
|
|
21
|
+
value: MsgStoreCodeEvm.encode(value).finish()
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
|
|
18
25
|
instantiateContract(value: MsgInstantiateContract) {
|
|
19
26
|
return {
|
|
20
27
|
typeUrl: "/wasmx.wasmx.MsgInstantiateContract",
|
|
@@ -48,6 +55,13 @@ export const MessageComposer = {
|
|
|
48
55
|
typeUrl: "/wasmx.wasmx.MsgExecuteDelegateContract",
|
|
49
56
|
value: MsgExecuteDelegateContract.encode(value).finish()
|
|
50
57
|
};
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
compileContract(value: MsgCompileContract) {
|
|
61
|
+
return {
|
|
62
|
+
typeUrl: "/wasmx.wasmx.MsgCompileContract",
|
|
63
|
+
value: MsgCompileContract.encode(value).finish()
|
|
64
|
+
};
|
|
51
65
|
}
|
|
52
66
|
|
|
53
67
|
},
|
|
@@ -59,6 +73,13 @@ export const MessageComposer = {
|
|
|
59
73
|
};
|
|
60
74
|
},
|
|
61
75
|
|
|
76
|
+
storeCodeEvm(value: MsgStoreCodeEvm) {
|
|
77
|
+
return {
|
|
78
|
+
typeUrl: "/wasmx.wasmx.MsgStoreCodeEvm",
|
|
79
|
+
value
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
|
|
62
83
|
instantiateContract(value: MsgInstantiateContract) {
|
|
63
84
|
return {
|
|
64
85
|
typeUrl: "/wasmx.wasmx.MsgInstantiateContract",
|
|
@@ -92,6 +113,13 @@ export const MessageComposer = {
|
|
|
92
113
|
typeUrl: "/wasmx.wasmx.MsgExecuteDelegateContract",
|
|
93
114
|
value
|
|
94
115
|
};
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
compileContract(value: MsgCompileContract) {
|
|
119
|
+
return {
|
|
120
|
+
typeUrl: "/wasmx.wasmx.MsgCompileContract",
|
|
121
|
+
value
|
|
122
|
+
};
|
|
95
123
|
}
|
|
96
124
|
|
|
97
125
|
},
|
|
@@ -103,6 +131,13 @@ export const MessageComposer = {
|
|
|
103
131
|
};
|
|
104
132
|
},
|
|
105
133
|
|
|
134
|
+
storeCodeEvm(value: MsgStoreCodeEvm) {
|
|
135
|
+
return {
|
|
136
|
+
typeUrl: "/wasmx.wasmx.MsgStoreCodeEvm",
|
|
137
|
+
value: MsgStoreCodeEvm.toJSON(value)
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
|
|
106
141
|
instantiateContract(value: MsgInstantiateContract) {
|
|
107
142
|
return {
|
|
108
143
|
typeUrl: "/wasmx.wasmx.MsgInstantiateContract",
|
|
@@ -136,6 +171,13 @@ export const MessageComposer = {
|
|
|
136
171
|
typeUrl: "/wasmx.wasmx.MsgExecuteDelegateContract",
|
|
137
172
|
value: MsgExecuteDelegateContract.toJSON(value)
|
|
138
173
|
};
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
compileContract(value: MsgCompileContract) {
|
|
177
|
+
return {
|
|
178
|
+
typeUrl: "/wasmx.wasmx.MsgCompileContract",
|
|
179
|
+
value: MsgCompileContract.toJSON(value)
|
|
180
|
+
};
|
|
139
181
|
}
|
|
140
182
|
|
|
141
183
|
},
|
|
@@ -147,6 +189,13 @@ export const MessageComposer = {
|
|
|
147
189
|
};
|
|
148
190
|
},
|
|
149
191
|
|
|
192
|
+
storeCodeEvm(value: any) {
|
|
193
|
+
return {
|
|
194
|
+
typeUrl: "/wasmx.wasmx.MsgStoreCodeEvm",
|
|
195
|
+
value: MsgStoreCodeEvm.fromJSON(value)
|
|
196
|
+
};
|
|
197
|
+
},
|
|
198
|
+
|
|
150
199
|
instantiateContract(value: any) {
|
|
151
200
|
return {
|
|
152
201
|
typeUrl: "/wasmx.wasmx.MsgInstantiateContract",
|
|
@@ -180,6 +229,13 @@ export const MessageComposer = {
|
|
|
180
229
|
typeUrl: "/wasmx.wasmx.MsgExecuteDelegateContract",
|
|
181
230
|
value: MsgExecuteDelegateContract.fromJSON(value)
|
|
182
231
|
};
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
compileContract(value: any) {
|
|
235
|
+
return {
|
|
236
|
+
typeUrl: "/wasmx.wasmx.MsgCompileContract",
|
|
237
|
+
value: MsgCompileContract.fromJSON(value)
|
|
238
|
+
};
|
|
183
239
|
}
|
|
184
240
|
|
|
185
241
|
},
|
|
@@ -191,6 +247,13 @@ export const MessageComposer = {
|
|
|
191
247
|
};
|
|
192
248
|
},
|
|
193
249
|
|
|
250
|
+
storeCodeEvm(value: MsgStoreCodeEvm) {
|
|
251
|
+
return {
|
|
252
|
+
typeUrl: "/wasmx.wasmx.MsgStoreCodeEvm",
|
|
253
|
+
value: MsgStoreCodeEvm.fromPartial(value)
|
|
254
|
+
};
|
|
255
|
+
},
|
|
256
|
+
|
|
194
257
|
instantiateContract(value: MsgInstantiateContract) {
|
|
195
258
|
return {
|
|
196
259
|
typeUrl: "/wasmx.wasmx.MsgInstantiateContract",
|
|
@@ -224,6 +287,13 @@ export const MessageComposer = {
|
|
|
224
287
|
typeUrl: "/wasmx.wasmx.MsgExecuteDelegateContract",
|
|
225
288
|
value: MsgExecuteDelegateContract.fromPartial(value)
|
|
226
289
|
};
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
compileContract(value: MsgCompileContract) {
|
|
293
|
+
return {
|
|
294
|
+
typeUrl: "/wasmx.wasmx.MsgCompileContract",
|
|
295
|
+
value: MsgCompileContract.fromPartial(value)
|
|
296
|
+
};
|
|
227
297
|
}
|
|
228
298
|
|
|
229
299
|
}
|