@avaprotocol/sdk-js 2.1.0 → 2.1.1
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/CHANGELOG.md +6 -0
- package/dist/index.js +473 -40
- package/dist/index.mjs +473 -40
- package/dist/models/node/contractRead.d.ts.map +1 -1
- package/dist/models/node/contractRead.js +22 -5
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +10 -1
- package/dist/models/step.d.ts.map +1 -1
- package/dist/models/step.js +33 -4
- package/dist/models/trigger/event.js +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -66,6 +66,9 @@ var require_avs_pb = __commonJS({
|
|
|
66
66
|
goog.exportSymbol("proto.aggregator.BranchNode.Output", null, global);
|
|
67
67
|
goog.exportSymbol("proto.aggregator.ContractReadNode", null, global);
|
|
68
68
|
goog.exportSymbol("proto.aggregator.ContractReadNode.Config", null, global);
|
|
69
|
+
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodCall", null, global);
|
|
70
|
+
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodResult", null, global);
|
|
71
|
+
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodResult.StructuredField", null, global);
|
|
69
72
|
goog.exportSymbol("proto.aggregator.ContractReadNode.Output", null, global);
|
|
70
73
|
goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global);
|
|
71
74
|
goog.exportSymbol("proto.aggregator.ContractWriteNode.Config", null, global);
|
|
@@ -380,13 +383,34 @@ var require_avs_pb = __commonJS({
|
|
|
380
383
|
if (goog.DEBUG && !COMPILED) {
|
|
381
384
|
proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode";
|
|
382
385
|
}
|
|
383
|
-
proto.aggregator.ContractReadNode.
|
|
386
|
+
proto.aggregator.ContractReadNode.MethodCall = function(opt_data) {
|
|
384
387
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
385
388
|
};
|
|
389
|
+
goog.inherits(proto.aggregator.ContractReadNode.MethodCall, jspb.Message);
|
|
390
|
+
if (goog.DEBUG && !COMPILED) {
|
|
391
|
+
proto.aggregator.ContractReadNode.MethodCall.displayName = "proto.aggregator.ContractReadNode.MethodCall";
|
|
392
|
+
}
|
|
393
|
+
proto.aggregator.ContractReadNode.Config = function(opt_data) {
|
|
394
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ContractReadNode.Config.repeatedFields_, null);
|
|
395
|
+
};
|
|
386
396
|
goog.inherits(proto.aggregator.ContractReadNode.Config, jspb.Message);
|
|
387
397
|
if (goog.DEBUG && !COMPILED) {
|
|
388
398
|
proto.aggregator.ContractReadNode.Config.displayName = "proto.aggregator.ContractReadNode.Config";
|
|
389
399
|
}
|
|
400
|
+
proto.aggregator.ContractReadNode.MethodResult = function(opt_data) {
|
|
401
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ContractReadNode.MethodResult.repeatedFields_, null);
|
|
402
|
+
};
|
|
403
|
+
goog.inherits(proto.aggregator.ContractReadNode.MethodResult, jspb.Message);
|
|
404
|
+
if (goog.DEBUG && !COMPILED) {
|
|
405
|
+
proto.aggregator.ContractReadNode.MethodResult.displayName = "proto.aggregator.ContractReadNode.MethodResult";
|
|
406
|
+
}
|
|
407
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField = function(opt_data) {
|
|
408
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
409
|
+
};
|
|
410
|
+
goog.inherits(proto.aggregator.ContractReadNode.MethodResult.StructuredField, jspb.Message);
|
|
411
|
+
if (goog.DEBUG && !COMPILED) {
|
|
412
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.displayName = "proto.aggregator.ContractReadNode.MethodResult.StructuredField";
|
|
413
|
+
}
|
|
390
414
|
proto.aggregator.ContractReadNode.Output = function(opt_data) {
|
|
391
415
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ContractReadNode.Output.repeatedFields_, null);
|
|
392
416
|
};
|
|
@@ -3854,6 +3878,95 @@ var require_avs_pb = __commonJS({
|
|
|
3854
3878
|
);
|
|
3855
3879
|
}
|
|
3856
3880
|
};
|
|
3881
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3882
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.toObject = function(opt_includeInstance) {
|
|
3883
|
+
return proto.aggregator.ContractReadNode.MethodCall.toObject(opt_includeInstance, this);
|
|
3884
|
+
};
|
|
3885
|
+
proto.aggregator.ContractReadNode.MethodCall.toObject = function(includeInstance, msg) {
|
|
3886
|
+
var f, obj = {
|
|
3887
|
+
callData: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
3888
|
+
methodName: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
3889
|
+
};
|
|
3890
|
+
if (includeInstance) {
|
|
3891
|
+
obj.$jspbMessageInstance = msg;
|
|
3892
|
+
}
|
|
3893
|
+
return obj;
|
|
3894
|
+
};
|
|
3895
|
+
}
|
|
3896
|
+
proto.aggregator.ContractReadNode.MethodCall.deserializeBinary = function(bytes) {
|
|
3897
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
3898
|
+
var msg = new proto.aggregator.ContractReadNode.MethodCall();
|
|
3899
|
+
return proto.aggregator.ContractReadNode.MethodCall.deserializeBinaryFromReader(msg, reader);
|
|
3900
|
+
};
|
|
3901
|
+
proto.aggregator.ContractReadNode.MethodCall.deserializeBinaryFromReader = function(msg, reader) {
|
|
3902
|
+
while (reader.nextField()) {
|
|
3903
|
+
if (reader.isEndGroup()) {
|
|
3904
|
+
break;
|
|
3905
|
+
}
|
|
3906
|
+
var field = reader.getFieldNumber();
|
|
3907
|
+
switch (field) {
|
|
3908
|
+
case 1:
|
|
3909
|
+
var value = (
|
|
3910
|
+
/** @type {string} */
|
|
3911
|
+
reader.readString()
|
|
3912
|
+
);
|
|
3913
|
+
msg.setCallData(value);
|
|
3914
|
+
break;
|
|
3915
|
+
case 2:
|
|
3916
|
+
var value = (
|
|
3917
|
+
/** @type {string} */
|
|
3918
|
+
reader.readString()
|
|
3919
|
+
);
|
|
3920
|
+
msg.setMethodName(value);
|
|
3921
|
+
break;
|
|
3922
|
+
default:
|
|
3923
|
+
reader.skipField();
|
|
3924
|
+
break;
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
return msg;
|
|
3928
|
+
};
|
|
3929
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.serializeBinary = function() {
|
|
3930
|
+
var writer = new jspb.BinaryWriter();
|
|
3931
|
+
proto.aggregator.ContractReadNode.MethodCall.serializeBinaryToWriter(this, writer);
|
|
3932
|
+
return writer.getResultBuffer();
|
|
3933
|
+
};
|
|
3934
|
+
proto.aggregator.ContractReadNode.MethodCall.serializeBinaryToWriter = function(message, writer) {
|
|
3935
|
+
var f = void 0;
|
|
3936
|
+
f = message.getCallData();
|
|
3937
|
+
if (f.length > 0) {
|
|
3938
|
+
writer.writeString(
|
|
3939
|
+
1,
|
|
3940
|
+
f
|
|
3941
|
+
);
|
|
3942
|
+
}
|
|
3943
|
+
f = message.getMethodName();
|
|
3944
|
+
if (f.length > 0) {
|
|
3945
|
+
writer.writeString(
|
|
3946
|
+
2,
|
|
3947
|
+
f
|
|
3948
|
+
);
|
|
3949
|
+
}
|
|
3950
|
+
};
|
|
3951
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.getCallData = function() {
|
|
3952
|
+
return (
|
|
3953
|
+
/** @type {string} */
|
|
3954
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
3955
|
+
);
|
|
3956
|
+
};
|
|
3957
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.setCallData = function(value) {
|
|
3958
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
3959
|
+
};
|
|
3960
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.getMethodName = function() {
|
|
3961
|
+
return (
|
|
3962
|
+
/** @type {string} */
|
|
3963
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
3964
|
+
);
|
|
3965
|
+
};
|
|
3966
|
+
proto.aggregator.ContractReadNode.MethodCall.prototype.setMethodName = function(value) {
|
|
3967
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
3968
|
+
};
|
|
3969
|
+
proto.aggregator.ContractReadNode.Config.repeatedFields_ = [3];
|
|
3857
3970
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3858
3971
|
proto.aggregator.ContractReadNode.Config.prototype.toObject = function(opt_includeInstance) {
|
|
3859
3972
|
return proto.aggregator.ContractReadNode.Config.toObject(opt_includeInstance, this);
|
|
@@ -3861,8 +3974,12 @@ var require_avs_pb = __commonJS({
|
|
|
3861
3974
|
proto.aggregator.ContractReadNode.Config.toObject = function(includeInstance, msg) {
|
|
3862
3975
|
var f, obj = {
|
|
3863
3976
|
contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
3864
|
-
|
|
3865
|
-
|
|
3977
|
+
contractAbi: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
3978
|
+
methodCallsList: jspb.Message.toObjectList(
|
|
3979
|
+
msg.getMethodCallsList(),
|
|
3980
|
+
proto.aggregator.ContractReadNode.MethodCall.toObject,
|
|
3981
|
+
includeInstance
|
|
3982
|
+
)
|
|
3866
3983
|
};
|
|
3867
3984
|
if (includeInstance) {
|
|
3868
3985
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3894,14 +4011,12 @@ var require_avs_pb = __commonJS({
|
|
|
3894
4011
|
/** @type {string} */
|
|
3895
4012
|
reader.readString()
|
|
3896
4013
|
);
|
|
3897
|
-
msg.
|
|
4014
|
+
msg.setContractAbi(value);
|
|
3898
4015
|
break;
|
|
3899
4016
|
case 3:
|
|
3900
|
-
var value = (
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
);
|
|
3904
|
-
msg.setContractAbi(value);
|
|
4017
|
+
var value = new proto.aggregator.ContractReadNode.MethodCall();
|
|
4018
|
+
reader.readMessage(value, proto.aggregator.ContractReadNode.MethodCall.deserializeBinaryFromReader);
|
|
4019
|
+
msg.addMethodCalls(value);
|
|
3905
4020
|
break;
|
|
3906
4021
|
default:
|
|
3907
4022
|
reader.skipField();
|
|
@@ -3924,18 +4039,19 @@ var require_avs_pb = __commonJS({
|
|
|
3924
4039
|
f
|
|
3925
4040
|
);
|
|
3926
4041
|
}
|
|
3927
|
-
f = message.
|
|
4042
|
+
f = message.getContractAbi();
|
|
3928
4043
|
if (f.length > 0) {
|
|
3929
4044
|
writer.writeString(
|
|
3930
4045
|
2,
|
|
3931
4046
|
f
|
|
3932
4047
|
);
|
|
3933
4048
|
}
|
|
3934
|
-
f = message.
|
|
4049
|
+
f = message.getMethodCallsList();
|
|
3935
4050
|
if (f.length > 0) {
|
|
3936
|
-
writer.
|
|
4051
|
+
writer.writeRepeatedMessage(
|
|
3937
4052
|
3,
|
|
3938
|
-
f
|
|
4053
|
+
f,
|
|
4054
|
+
proto.aggregator.ContractReadNode.MethodCall.serializeBinaryToWriter
|
|
3939
4055
|
);
|
|
3940
4056
|
}
|
|
3941
4057
|
};
|
|
@@ -3948,24 +4064,288 @@ var require_avs_pb = __commonJS({
|
|
|
3948
4064
|
proto.aggregator.ContractReadNode.Config.prototype.setContractAddress = function(value) {
|
|
3949
4065
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
3950
4066
|
};
|
|
3951
|
-
proto.aggregator.ContractReadNode.Config.prototype.
|
|
4067
|
+
proto.aggregator.ContractReadNode.Config.prototype.getContractAbi = function() {
|
|
3952
4068
|
return (
|
|
3953
4069
|
/** @type {string} */
|
|
3954
4070
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
3955
4071
|
);
|
|
3956
4072
|
};
|
|
3957
|
-
proto.aggregator.ContractReadNode.Config.prototype.
|
|
4073
|
+
proto.aggregator.ContractReadNode.Config.prototype.setContractAbi = function(value) {
|
|
3958
4074
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
3959
4075
|
};
|
|
3960
|
-
proto.aggregator.ContractReadNode.Config.prototype.
|
|
4076
|
+
proto.aggregator.ContractReadNode.Config.prototype.getMethodCallsList = function() {
|
|
4077
|
+
return (
|
|
4078
|
+
/** @type{!Array<!proto.aggregator.ContractReadNode.MethodCall>} */
|
|
4079
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ContractReadNode.MethodCall, 3)
|
|
4080
|
+
);
|
|
4081
|
+
};
|
|
4082
|
+
proto.aggregator.ContractReadNode.Config.prototype.setMethodCallsList = function(value) {
|
|
4083
|
+
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
4084
|
+
};
|
|
4085
|
+
proto.aggregator.ContractReadNode.Config.prototype.addMethodCalls = function(opt_value, opt_index) {
|
|
4086
|
+
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.aggregator.ContractReadNode.MethodCall, opt_index);
|
|
4087
|
+
};
|
|
4088
|
+
proto.aggregator.ContractReadNode.Config.prototype.clearMethodCallsList = function() {
|
|
4089
|
+
return this.setMethodCallsList([]);
|
|
4090
|
+
};
|
|
4091
|
+
proto.aggregator.ContractReadNode.MethodResult.repeatedFields_ = [1];
|
|
4092
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4093
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.toObject = function(opt_includeInstance) {
|
|
4094
|
+
return proto.aggregator.ContractReadNode.MethodResult.toObject(opt_includeInstance, this);
|
|
4095
|
+
};
|
|
4096
|
+
proto.aggregator.ContractReadNode.MethodResult.toObject = function(includeInstance, msg) {
|
|
4097
|
+
var f, obj = {
|
|
4098
|
+
dataList: jspb.Message.toObjectList(
|
|
4099
|
+
msg.getDataList(),
|
|
4100
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.toObject,
|
|
4101
|
+
includeInstance
|
|
4102
|
+
),
|
|
4103
|
+
methodName: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4104
|
+
success: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
4105
|
+
error: jspb.Message.getFieldWithDefault(msg, 4, "")
|
|
4106
|
+
};
|
|
4107
|
+
if (includeInstance) {
|
|
4108
|
+
obj.$jspbMessageInstance = msg;
|
|
4109
|
+
}
|
|
4110
|
+
return obj;
|
|
4111
|
+
};
|
|
4112
|
+
}
|
|
4113
|
+
proto.aggregator.ContractReadNode.MethodResult.deserializeBinary = function(bytes) {
|
|
4114
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
4115
|
+
var msg = new proto.aggregator.ContractReadNode.MethodResult();
|
|
4116
|
+
return proto.aggregator.ContractReadNode.MethodResult.deserializeBinaryFromReader(msg, reader);
|
|
4117
|
+
};
|
|
4118
|
+
proto.aggregator.ContractReadNode.MethodResult.deserializeBinaryFromReader = function(msg, reader) {
|
|
4119
|
+
while (reader.nextField()) {
|
|
4120
|
+
if (reader.isEndGroup()) {
|
|
4121
|
+
break;
|
|
4122
|
+
}
|
|
4123
|
+
var field = reader.getFieldNumber();
|
|
4124
|
+
switch (field) {
|
|
4125
|
+
case 1:
|
|
4126
|
+
var value = new proto.aggregator.ContractReadNode.MethodResult.StructuredField();
|
|
4127
|
+
reader.readMessage(value, proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinaryFromReader);
|
|
4128
|
+
msg.addData(value);
|
|
4129
|
+
break;
|
|
4130
|
+
case 2:
|
|
4131
|
+
var value = (
|
|
4132
|
+
/** @type {string} */
|
|
4133
|
+
reader.readString()
|
|
4134
|
+
);
|
|
4135
|
+
msg.setMethodName(value);
|
|
4136
|
+
break;
|
|
4137
|
+
case 3:
|
|
4138
|
+
var value = (
|
|
4139
|
+
/** @type {boolean} */
|
|
4140
|
+
reader.readBool()
|
|
4141
|
+
);
|
|
4142
|
+
msg.setSuccess(value);
|
|
4143
|
+
break;
|
|
4144
|
+
case 4:
|
|
4145
|
+
var value = (
|
|
4146
|
+
/** @type {string} */
|
|
4147
|
+
reader.readString()
|
|
4148
|
+
);
|
|
4149
|
+
msg.setError(value);
|
|
4150
|
+
break;
|
|
4151
|
+
default:
|
|
4152
|
+
reader.skipField();
|
|
4153
|
+
break;
|
|
4154
|
+
}
|
|
4155
|
+
}
|
|
4156
|
+
return msg;
|
|
4157
|
+
};
|
|
4158
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.serializeBinary = function() {
|
|
4159
|
+
var writer = new jspb.BinaryWriter();
|
|
4160
|
+
proto.aggregator.ContractReadNode.MethodResult.serializeBinaryToWriter(this, writer);
|
|
4161
|
+
return writer.getResultBuffer();
|
|
4162
|
+
};
|
|
4163
|
+
proto.aggregator.ContractReadNode.MethodResult.serializeBinaryToWriter = function(message, writer) {
|
|
4164
|
+
var f = void 0;
|
|
4165
|
+
f = message.getDataList();
|
|
4166
|
+
if (f.length > 0) {
|
|
4167
|
+
writer.writeRepeatedMessage(
|
|
4168
|
+
1,
|
|
4169
|
+
f,
|
|
4170
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.serializeBinaryToWriter
|
|
4171
|
+
);
|
|
4172
|
+
}
|
|
4173
|
+
f = message.getMethodName();
|
|
4174
|
+
if (f.length > 0) {
|
|
4175
|
+
writer.writeString(
|
|
4176
|
+
2,
|
|
4177
|
+
f
|
|
4178
|
+
);
|
|
4179
|
+
}
|
|
4180
|
+
f = message.getSuccess();
|
|
4181
|
+
if (f) {
|
|
4182
|
+
writer.writeBool(
|
|
4183
|
+
3,
|
|
4184
|
+
f
|
|
4185
|
+
);
|
|
4186
|
+
}
|
|
4187
|
+
f = message.getError();
|
|
4188
|
+
if (f.length > 0) {
|
|
4189
|
+
writer.writeString(
|
|
4190
|
+
4,
|
|
4191
|
+
f
|
|
4192
|
+
);
|
|
4193
|
+
}
|
|
4194
|
+
};
|
|
4195
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4196
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.toObject = function(opt_includeInstance) {
|
|
4197
|
+
return proto.aggregator.ContractReadNode.MethodResult.StructuredField.toObject(opt_includeInstance, this);
|
|
4198
|
+
};
|
|
4199
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.toObject = function(includeInstance, msg) {
|
|
4200
|
+
var f, obj = {
|
|
4201
|
+
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
4202
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
4203
|
+
value: jspb.Message.getFieldWithDefault(msg, 3, "")
|
|
4204
|
+
};
|
|
4205
|
+
if (includeInstance) {
|
|
4206
|
+
obj.$jspbMessageInstance = msg;
|
|
4207
|
+
}
|
|
4208
|
+
return obj;
|
|
4209
|
+
};
|
|
4210
|
+
}
|
|
4211
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinary = function(bytes) {
|
|
4212
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
4213
|
+
var msg = new proto.aggregator.ContractReadNode.MethodResult.StructuredField();
|
|
4214
|
+
return proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinaryFromReader(msg, reader);
|
|
4215
|
+
};
|
|
4216
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.deserializeBinaryFromReader = function(msg, reader) {
|
|
4217
|
+
while (reader.nextField()) {
|
|
4218
|
+
if (reader.isEndGroup()) {
|
|
4219
|
+
break;
|
|
4220
|
+
}
|
|
4221
|
+
var field = reader.getFieldNumber();
|
|
4222
|
+
switch (field) {
|
|
4223
|
+
case 1:
|
|
4224
|
+
var value = (
|
|
4225
|
+
/** @type {string} */
|
|
4226
|
+
reader.readString()
|
|
4227
|
+
);
|
|
4228
|
+
msg.setName(value);
|
|
4229
|
+
break;
|
|
4230
|
+
case 2:
|
|
4231
|
+
var value = (
|
|
4232
|
+
/** @type {string} */
|
|
4233
|
+
reader.readString()
|
|
4234
|
+
);
|
|
4235
|
+
msg.setType(value);
|
|
4236
|
+
break;
|
|
4237
|
+
case 3:
|
|
4238
|
+
var value = (
|
|
4239
|
+
/** @type {string} */
|
|
4240
|
+
reader.readString()
|
|
4241
|
+
);
|
|
4242
|
+
msg.setValue(value);
|
|
4243
|
+
break;
|
|
4244
|
+
default:
|
|
4245
|
+
reader.skipField();
|
|
4246
|
+
break;
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
return msg;
|
|
4250
|
+
};
|
|
4251
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.serializeBinary = function() {
|
|
4252
|
+
var writer = new jspb.BinaryWriter();
|
|
4253
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.serializeBinaryToWriter(this, writer);
|
|
4254
|
+
return writer.getResultBuffer();
|
|
4255
|
+
};
|
|
4256
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.serializeBinaryToWriter = function(message, writer) {
|
|
4257
|
+
var f = void 0;
|
|
4258
|
+
f = message.getName();
|
|
4259
|
+
if (f.length > 0) {
|
|
4260
|
+
writer.writeString(
|
|
4261
|
+
1,
|
|
4262
|
+
f
|
|
4263
|
+
);
|
|
4264
|
+
}
|
|
4265
|
+
f = message.getType();
|
|
4266
|
+
if (f.length > 0) {
|
|
4267
|
+
writer.writeString(
|
|
4268
|
+
2,
|
|
4269
|
+
f
|
|
4270
|
+
);
|
|
4271
|
+
}
|
|
4272
|
+
f = message.getValue();
|
|
4273
|
+
if (f.length > 0) {
|
|
4274
|
+
writer.writeString(
|
|
4275
|
+
3,
|
|
4276
|
+
f
|
|
4277
|
+
);
|
|
4278
|
+
}
|
|
4279
|
+
};
|
|
4280
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.getName = function() {
|
|
4281
|
+
return (
|
|
4282
|
+
/** @type {string} */
|
|
4283
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
4284
|
+
);
|
|
4285
|
+
};
|
|
4286
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.setName = function(value) {
|
|
4287
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
4288
|
+
};
|
|
4289
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.getType = function() {
|
|
4290
|
+
return (
|
|
4291
|
+
/** @type {string} */
|
|
4292
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
4293
|
+
);
|
|
4294
|
+
};
|
|
4295
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.setType = function(value) {
|
|
4296
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
4297
|
+
};
|
|
4298
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.getValue = function() {
|
|
3961
4299
|
return (
|
|
3962
4300
|
/** @type {string} */
|
|
3963
4301
|
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
3964
4302
|
);
|
|
3965
4303
|
};
|
|
3966
|
-
proto.aggregator.ContractReadNode.
|
|
4304
|
+
proto.aggregator.ContractReadNode.MethodResult.StructuredField.prototype.setValue = function(value) {
|
|
3967
4305
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
3968
4306
|
};
|
|
4307
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getDataList = function() {
|
|
4308
|
+
return (
|
|
4309
|
+
/** @type{!Array<!proto.aggregator.ContractReadNode.MethodResult.StructuredField>} */
|
|
4310
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ContractReadNode.MethodResult.StructuredField, 1)
|
|
4311
|
+
);
|
|
4312
|
+
};
|
|
4313
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setDataList = function(value) {
|
|
4314
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
4315
|
+
};
|
|
4316
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.addData = function(opt_value, opt_index) {
|
|
4317
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ContractReadNode.MethodResult.StructuredField, opt_index);
|
|
4318
|
+
};
|
|
4319
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.clearDataList = function() {
|
|
4320
|
+
return this.setDataList([]);
|
|
4321
|
+
};
|
|
4322
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getMethodName = function() {
|
|
4323
|
+
return (
|
|
4324
|
+
/** @type {string} */
|
|
4325
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
4326
|
+
);
|
|
4327
|
+
};
|
|
4328
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setMethodName = function(value) {
|
|
4329
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
4330
|
+
};
|
|
4331
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getSuccess = function() {
|
|
4332
|
+
return (
|
|
4333
|
+
/** @type {boolean} */
|
|
4334
|
+
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
|
|
4335
|
+
);
|
|
4336
|
+
};
|
|
4337
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setSuccess = function(value) {
|
|
4338
|
+
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
4339
|
+
};
|
|
4340
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.getError = function() {
|
|
4341
|
+
return (
|
|
4342
|
+
/** @type {string} */
|
|
4343
|
+
jspb.Message.getFieldWithDefault(this, 4, "")
|
|
4344
|
+
);
|
|
4345
|
+
};
|
|
4346
|
+
proto.aggregator.ContractReadNode.MethodResult.prototype.setError = function(value) {
|
|
4347
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
4348
|
+
};
|
|
3969
4349
|
proto.aggregator.ContractReadNode.Output.repeatedFields_ = [1];
|
|
3970
4350
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3971
4351
|
proto.aggregator.ContractReadNode.Output.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -3973,9 +4353,9 @@ var require_avs_pb = __commonJS({
|
|
|
3973
4353
|
};
|
|
3974
4354
|
proto.aggregator.ContractReadNode.Output.toObject = function(includeInstance, msg) {
|
|
3975
4355
|
var f, obj = {
|
|
3976
|
-
|
|
3977
|
-
msg.
|
|
3978
|
-
|
|
4356
|
+
resultsList: jspb.Message.toObjectList(
|
|
4357
|
+
msg.getResultsList(),
|
|
4358
|
+
proto.aggregator.ContractReadNode.MethodResult.toObject,
|
|
3979
4359
|
includeInstance
|
|
3980
4360
|
)
|
|
3981
4361
|
};
|
|
@@ -3998,9 +4378,9 @@ var require_avs_pb = __commonJS({
|
|
|
3998
4378
|
var field = reader.getFieldNumber();
|
|
3999
4379
|
switch (field) {
|
|
4000
4380
|
case 1:
|
|
4001
|
-
var value = new
|
|
4002
|
-
reader.readMessage(value,
|
|
4003
|
-
msg.
|
|
4381
|
+
var value = new proto.aggregator.ContractReadNode.MethodResult();
|
|
4382
|
+
reader.readMessage(value, proto.aggregator.ContractReadNode.MethodResult.deserializeBinaryFromReader);
|
|
4383
|
+
msg.addResults(value);
|
|
4004
4384
|
break;
|
|
4005
4385
|
default:
|
|
4006
4386
|
reader.skipField();
|
|
@@ -4016,29 +4396,29 @@ var require_avs_pb = __commonJS({
|
|
|
4016
4396
|
};
|
|
4017
4397
|
proto.aggregator.ContractReadNode.Output.serializeBinaryToWriter = function(message, writer) {
|
|
4018
4398
|
var f = void 0;
|
|
4019
|
-
f = message.
|
|
4399
|
+
f = message.getResultsList();
|
|
4020
4400
|
if (f.length > 0) {
|
|
4021
4401
|
writer.writeRepeatedMessage(
|
|
4022
4402
|
1,
|
|
4023
4403
|
f,
|
|
4024
|
-
|
|
4404
|
+
proto.aggregator.ContractReadNode.MethodResult.serializeBinaryToWriter
|
|
4025
4405
|
);
|
|
4026
4406
|
}
|
|
4027
4407
|
};
|
|
4028
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
4408
|
+
proto.aggregator.ContractReadNode.Output.prototype.getResultsList = function() {
|
|
4029
4409
|
return (
|
|
4030
|
-
/** @type{!Array<!proto.
|
|
4031
|
-
jspb.Message.getRepeatedWrapperField(this,
|
|
4410
|
+
/** @type{!Array<!proto.aggregator.ContractReadNode.MethodResult>} */
|
|
4411
|
+
jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ContractReadNode.MethodResult, 1)
|
|
4032
4412
|
);
|
|
4033
4413
|
};
|
|
4034
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
4414
|
+
proto.aggregator.ContractReadNode.Output.prototype.setResultsList = function(value) {
|
|
4035
4415
|
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
4036
4416
|
};
|
|
4037
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
4038
|
-
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.
|
|
4417
|
+
proto.aggregator.ContractReadNode.Output.prototype.addResults = function(opt_value, opt_index) {
|
|
4418
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ContractReadNode.MethodResult, opt_index);
|
|
4039
4419
|
};
|
|
4040
|
-
proto.aggregator.ContractReadNode.Output.prototype.
|
|
4041
|
-
return this.
|
|
4420
|
+
proto.aggregator.ContractReadNode.Output.prototype.clearResultsList = function() {
|
|
4421
|
+
return this.setResultsList([]);
|
|
4042
4422
|
};
|
|
4043
4423
|
proto.aggregator.ContractReadNode.prototype.getConfig = function() {
|
|
4044
4424
|
return (
|
|
@@ -15354,18 +15734,35 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
15354
15734
|
const nodeData = new avs_pb13.ContractReadNode();
|
|
15355
15735
|
const config = new avs_pb13.ContractReadNode.Config();
|
|
15356
15736
|
config.setContractAddress(this.data.contractAddress);
|
|
15357
|
-
config.setCallData(this.data.callData);
|
|
15358
15737
|
config.setContractAbi(this.data.contractAbi);
|
|
15738
|
+
const methodCalls = this.data.methodCallsList || [];
|
|
15739
|
+
methodCalls.forEach((methodCall) => {
|
|
15740
|
+
const methodCallMsg = new avs_pb13.ContractReadNode.MethodCall();
|
|
15741
|
+
methodCallMsg.setCallData(methodCall.callData);
|
|
15742
|
+
if (methodCall.methodName) {
|
|
15743
|
+
methodCallMsg.setMethodName(methodCall.methodName);
|
|
15744
|
+
}
|
|
15745
|
+
config.addMethodCalls(methodCallMsg);
|
|
15746
|
+
});
|
|
15359
15747
|
nodeData.setConfig(config);
|
|
15360
15748
|
request.setContractRead(nodeData);
|
|
15361
15749
|
return request;
|
|
15362
15750
|
}
|
|
15363
15751
|
static fromOutputData(outputData) {
|
|
15364
15752
|
const contractReadOutput = outputData.getContractRead();
|
|
15365
|
-
if (contractReadOutput && contractReadOutput.
|
|
15366
|
-
const
|
|
15753
|
+
if (contractReadOutput && contractReadOutput.getResultsList()) {
|
|
15754
|
+
const resultsList = contractReadOutput.getResultsList();
|
|
15367
15755
|
return {
|
|
15368
|
-
|
|
15756
|
+
results: resultsList.map((result) => ({
|
|
15757
|
+
methodName: result.getMethodName(),
|
|
15758
|
+
success: result.getSuccess(),
|
|
15759
|
+
error: result.getError(),
|
|
15760
|
+
data: result.getDataList().map((field) => ({
|
|
15761
|
+
name: field.getName(),
|
|
15762
|
+
type: field.getType(),
|
|
15763
|
+
value: field.getValue()
|
|
15764
|
+
}))
|
|
15765
|
+
}))
|
|
15369
15766
|
};
|
|
15370
15767
|
}
|
|
15371
15768
|
return null;
|
|
@@ -15552,8 +15949,16 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
15552
15949
|
if (data.contractRead.config) {
|
|
15553
15950
|
const config2 = new avs_pb17.ContractReadNode.Config();
|
|
15554
15951
|
config2.setContractAddress(data.contractRead.config.contractAddress);
|
|
15555
|
-
config2.setCallData(data.contractRead.config.callData);
|
|
15556
15952
|
config2.setContractAbi(data.contractRead.config.contractAbi);
|
|
15953
|
+
const methodCalls = data.contractRead.config.methodCallsList || [];
|
|
15954
|
+
methodCalls.forEach((methodCall) => {
|
|
15955
|
+
const methodCallMsg = new avs_pb17.ContractReadNode.MethodCall();
|
|
15956
|
+
methodCallMsg.setCallData(methodCall.callData);
|
|
15957
|
+
if (methodCall.methodName) {
|
|
15958
|
+
methodCallMsg.setMethodName(methodCall.methodName);
|
|
15959
|
+
}
|
|
15960
|
+
config2.addMethodCalls(methodCallMsg);
|
|
15961
|
+
});
|
|
15557
15962
|
contractRead.setConfig(config2);
|
|
15558
15963
|
}
|
|
15559
15964
|
loopNode.setContractRead(contractRead);
|
|
@@ -15928,9 +16333,37 @@ var Step = class _Step {
|
|
|
15928
16333
|
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_READ:
|
|
15929
16334
|
nodeOutputMessage = step.getContractRead();
|
|
15930
16335
|
if (nodeOutputMessage) {
|
|
15931
|
-
|
|
16336
|
+
const results = nodeOutputMessage.getResultsList();
|
|
16337
|
+
if (results && results.length > 0) {
|
|
16338
|
+
if (results.length === 1) {
|
|
16339
|
+
const result = results[0];
|
|
16340
|
+
const structuredData = {};
|
|
16341
|
+
result.getDataList().forEach((field) => {
|
|
16342
|
+
structuredData[field.getName()] = field.getValue();
|
|
16343
|
+
});
|
|
16344
|
+
return {
|
|
16345
|
+
methodName: result.getMethodName(),
|
|
16346
|
+
success: result.getSuccess(),
|
|
16347
|
+
error: result.getError(),
|
|
16348
|
+
data: structuredData
|
|
16349
|
+
};
|
|
16350
|
+
} else {
|
|
16351
|
+
return results.map((result) => {
|
|
16352
|
+
const structuredData = {};
|
|
16353
|
+
result.getDataList().forEach((field) => {
|
|
16354
|
+
structuredData[field.getName()] = field.getValue();
|
|
16355
|
+
});
|
|
16356
|
+
return {
|
|
16357
|
+
methodName: result.getMethodName(),
|
|
16358
|
+
success: result.getSuccess(),
|
|
16359
|
+
error: result.getError(),
|
|
16360
|
+
data: structuredData
|
|
16361
|
+
};
|
|
16362
|
+
});
|
|
16363
|
+
}
|
|
16364
|
+
}
|
|
15932
16365
|
}
|
|
15933
|
-
return
|
|
16366
|
+
return void 0;
|
|
15934
16367
|
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_WRITE:
|
|
15935
16368
|
return step.getContractWrite()?.toObject();
|
|
15936
16369
|
case avs_pb20.Execution.Step.OutputDataCase.CUSTOM_CODE:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAMtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAU3D,SAAS,IAAI,MAAM,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAMtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAU3D,SAAS,IAAI,MAAM,CAAC,QAAQ;IA8B5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAmBrE;AAED,eAAe,gBAAgB,CAAC"}
|