@taquito/taquito 11.0.2 → 11.2.0-beta-RC.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/README.md +2 -2
- package/dist/lib/batch/rpc-batch-provider.js +115 -249
- package/dist/lib/batch/rpc-batch-provider.js.map +1 -1
- package/dist/lib/constants.js +10 -4
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/context.js +143 -223
- package/dist/lib/context.js.map +1 -1
- package/dist/lib/contract/big-map.js +26 -66
- package/dist/lib/contract/big-map.js.map +1 -1
- package/dist/lib/contract/compose.js +1 -3
- package/dist/lib/contract/compose.js.map +1 -1
- package/dist/lib/contract/contract-methods/contract-method-factory.js +17 -16
- package/dist/lib/contract/contract-methods/contract-method-factory.js.map +1 -1
- package/dist/lib/contract/contract-methods/contract-method-flat-param.js +39 -68
- package/dist/lib/contract/contract-methods/contract-method-flat-param.js.map +1 -1
- package/dist/lib/contract/contract-methods/contract-method-object-param.js +21 -28
- package/dist/lib/contract/contract-methods/contract-method-object-param.js.map +1 -1
- package/dist/lib/contract/contract-methods/contract-on-chain-view.js +142 -0
- package/dist/lib/contract/contract-methods/contract-on-chain-view.js.map +1 -0
- package/dist/lib/contract/contract.js +114 -162
- package/dist/lib/contract/contract.js.map +1 -1
- package/dist/lib/contract/errors.js +68 -24
- package/dist/lib/contract/errors.js.map +1 -1
- package/dist/lib/contract/estimate.js +74 -112
- package/dist/lib/contract/estimate.js.map +1 -1
- package/dist/lib/contract/lambda-view.js +39 -95
- package/dist/lib/contract/lambda-view.js.map +1 -1
- package/dist/lib/contract/manager-lambda.js +10 -10
- package/dist/lib/contract/manager-lambda.js.map +1 -1
- package/dist/lib/contract/naive-estimate-provider.js +49 -143
- package/dist/lib/contract/naive-estimate-provider.js.map +1 -1
- package/dist/lib/contract/prepare.js +96 -160
- package/dist/lib/contract/prepare.js.map +1 -1
- package/dist/lib/contract/rpc-contract-provider.js +237 -523
- package/dist/lib/contract/rpc-contract-provider.js.map +1 -1
- package/dist/lib/contract/rpc-estimate-provider.js +209 -532
- package/dist/lib/contract/rpc-estimate-provider.js.map +1 -1
- package/dist/lib/contract/sapling-state-abstraction.js +9 -39
- package/dist/lib/contract/sapling-state-abstraction.js.map +1 -1
- package/dist/lib/contract/semantic.js +9 -9
- package/dist/lib/contract/semantic.js.map +1 -1
- package/dist/lib/contract/view_lambda.js +4 -4
- package/dist/lib/contract/view_lambda.js.map +1 -1
- package/dist/lib/forger/composite-forger.js +26 -61
- package/dist/lib/forger/composite-forger.js.map +1 -1
- package/dist/lib/forger/rpc-forger.js +6 -8
- package/dist/lib/forger/rpc-forger.js.map +1 -1
- package/dist/lib/format.js +5 -7
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/global-constants/default-global-constants-provider.js +47 -0
- package/dist/lib/global-constants/default-global-constants-provider.js.map +1 -0
- package/dist/lib/global-constants/error.js +19 -0
- package/dist/lib/global-constants/error.js.map +1 -0
- package/dist/lib/global-constants/interface-global-constants-provider.js +3 -0
- package/dist/lib/global-constants/interface-global-constants-provider.js.map +1 -0
- package/dist/lib/global-constants/noop-global-constants-provider.js +22 -0
- package/dist/lib/global-constants/noop-global-constants-provider.js.map +1 -0
- package/dist/lib/injector/rpc-injector.js +5 -6
- package/dist/lib/injector/rpc-injector.js.map +1 -1
- package/dist/lib/operations/batch-operation.js +43 -87
- package/dist/lib/operations/batch-operation.js.map +1 -1
- package/dist/lib/operations/delegate-operation.js +44 -96
- package/dist/lib/operations/delegate-operation.js.map +1 -1
- package/dist/lib/operations/operation-emitter.js +184 -340
- package/dist/lib/operations/operation-emitter.js.map +1 -1
- package/dist/lib/operations/operation-errors.js +29 -64
- package/dist/lib/operations/operation-errors.js.map +1 -1
- package/dist/lib/operations/operations.js +80 -148
- package/dist/lib/operations/operations.js.map +1 -1
- package/dist/lib/operations/origination-operation.js +59 -145
- package/dist/lib/operations/origination-operation.js.map +1 -1
- package/dist/lib/operations/register-global-constant-operation.js +38 -82
- package/dist/lib/operations/register-global-constant-operation.js.map +1 -1
- package/dist/lib/operations/reveal-operation.js +50 -106
- package/dist/lib/operations/reveal-operation.js.map +1 -1
- package/dist/lib/operations/transaction-operation.js +54 -114
- package/dist/lib/operations/transaction-operation.js.map +1 -1
- package/dist/lib/operations/types.js +11 -22
- package/dist/lib/operations/types.js.map +1 -1
- package/dist/lib/packer/michel-codec-packer.js +8 -41
- package/dist/lib/packer/michel-codec-packer.js.map +1 -1
- package/dist/lib/packer/rpc-packer.js +7 -37
- package/dist/lib/packer/rpc-packer.js.map +1 -1
- package/dist/lib/parser/michel-codec-parser.js +103 -159
- package/dist/lib/parser/michel-codec-parser.js.map +1 -1
- package/dist/lib/parser/noop-parser.js +6 -38
- package/dist/lib/parser/noop-parser.js.map +1 -1
- package/dist/lib/signer/noop.js +22 -61
- package/dist/lib/signer/noop.js.map +1 -1
- package/dist/lib/subscribe/filters.js +13 -33
- package/dist/lib/subscribe/filters.js.map +1 -1
- package/dist/lib/subscribe/observable-subscription.js +32 -56
- package/dist/lib/subscribe/observable-subscription.js.map +1 -1
- package/dist/lib/subscribe/polling-provider.js +24 -81
- package/dist/lib/subscribe/polling-provider.js.map +1 -1
- package/dist/lib/taquito.js +117 -142
- package/dist/lib/taquito.js.map +1 -1
- package/dist/lib/tz/rpc-tz-provider.js +37 -97
- package/dist/lib/tz/rpc-tz-provider.js.map +1 -1
- package/dist/lib/version.js +2 -4
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/wallet/batch-operation.js +31 -89
- package/dist/lib/wallet/batch-operation.js.map +1 -1
- package/dist/lib/wallet/delegation-operation.js +29 -94
- package/dist/lib/wallet/delegation-operation.js.map +1 -1
- package/dist/lib/wallet/legacy.js +25 -86
- package/dist/lib/wallet/legacy.js.map +1 -1
- package/dist/lib/wallet/operation-factory.js +61 -191
- package/dist/lib/wallet/operation-factory.js.map +1 -1
- package/dist/lib/wallet/operation.js +79 -185
- package/dist/lib/wallet/operation.js.map +1 -1
- package/dist/lib/wallet/origination-operation.js +36 -108
- package/dist/lib/wallet/origination-operation.js.map +1 -1
- package/dist/lib/wallet/receipt.js +20 -21
- package/dist/lib/wallet/receipt.js.map +1 -1
- package/dist/lib/wallet/transaction-operation.js +29 -94
- package/dist/lib/wallet/transaction-operation.js.map +1 -1
- package/dist/lib/wallet/wallet.js +133 -311
- package/dist/lib/wallet/wallet.js.map +1 -1
- package/dist/taquito.es6.js +4573 -0
- package/dist/taquito.es6.js.map +1 -0
- package/dist/taquito.min.js +1 -1
- package/dist/taquito.umd.js +2741 -4196
- package/dist/taquito.umd.js.map +1 -1
- package/dist/types/batch/rpc-batch-provider.d.ts +2 -1
- package/dist/types/constants.d.ts +9 -3
- package/dist/types/context.d.ts +7 -4
- package/dist/types/contract/contract-methods/contract-method-factory.d.ts +9 -3
- package/dist/types/contract/contract-methods/contract-method-flat-param.d.ts +1 -1
- package/dist/types/contract/contract-methods/contract-method-object-param.d.ts +2 -2
- package/dist/types/contract/contract-methods/contract-on-chain-view.d.ts +42 -0
- package/dist/types/contract/contract.d.ts +32 -15
- package/dist/types/contract/errors.d.ts +28 -8
- package/dist/types/contract/interface.d.ts +2 -2
- package/dist/types/contract/lambda-view.d.ts +1 -1
- package/dist/types/contract/prepare.d.ts +1 -1
- package/dist/types/contract/rpc-contract-provider.d.ts +3 -3
- package/dist/types/forger/composite-forger.d.ts +1 -2
- package/dist/types/global-constants/default-global-constants-provider.d.ts +18 -0
- package/dist/types/global-constants/error.d.ts +9 -0
- package/dist/types/global-constants/interface-global-constants-provider.d.ts +11 -0
- package/dist/types/global-constants/noop-global-constants-provider.d.ts +5 -0
- package/dist/types/operations/operation-emitter.d.ts +3 -3
- package/dist/types/operations/operation-errors.d.ts +2 -4
- package/dist/types/operations/origination-operation.d.ts +3 -2
- package/dist/types/operations/types.d.ts +2 -2
- package/dist/types/parser/michel-codec-parser.d.ts +1 -0
- package/dist/types/signer/interface.d.ts +1 -1
- package/dist/types/signer/noop.d.ts +2 -2
- package/dist/types/taquito.d.ts +28 -1
- package/dist/types/wallet/interface.d.ts +1 -1
- package/dist/types/wallet/legacy.d.ts +1 -1
- package/dist/types/wallet/operation.d.ts +2 -2
- package/dist/types/wallet/origination-operation.d.ts +3 -2
- package/dist/types/wallet/wallet.d.ts +5 -4
- package/package.json +30 -31
- package/dist/taquito.es5.js +0 -6036
- package/dist/taquito.es5.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-method-factory.js","sourceRoot":"","sources":["../../../../src/contract/contract-methods/contract-method-factory.ts"],"names":[],"mappings":";;;AAEA
|
|
1
|
+
{"version":3,"file":"contract-method-factory.js","sourceRoot":"","sources":["../../../../src/contract/contract-methods/contract-method-factory.ts"],"names":[],"mappings":";;;AAEA,iFAAsE;AACtE,6EAA8D;AAG9D,qEAAuD;AAEvD,MAAa,qBAAqB;IAChC,YAAoB,QAAW,EAAU,eAAuB;QAA5C,aAAQ,GAAR,QAAQ,CAAG;QAAU,oBAAe,GAAf,eAAe,CAAQ;IAAG,CAAC;IAEpE,8BAA8B,CAC5B,yBAA0C,EAC1C,uBAA+B,EAC/B,IAAW,EACX,oBAAoB,GAAG,IAAI,EAC3B,WAAW,GAAG,KAAK;QAEnB,OAAO,IAAI,2CAAc,CACvB,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,eAAe,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,IAAI,EACJ,oBAAoB,EACpB,WAAW,CACZ,CAAC;IACJ,CAAC;IAED,+BAA+B,CAC7B,yBAA0C,EAC1C,uBAA+B,EAC/B,IAAW,EACX,oBAAoB,GAAG,IAAI,EAC3B,WAAW,GAAG,KAAK;QAEnB,OAAO,IAAI,mDAAoB,CAC7B,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,eAAe,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,IAAI,EACJ,oBAAoB,EACpB,WAAW,CACZ,CAAC;IACJ,CAAC;IAED,6BAA6B,CAC3B,GAAuB,EACvB,uBAAmC,EACnC,mBAA0C,EAC1C,oBAA2C,EAC3C,QAAa;QAEb,OAAO,IAAI,oCAAW,CACpB,GAAG,EACH,IAAI,CAAC,eAAe,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAvDD,sDAuDC"}
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
var __spread = (this && this.__spread) || function () {
|
|
19
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
20
|
-
return ar;
|
|
21
|
-
};
|
|
22
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
3
|
exports.ContractMethod = void 0;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
4
|
+
const wallet_1 = require("../../wallet");
|
|
5
|
+
const contract_1 = require("../contract");
|
|
6
|
+
const errors_1 = require("../errors");
|
|
27
7
|
/**
|
|
28
8
|
* @description Utility class to send smart contract operation
|
|
29
9
|
* The format for the arguments is the flattened representation
|
|
30
10
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (isMultipleEntrypoint === void 0) { isMultipleEntrypoint = true; }
|
|
34
|
-
if (isAnonymous === void 0) { isAnonymous = false; }
|
|
11
|
+
class ContractMethod {
|
|
12
|
+
constructor(provider, address, parameterSchema, name, args, isMultipleEntrypoint = true, isAnonymous = false) {
|
|
35
13
|
this.provider = provider;
|
|
36
14
|
this.address = address;
|
|
37
15
|
this.parameterSchema = parameterSchema;
|
|
@@ -40,83 +18,76 @@ var ContractMethod = /** @class */ (function () {
|
|
|
40
18
|
this.isMultipleEntrypoint = isMultipleEntrypoint;
|
|
41
19
|
this.isAnonymous = isAnonymous;
|
|
42
20
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (!sigs.find(
|
|
21
|
+
validateArgs(args, schema, name) {
|
|
22
|
+
const sigs = schema.ExtractSignatures();
|
|
23
|
+
if (!sigs.find((x) => x.length === args.length)) {
|
|
46
24
|
throw new errors_1.InvalidParameterError(name, sigs, args);
|
|
47
25
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
: this.parameterSchema.ExtractSchema();
|
|
58
|
-
},
|
|
59
|
-
enumerable: false,
|
|
60
|
-
configurable: true
|
|
61
|
-
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @description Get the schema of the smart contract method
|
|
29
|
+
*/
|
|
30
|
+
get schema() {
|
|
31
|
+
return this.isAnonymous
|
|
32
|
+
? this.parameterSchema.ExtractSchema()[this.name]
|
|
33
|
+
: this.parameterSchema.ExtractSchema();
|
|
34
|
+
}
|
|
62
35
|
/**
|
|
63
36
|
* @description Get the signature of the smart contract method
|
|
64
37
|
*/
|
|
65
|
-
|
|
66
|
-
var _this = this;
|
|
38
|
+
getSignature() {
|
|
67
39
|
if (this.isAnonymous) {
|
|
68
|
-
|
|
40
|
+
const sig = this.parameterSchema.ExtractSignatures().find((x) => x[0] === this.name);
|
|
69
41
|
if (sig) {
|
|
70
42
|
sig.shift();
|
|
71
43
|
return sig;
|
|
72
44
|
}
|
|
73
45
|
}
|
|
74
46
|
else {
|
|
75
|
-
|
|
76
|
-
return
|
|
47
|
+
const sig = this.parameterSchema.ExtractSignatures();
|
|
48
|
+
return sig.length == 1 ? sig[0] : sig;
|
|
77
49
|
}
|
|
78
|
-
}
|
|
50
|
+
}
|
|
79
51
|
/**
|
|
80
52
|
*
|
|
81
53
|
* @description Send the smart contract operation
|
|
82
54
|
*
|
|
83
55
|
* @param Options generic operation parameter
|
|
84
56
|
*/
|
|
85
|
-
|
|
86
|
-
if (params === void 0) { params = {}; }
|
|
57
|
+
send(params = {}) {
|
|
87
58
|
if (this.provider instanceof wallet_1.Wallet) {
|
|
88
|
-
return this.provider
|
|
59
|
+
return this.provider
|
|
60
|
+
.transfer(this.toTransferParams(params))
|
|
61
|
+
.send();
|
|
89
62
|
}
|
|
90
63
|
else {
|
|
91
64
|
return this.provider.transfer(this.toTransferParams(params));
|
|
92
65
|
}
|
|
93
|
-
}
|
|
66
|
+
}
|
|
94
67
|
/**
|
|
95
68
|
*
|
|
96
69
|
* @description Create transfer params to be used with TezosToolkit.contract.transfer methods
|
|
97
70
|
*
|
|
98
71
|
* @param Options generic transfer operation parameters
|
|
99
72
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var _d = _a === void 0 ? {} : _a, fee = _d.fee, gasLimit = _d.gasLimit, storageLimit = _d.storageLimit, source = _d.source, _e = _d.amount, amount = _e === void 0 ? 0 : _e, _f = _d.mutez, mutez = _f === void 0 ? false : _f;
|
|
103
|
-
var fullTransferParams = {
|
|
73
|
+
toTransferParams({ fee, gasLimit, storageLimit, source, amount = 0, mutez = false, } = {}) {
|
|
74
|
+
const fullTransferParams = {
|
|
104
75
|
to: this.address,
|
|
105
|
-
amount
|
|
106
|
-
fee
|
|
107
|
-
mutez
|
|
108
|
-
source
|
|
109
|
-
gasLimit
|
|
110
|
-
storageLimit
|
|
76
|
+
amount,
|
|
77
|
+
fee,
|
|
78
|
+
mutez,
|
|
79
|
+
source,
|
|
80
|
+
gasLimit,
|
|
81
|
+
storageLimit,
|
|
111
82
|
parameter: {
|
|
112
83
|
entrypoint: this.isMultipleEntrypoint ? this.name : contract_1.DEFAULT_SMART_CONTRACT_METHOD_NAME,
|
|
113
84
|
value: this.isAnonymous
|
|
114
|
-
?
|
|
85
|
+
? this.parameterSchema.Encode(this.name, ...this.args)
|
|
86
|
+
: this.parameterSchema.Encode(...this.args),
|
|
115
87
|
},
|
|
116
88
|
};
|
|
117
89
|
return fullTransferParams;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
}());
|
|
90
|
+
}
|
|
91
|
+
}
|
|
121
92
|
exports.ContractMethod = ContractMethod;
|
|
122
93
|
//# sourceMappingURL=contract-method-flat-param.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-method-flat-param.js","sourceRoot":"","sources":["../../../../src/contract/contract-methods/contract-method-flat-param.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract-method-flat-param.js","sourceRoot":"","sources":["../../../../src/contract/contract-methods/contract-method-flat-param.ts"],"names":[],"mappings":";;;AAGA,yCAAkE;AAOlE,0CAAiE;AACjE,sCAAkD;AAElD;;;GAGG;AACH,MAAa,cAAc;IAGzB,YACU,QAAW,EACX,OAAe,EACf,eAAgC,EAChC,IAAY,EACZ,IAAW,EACX,uBAAuB,IAAI,EAC3B,cAAc,KAAK;QANnB,aAAQ,GAAR,QAAQ,CAAG;QACX,YAAO,GAAP,OAAO,CAAQ;QACf,oBAAe,GAAf,eAAe,CAAiB;QAChC,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAO;QACX,yBAAoB,GAApB,oBAAoB,CAAO;QAC3B,gBAAW,GAAX,WAAW,CAAQ;IAC1B,CAAC;IAEI,YAAY,CAAC,IAAW,EAAE,MAAuB,EAAE,IAAY;QACrE,MAAM,IAAI,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAExC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC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AAM,CAAC,CAAQ,CAAC;SACrE;IACH,CAAC;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,EACf,GAAG,EACH,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,MAAM,GAAG,CAAC,EACV,KAAK,GAAG,KAAK,MACU,EAAE;QACzB,MAAM,kBAAkB,GAA2B;YACjD,EAAE,EAAE,IAAI,CAAC,OAAO;YAChB,MAAM;YACN,GAAG;YACH,KAAK;YACL,MAAM;YACN,QAAQ;YACR,YAAY;YACZ,SAAS,EAAE;gBACT,UAAU,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,6CAAkC;gBACtF,KAAK,EAAE,IAAI,CAAC,WAAW;oBACrB,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;oBACtD,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;aAC9C;SACF,CAAC;QACF,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF;AA/FD,wCA+FC"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContractMethodObject = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const wallet_1 = require("../../wallet");
|
|
5
|
+
const contract_1 = require("../contract");
|
|
6
6
|
/**
|
|
7
7
|
* @description Utility class to send smart contract operation
|
|
8
8
|
* The format for the arguments is the object representation
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (args === void 0) { args = 'unit'; }
|
|
13
|
-
if (isMultipleEntrypoint === void 0) { isMultipleEntrypoint = true; }
|
|
14
|
-
if (isAnonymous === void 0) { isAnonymous = false; }
|
|
10
|
+
class ContractMethodObject {
|
|
11
|
+
constructor(provider, address, parameterSchema, name, args = 'unit', isMultipleEntrypoint = true, isAnonymous = false) {
|
|
15
12
|
this.provider = provider;
|
|
16
13
|
this.address = address;
|
|
17
14
|
this.parameterSchema = parameterSchema;
|
|
@@ -21,55 +18,51 @@ var ContractMethodObject = /** @class */ (function () {
|
|
|
21
18
|
this.isAnonymous = isAnonymous;
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
* @description Get the signature of the smart contract method
|
|
22
|
+
*/
|
|
23
|
+
getSignature() {
|
|
27
24
|
return this.isAnonymous
|
|
28
25
|
? this.parameterSchema.ExtractSchema()[this.name]
|
|
29
26
|
: this.parameterSchema.ExtractSchema();
|
|
30
|
-
}
|
|
27
|
+
}
|
|
31
28
|
/**
|
|
32
29
|
*
|
|
33
30
|
* @description Send the smart contract operation
|
|
34
31
|
*
|
|
35
32
|
* @param Options generic operation parameter
|
|
36
33
|
*/
|
|
37
|
-
|
|
38
|
-
if (params === void 0) { params = {}; }
|
|
34
|
+
send(params = {}) {
|
|
39
35
|
if (this.provider instanceof wallet_1.Wallet) {
|
|
40
36
|
return this.provider.transfer(this.toTransferParams(params)).send();
|
|
41
37
|
}
|
|
42
38
|
else {
|
|
43
39
|
return this.provider.transfer(this.toTransferParams(params));
|
|
44
40
|
}
|
|
45
|
-
}
|
|
41
|
+
}
|
|
46
42
|
/**
|
|
47
43
|
*
|
|
48
44
|
* @description Create transfer params to be used with TezosToolkit.contract.transfer methods
|
|
49
45
|
*
|
|
50
46
|
* @param Options generic transfer operation parameters
|
|
51
47
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _c = _a === void 0 ? {} : _a, fee = _c.fee, gasLimit = _c.gasLimit, storageLimit = _c.storageLimit, source = _c.source, _d = _c.amount, amount = _d === void 0 ? 0 : _d, _e = _c.mutez, mutez = _e === void 0 ? false : _e;
|
|
55
|
-
var fullTransferParams = {
|
|
48
|
+
toTransferParams({ fee, gasLimit, storageLimit, source, amount = 0, mutez = false, } = {}) {
|
|
49
|
+
const fullTransferParams = {
|
|
56
50
|
to: this.address,
|
|
57
|
-
amount
|
|
58
|
-
fee
|
|
59
|
-
mutez
|
|
60
|
-
source
|
|
61
|
-
gasLimit
|
|
62
|
-
storageLimit
|
|
51
|
+
amount,
|
|
52
|
+
fee,
|
|
53
|
+
mutez,
|
|
54
|
+
source,
|
|
55
|
+
gasLimit,
|
|
56
|
+
storageLimit,
|
|
63
57
|
parameter: {
|
|
64
58
|
entrypoint: this.isMultipleEntrypoint ? this.name : contract_1.DEFAULT_SMART_CONTRACT_METHOD_NAME,
|
|
65
59
|
value: this.isAnonymous
|
|
66
|
-
? this.parameterSchema.EncodeObject(
|
|
60
|
+
? this.parameterSchema.EncodeObject({ [this.name]: this.args })
|
|
67
61
|
: this.parameterSchema.EncodeObject(this.args),
|
|
68
62
|
},
|
|
69
63
|
};
|
|
70
64
|
return fullTransferParams;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}());
|
|
65
|
+
}
|
|
66
|
+
}
|
|
74
67
|
exports.ContractMethodObject = ContractMethodObject;
|
|
75
68
|
//# sourceMappingURL=contract-method-object-param.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-method-object-param.js","sourceRoot":"","sources":["../../../../src/contract/contract-methods/contract-method-object-param.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"contract-method-object-param.js","sourceRoot":"","sources":["../../../../src/contract/contract-methods/contract-method-object-param.ts"],"names":[],"mappings":";;;AAGA,yCAAkE;AAGlE,0CAAiE;AAEjE;;;GAGG;AACH,MAAa,oBAAoB;IAC7B,YACY,QAAW,EACX,OAAe,EACf,eAAgC,EAChC,IAAY,EACZ,OAAY,MAAM,EAClB,uBAAuB,IAAI,EAC3B,cAAc,KAAK;QANnB,aAAQ,GAAR,QAAQ,CAAG;QACX,YAAO,GAAP,OAAO,CAAQ;QACf,oBAAe,GAAf,eAA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AE,IAAI,CAAC,IAAI,EAAE,CAAC;oBAC/D,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;aACrD;SACJ,CAAC;QACF,OAAO,kBAAkB,CAAC;IAC9B,CAAC;CACJ;AAnED,oDAmEC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OnChainView = void 0;
|
|
13
|
+
const utils_1 = require("@taquito/utils");
|
|
14
|
+
const errors_1 = require("../errors");
|
|
15
|
+
const runCodeHelper = (viewArgsType, viewReturnType, contractStorageType, viewInstructions, viewArgs, contractStorageValue, balance, chain_id, source, amount = '0') => {
|
|
16
|
+
return {
|
|
17
|
+
script: [
|
|
18
|
+
{ prim: 'parameter', args: [{ prim: 'pair', args: [viewArgsType, contractStorageType] }] },
|
|
19
|
+
{ prim: 'storage', args: [{ prim: 'option', args: [viewReturnType] }] },
|
|
20
|
+
{
|
|
21
|
+
prim: 'code',
|
|
22
|
+
args: [
|
|
23
|
+
[
|
|
24
|
+
{ prim: 'CAR' },
|
|
25
|
+
viewInstructions,
|
|
26
|
+
{ prim: 'SOME' },
|
|
27
|
+
{ prim: 'NIL', args: [{ prim: 'operation' }] },
|
|
28
|
+
{ prim: 'PAIR' },
|
|
29
|
+
],
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
storage: { prim: 'None' },
|
|
34
|
+
input: { prim: 'Pair', args: [viewArgs, contractStorageValue] },
|
|
35
|
+
amount,
|
|
36
|
+
balance,
|
|
37
|
+
chain_id,
|
|
38
|
+
source,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
class OnChainView {
|
|
42
|
+
constructor(_rpc, _contractAddress, _smartContractViewSchema, _contractStorageType, _contractStorageValue, _args = 'Unit') {
|
|
43
|
+
this._rpc = _rpc;
|
|
44
|
+
this._contractAddress = _contractAddress;
|
|
45
|
+
this._smartContractViewSchema = _smartContractViewSchema;
|
|
46
|
+
this._contractStorageType = _contractStorageType;
|
|
47
|
+
this._contractStorageValue = _contractStorageValue;
|
|
48
|
+
this._args = _args;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @description Get the signature of the smart contract view
|
|
52
|
+
*/
|
|
53
|
+
getSignature() {
|
|
54
|
+
return {
|
|
55
|
+
parameter: this._smartContractViewSchema.extractArgsSchema(),
|
|
56
|
+
result: this._smartContractViewSchema.extractResultSchema(),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @description Get the result of the view simulation
|
|
61
|
+
* @param executionContext.source the public key hash of the account who initialized this view execution.
|
|
62
|
+
* @param executionContext.viewCaller the contract address which is the caller of view.
|
|
63
|
+
*/
|
|
64
|
+
executeView(executionContext) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
this.verifyContextExecution(executionContext);
|
|
67
|
+
const balance = (yield this._rpc.getBalance(this._contractAddress)).toString();
|
|
68
|
+
const chainId = yield this._rpc.getChainId();
|
|
69
|
+
return this.executeViewAndDecodeResult(runCodeHelper(this._smartContractViewSchema.viewArgsType, this._smartContractViewSchema.viewReturnType, this._contractStorageType, this.adaptViewCodeToContext(this._smartContractViewSchema.instructions, executionContext.viewCaller, balance), this.transformArgsToMichelson(), this._contractStorageValue, balance, chainId, executionContext.source));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
verifyContextExecution(executionContext) {
|
|
73
|
+
if (executionContext.source &&
|
|
74
|
+
utils_1.validateAddress(executionContext.source) !== utils_1.ValidationResult.VALID) {
|
|
75
|
+
throw new errors_1.InvalidViewSimulationContext(`The source account who initialized the view execution is invalid: ${executionContext.source}.`);
|
|
76
|
+
}
|
|
77
|
+
if (!executionContext.viewCaller ||
|
|
78
|
+
utils_1.validateAddress(executionContext.viewCaller) !== utils_1.ValidationResult.VALID) {
|
|
79
|
+
throw new errors_1.InvalidViewSimulationContext(`The contract which is the caller of view is invalid: ${executionContext.viewCaller}.`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
transformArgsToMichelson() {
|
|
83
|
+
try {
|
|
84
|
+
return this._smartContractViewSchema.encodeViewArgs(this._args);
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
throw new errors_1.InvalidViewParameterError(this._smartContractViewSchema.viewName, this.getSignature(), this._args, error);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @description Loops through the view's instructions and replace BALANCE, SENDER, SELF_ADDRESS and AMOUNT with Michelson expressions that match the current context, if applicable.
|
|
92
|
+
*
|
|
93
|
+
* Certain specific instructions have different semantics in view:
|
|
94
|
+
* BALANCE represents the current amount of mutez held by the contract where view is;
|
|
95
|
+
* SENDER represents the contract which is the caller of view;
|
|
96
|
+
* SELF_ADDRESS represents the contract where view is;
|
|
97
|
+
* AMOUNT is always 0 mutez.
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
adaptViewCodeToContext(instructions, viewCaller, contractBalance) {
|
|
101
|
+
const instructionsToReplace = {
|
|
102
|
+
BALANCE: [{ prim: 'PUSH', args: [{ prim: 'mutez' }, { int: contractBalance }] }],
|
|
103
|
+
SENDER: [{ prim: 'PUSH', args: [{ prim: 'address' }, { string: viewCaller }] }],
|
|
104
|
+
SELF_ADDRESS: [
|
|
105
|
+
{ prim: 'PUSH', args: [{ prim: 'address' }, { string: this._contractAddress }] },
|
|
106
|
+
],
|
|
107
|
+
AMOUNT: [{ prim: 'PUSH', args: [{ prim: 'mutez' }, { int: '0' }] }],
|
|
108
|
+
};
|
|
109
|
+
instructions.forEach((inst, i) => {
|
|
110
|
+
if (inst.prim in instructionsToReplace) {
|
|
111
|
+
instructions[i] = Object(instructionsToReplace)[inst.prim];
|
|
112
|
+
}
|
|
113
|
+
if (inst.args && inst.args.length !== 0) {
|
|
114
|
+
this.adaptViewCodeToContext(inst.args, viewCaller, contractBalance);
|
|
115
|
+
}
|
|
116
|
+
else if (Array.isArray(inst)) {
|
|
117
|
+
this.adaptViewCodeToContext(inst, viewCaller, contractBalance);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
return instructions;
|
|
121
|
+
}
|
|
122
|
+
executeViewAndDecodeResult(viewScript) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
let storage;
|
|
125
|
+
try {
|
|
126
|
+
storage = (yield this._rpc.runCode(viewScript)).storage;
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
const failWith = errors_1.validateAndExtractFailwith(error);
|
|
130
|
+
throw failWith
|
|
131
|
+
? new errors_1.ViewSimulationError(`The simulation of the on-chain view named ${this._smartContractViewSchema.viewName} failed with: ${JSON.stringify(failWith)}`, error)
|
|
132
|
+
: error;
|
|
133
|
+
}
|
|
134
|
+
if (!storage.args) {
|
|
135
|
+
throw new errors_1.ViewSimulationError(`View simulation failed with an invalid result: ${storage}`);
|
|
136
|
+
}
|
|
137
|
+
return this._smartContractViewSchema.decodeViewResult(storage.args[0]);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
exports.OnChainView = OnChainView;
|
|
142
|
+
//# sourceMappingURL=contract-on-chain-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-on-chain-view.js","sourceRoot":"","sources":["../../../../src/contract/contract-methods/contract-on-chain-view.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,0CAAmE;AACnE,sCAKmB;AAEnB,MAAM,aAAa,GAAG,CACpB,YAA2C,EAC3C,cAA6C,EAC7C,mBAA0C,EAC1C,gBAAiD,EACjD,QAA+B,EAC/B,oBAA2C,EAC3C,OAAe,EACf,QAAgB,EAChB,MAAe,EACf,MAAM,GAAG,GAAG,EACK,EAAE;IACnB,OAAO;QACL,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC,EAAE,CAAC,EAAE;YAC1F,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE;YACvE;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;oBACJ;wBACE,EAAE,IAAI,EAAE,KAAK,EAAE;wBACf,gBAAgB;wBAChB,EAAE,IAAI,EAAE,MAAM,EAAE;wBAChB,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE;wBAC9C,EAAE,IAAI,EAAE,MAAM,EAAE;qBACjB;iBACF;aACF;SACF;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE;QAC/D,MAAM;QACN,OAAO;QACP,QAAQ;QACR,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AAOF,MAAa,WAAW;IACtB,YACU,IAAwB,EACxB,gBAAwB,EACxB,wBA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