@sravankumar02/sdk-core 1.0.0 → 2.0.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/out/abi/codec/binary.js.map +1 -1
- package/out/abi/codec/managedDecimal.js +17 -5
- package/out/abi/codec/managedDecimal.js.map +1 -1
- package/out/abi/codec/managedDecimalSigned.js +17 -5
- package/out/abi/codec/managedDecimalSigned.js.map +1 -1
- package/out/abi/index.d.ts +0 -3
- package/out/abi/index.js +0 -3
- package/out/abi/index.js.map +1 -1
- package/out/abi/nativeSerializer.js +1 -1
- package/out/abi/nativeSerializer.js.map +1 -1
- package/out/abi/typesystem/typeMapper.js +2 -0
- package/out/abi/typesystem/typeMapper.js.map +1 -1
- package/out/accountManagement/accountController.d.ts +2 -1
- package/out/accountManagement/accountController.js +11 -20
- package/out/accountManagement/accountController.js.map +1 -1
- package/out/accountManagement/accountTransactionsFactory.d.ts +10 -5
- package/out/accountManagement/accountTransactionsFactory.js +45 -34
- package/out/accountManagement/accountTransactionsFactory.js.map +1 -1
- package/out/core/address.d.ts +1 -25
- package/out/core/address.js +3 -41
- package/out/core/address.js.map +1 -1
- package/out/core/baseController.d.ts +9 -3
- package/out/core/baseController.js +24 -10
- package/out/core/baseController.js.map +1 -1
- package/out/core/baseFactory.d.ts +25 -0
- package/out/core/baseFactory.js +40 -0
- package/out/core/baseFactory.js.map +1 -0
- package/out/core/codeMetadata.d.ts +0 -10
- package/out/core/codeMetadata.js +0 -27
- package/out/core/codeMetadata.js.map +1 -1
- package/out/core/constants.d.ts +1 -0
- package/out/core/constants.js +2 -1
- package/out/core/constants.js.map +1 -1
- package/out/core/errors.d.ts +9 -0
- package/out/core/errors.js +17 -2
- package/out/core/errors.js.map +1 -1
- package/out/core/index.d.ts +2 -0
- package/out/core/index.js +2 -0
- package/out/core/index.js.map +1 -1
- package/out/core/interfaces.d.ts +5 -0
- package/out/core/tokens.d.ts +1 -77
- package/out/core/tokens.js +2 -144
- package/out/core/tokens.js.map +1 -1
- package/out/core/transaction.d.ts +1 -144
- package/out/core/transaction.js +0 -209
- package/out/core/transaction.js.map +1 -1
- package/out/core/transactionStatus.d.ts +0 -5
- package/out/core/transactionStatus.js +0 -7
- package/out/core/transactionStatus.js.map +1 -1
- package/out/core/transactionsFactoryConfig.d.ts +16 -0
- package/out/core/transactionsFactoryConfig.js +17 -0
- package/out/core/transactionsFactoryConfig.js.map +1 -1
- package/out/delegation/delegationController.d.ts +2 -1
- package/out/delegation/delegationController.js +39 -134
- package/out/delegation/delegationController.js.map +1 -1
- package/out/delegation/delegationTransactionsFactory.d.ts +23 -20
- package/out/delegation/delegationTransactionsFactory.js +183 -159
- package/out/delegation/delegationTransactionsFactory.js.map +1 -1
- package/out/entrypoints/entrypoints.d.ts +36 -3
- package/out/entrypoints/entrypoints.js +102 -27
- package/out/entrypoints/entrypoints.js.map +1 -1
- package/out/gasEstimator/gasLimitEstimator.d.ts +19 -0
- package/out/gasEstimator/gasLimitEstimator.js +22 -0
- package/out/gasEstimator/gasLimitEstimator.js.map +1 -0
- package/out/gasEstimator/index.d.ts +1 -0
- package/out/gasEstimator/index.js +6 -0
- package/out/gasEstimator/index.js.map +1 -0
- package/out/governance/governanceController.d.ts +2 -1
- package/out/governance/governanceController.js +13 -43
- package/out/governance/governanceController.js.map +1 -1
- package/out/governance/governanceTransactionsFactory.d.ts +10 -8
- package/out/governance/governanceTransactionsFactory.js +60 -52
- package/out/governance/governanceTransactionsFactory.js.map +1 -1
- package/out/index.d.ts +1 -0
- package/out/index.js +1 -0
- package/out/index.js.map +1 -1
- package/out/multisig/index.d.ts +2 -0
- package/out/multisig/index.js +2 -0
- package/out/multisig/index.js.map +1 -1
- package/out/multisig/multisigController.d.ts +2 -1
- package/out/multisig/multisigController.js +61 -117
- package/out/multisig/multisigController.js.map +1 -1
- package/out/multisig/multisigTransactionsFactory.d.ts +26 -24
- package/out/multisig/multisigTransactionsFactory.js +57 -54
- package/out/multisig/multisigTransactionsFactory.js.map +1 -1
- package/out/multisig/proposeTransferExecuteContractInput.d.ts +2 -2
- package/out/multisig/proposeTransferExecuteContractInput.js +4 -4
- package/out/multisig/proposeTransferExecuteContractInput.js.map +1 -1
- package/out/multisig/resources.d.ts +2 -2
- package/out/networkProviders/apiNetworkProvider.js +1 -3
- package/out/networkProviders/apiNetworkProvider.js.map +1 -1
- package/out/networkProviders/proxyNetworkProvider.js +20 -1
- package/out/networkProviders/proxyNetworkProvider.js.map +1 -1
- package/out/networkProviders/tokens.d.ts +1 -1
- package/out/networkProviders/tokens.js +14 -11
- package/out/networkProviders/tokens.js.map +1 -1
- package/out/smartContracts/resources.d.ts +6 -2
- package/out/smartContracts/smartContractController.d.ts +2 -1
- package/out/smartContracts/smartContractController.js +10 -22
- package/out/smartContracts/smartContractController.js.map +1 -1
- package/out/smartContracts/smartContractTransactionsFactory.d.ts +12 -7
- package/out/smartContracts/smartContractTransactionsFactory.js +62 -44
- package/out/smartContracts/smartContractTransactionsFactory.js.map +1 -1
- package/out/tokenManagement/tokenManagementController.d.ts +2 -1
- package/out/tokenManagement/tokenManagementController.js +71 -246
- package/out/tokenManagement/tokenManagementController.js.map +1 -1
- package/out/tokenManagement/tokenManagementTransactionsFactory.d.ts +39 -36
- package/out/tokenManagement/tokenManagementTransactionsFactory.js +310 -275
- package/out/tokenManagement/tokenManagementTransactionsFactory.js.map +1 -1
- package/out/transfers/transferTransactionsFactory.d.ts +10 -8
- package/out/transfers/transferTransactionsFactory.js +28 -26
- package/out/transfers/transferTransactionsFactory.js.map +1 -1
- package/out/transfers/transfersControllers.d.ts +2 -1
- package/out/transfers/transfersControllers.js +10 -23
- package/out/transfers/transfersControllers.js.map +1 -1
- package/out/validators/index.d.ts +2 -0
- package/out/validators/index.js +15 -0
- package/out/validators/index.js.map +1 -0
- package/out/validators/resources.d.ts +40 -0
- package/out/validators/resources.js +3 -0
- package/out/validators/resources.js.map +1 -0
- package/out/validators/validatorsController.d.ts +27 -0
- package/out/validators/validatorsController.js +95 -0
- package/out/validators/validatorsController.js.map +1 -0
- package/out/validators/validatorsSigner.d.ts +9 -0
- package/out/validators/validatorsSigner.js +25 -0
- package/out/validators/validatorsSigner.js.map +1 -0
- package/out/validators/validatorsTransactionsFactory.d.ts +33 -0
- package/out/validators/validatorsTransactionsFactory.js +269 -0
- package/out/validators/validatorsTransactionsFactory.js.map +1 -0
- package/out/wallet/index.d.ts +1 -0
- package/out/wallet/index.js +1 -0
- package/out/wallet/index.js.map +1 -1
- package/out/wallet/userWallet.d.ts +1 -1
- package/out/wallet/userWallet.js +1 -1
- package/out/wallet/validatorPem.d.ts +12 -0
- package/out/wallet/validatorPem.js +45 -0
- package/out/wallet/validatorPem.js.map +1 -0
- package/out/wallet/validatorSigner.d.ts +9 -1
- package/out/wallet/validatorSigner.js +24 -1
- package/out/wallet/validatorSigner.js.map +1 -1
- package/package.json +6 -5
- package/out/abi/code.d.ts +0 -23
- package/out/abi/code.js +0 -41
- package/out/abi/code.js.map +0 -1
- package/out/abi/interaction.d.ts +0 -67
- package/out/abi/interaction.js +0 -146
- package/out/abi/interaction.js.map +0 -1
- package/out/abi/smartContract.d.ts +0 -74
- package/out/abi/smartContract.js +0 -208
- package/out/abi/smartContract.js.map +0 -1
- package/out/core/transactionBuilder.d.ts +0 -32
- package/out/core/transactionBuilder.js +0 -45
- package/out/core/transactionBuilder.js.map +0 -1
|
@@ -3,80 +3,87 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GovernanceTransactionsFactory = void 0;
|
|
4
4
|
const abi_1 = require("../abi");
|
|
5
5
|
const core_1 = require("../core");
|
|
6
|
+
const baseFactory_1 = require("../core/baseFactory");
|
|
6
7
|
const constants_1 = require("../core/constants");
|
|
7
|
-
const transactionBuilder_1 = require("../core/transactionBuilder");
|
|
8
8
|
const EXTRA_GAS_LIMIT_FOR_VOTING = 100000n;
|
|
9
|
-
class GovernanceTransactionsFactory {
|
|
9
|
+
class GovernanceTransactionsFactory extends baseFactory_1.BaseFactory {
|
|
10
10
|
constructor(options) {
|
|
11
|
+
super({ config: options.config, gasLimitEstimator: options.gasLimitEstimator });
|
|
11
12
|
this.config = options.config;
|
|
12
13
|
this.argSerializer = new abi_1.ArgSerializer();
|
|
13
14
|
this.governanceContract = core_1.Address.newFromHex(constants_1.GOVERNANCE_CONTRACT_ADDRESS_HEX, this.config.addressHrp);
|
|
14
15
|
}
|
|
15
|
-
createTransactionForNewProposal(sender, options) {
|
|
16
|
+
async createTransactionForNewProposal(sender, options) {
|
|
16
17
|
const args = [
|
|
17
18
|
new abi_1.StringValue(options.commitHash),
|
|
18
19
|
new abi_1.BigUIntValue(options.startVoteEpoch),
|
|
19
20
|
new abi_1.BigUIntValue(options.endVoteEpoch),
|
|
20
21
|
];
|
|
21
22
|
const dataParts = ["proposal", ...this.argSerializer.valuesToStrings(args)];
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
sender: sender,
|
|
23
|
+
const transaction = new core_1.Transaction({
|
|
24
|
+
sender,
|
|
25
25
|
receiver: this.governanceContract,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
value: options.nativeTokenAmount,
|
|
27
|
+
chainID: this.config.chainID,
|
|
28
|
+
gasLimit: 0n,
|
|
29
|
+
});
|
|
30
|
+
this.setTransactionPayload(transaction, dataParts);
|
|
31
|
+
await this.setGasLimit(transaction, undefined, this.config.gasLimitForProposal);
|
|
32
|
+
return transaction;
|
|
31
33
|
}
|
|
32
|
-
createTransactionForVoting(sender, options) {
|
|
34
|
+
async createTransactionForVoting(sender, options) {
|
|
33
35
|
const args = [new abi_1.BigUIntValue(options.proposalNonce), new abi_1.StringValue(options.vote.valueOf())];
|
|
34
36
|
const dataParts = ["vote", ...this.argSerializer.valuesToStrings(args)];
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
sender: sender,
|
|
37
|
+
const transaction = new core_1.Transaction({
|
|
38
|
+
sender,
|
|
38
39
|
receiver: this.governanceContract,
|
|
39
|
-
|
|
40
|
-
gasLimit:
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
chainID: this.config.chainID,
|
|
41
|
+
gasLimit: 0n,
|
|
42
|
+
});
|
|
43
|
+
this.setTransactionPayload(transaction, dataParts);
|
|
44
|
+
await this.setGasLimit(transaction, undefined, this.config.gasLimitForVote + EXTRA_GAS_LIMIT_FOR_VOTING);
|
|
45
|
+
return transaction;
|
|
43
46
|
}
|
|
44
|
-
createTransactionForClosingProposal(sender, options) {
|
|
47
|
+
async createTransactionForClosingProposal(sender, options) {
|
|
45
48
|
const args = [new abi_1.BigUIntValue(options.proposalNonce)];
|
|
46
49
|
const dataParts = ["closeProposal", ...this.argSerializer.valuesToStrings(args)];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
sender: sender,
|
|
50
|
+
const transaction = new core_1.Transaction({
|
|
51
|
+
sender,
|
|
50
52
|
receiver: this.governanceContract,
|
|
51
|
-
|
|
52
|
-
gasLimit:
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
chainID: this.config.chainID,
|
|
54
|
+
gasLimit: 0n,
|
|
55
|
+
});
|
|
56
|
+
this.setTransactionPayload(transaction, dataParts);
|
|
57
|
+
await this.setGasLimit(transaction, undefined, this.config.gasLimitForClosingProposal);
|
|
58
|
+
return transaction;
|
|
55
59
|
}
|
|
56
|
-
createTransactionForClearingEndedProposals(sender, options) {
|
|
60
|
+
async createTransactionForClearingEndedProposals(sender, options) {
|
|
57
61
|
const dataParts = ["clearEndedProposals", ...options.proposers.map((address) => address.toHex())];
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
sender: sender,
|
|
62
|
+
const transaction = new core_1.Transaction({
|
|
63
|
+
sender,
|
|
61
64
|
receiver: this.governanceContract,
|
|
62
|
-
|
|
63
|
-
gasLimit:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
chainID: this.config.chainID,
|
|
66
|
+
gasLimit: 0n,
|
|
67
|
+
});
|
|
68
|
+
this.setTransactionPayload(transaction, dataParts);
|
|
69
|
+
const gasLimit = this.config.gasLimitForClearProposals +
|
|
70
|
+
BigInt(options.proposers.length) * this.config.gasLimitForClearProposals;
|
|
71
|
+
await this.setGasLimit(transaction, undefined, gasLimit);
|
|
72
|
+
return transaction;
|
|
67
73
|
}
|
|
68
|
-
createTransactionForClaimingAccumulatedFees(sender) {
|
|
74
|
+
async createTransactionForClaimingAccumulatedFees(sender) {
|
|
69
75
|
const dataParts = ["claimAccumulatedFees"];
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
sender: sender,
|
|
76
|
+
const transaction = new core_1.Transaction({
|
|
77
|
+
sender,
|
|
73
78
|
receiver: this.governanceContract,
|
|
74
|
-
|
|
75
|
-
gasLimit:
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
chainID: this.config.chainID,
|
|
80
|
+
gasLimit: 0n,
|
|
81
|
+
});
|
|
82
|
+
this.setTransactionPayload(transaction, dataParts);
|
|
83
|
+
await this.setGasLimit(transaction, undefined, this.config.gasLimitForClaimAccumulatedFees);
|
|
84
|
+
return transaction;
|
|
78
85
|
}
|
|
79
|
-
createTransactionForChangingConfig(sender, options) {
|
|
86
|
+
async createTransactionForChangingConfig(sender, options) {
|
|
80
87
|
const args = [
|
|
81
88
|
new abi_1.StringValue(options.proposalFee.toString()),
|
|
82
89
|
new abi_1.StringValue(options.lastProposalFee.toString()),
|
|
@@ -85,14 +92,15 @@ class GovernanceTransactionsFactory {
|
|
|
85
92
|
new abi_1.StringValue(options.minPassThreshold.toString()),
|
|
86
93
|
];
|
|
87
94
|
const dataParts = ["changeConfig", ...this.argSerializer.valuesToStrings(args)];
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
sender: sender,
|
|
95
|
+
const transaction = new core_1.Transaction({
|
|
96
|
+
sender,
|
|
91
97
|
receiver: this.governanceContract,
|
|
92
|
-
|
|
93
|
-
gasLimit:
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
chainID: this.config.chainID,
|
|
99
|
+
gasLimit: 0n,
|
|
100
|
+
});
|
|
101
|
+
this.setTransactionPayload(transaction, dataParts);
|
|
102
|
+
await this.setGasLimit(transaction, undefined, this.config.gasLimitForChangeConfig);
|
|
103
|
+
return transaction;
|
|
96
104
|
}
|
|
97
105
|
}
|
|
98
106
|
exports.GovernanceTransactionsFactory = GovernanceTransactionsFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governanceTransactionsFactory.js","sourceRoot":"","sources":["../../src/governance/governanceTransactionsFactory.ts"],"names":[],"mappings":";;;AAAA,gCAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"governanceTransactionsFactory.js","sourceRoot":"","sources":["../../src/governance/governanceTransactionsFactory.ts"],"names":[],"mappings":";;;AAAA,gCAAkE;AAClE,kCAA8F;AAC9F,qDAAkD;AAClD,iDAAoE;AAsBpE,MAAM,0BAA0B,GAAG,OAAQ,CAAC;AAE5C,MAAa,6BAA8B,SAAQ,yBAAW;IAK1D,YAAY,OAAsF;QAC9F,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAChF,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAa,EAAE,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,cAAO,CAAC,UAAU,CAAC,2CAA+B,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC1G,CAAC;IAED,KAAK,CAAC,+BAA+B,CAAC,MAAe,EAAE,OAAyB;QAC5E,MAAM,IAAI,GAAG;YACT,IAAI,iBAAW,CAAC,OAAO,CAAC,UAAU,CAAC;YACnC,IAAI,kBAAY,CAAC,OAAO,CAAC,cAAc,CAAC;YACxC,IAAI,kBAAY,CAAC,OAAO,CAAC,YAAY,CAAC;SACzC,CAAC;QACF,MAAM,SA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EAAE,IAAI,CAAC,kBAAkB;YACjC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;YAC5B,QAAQ,EAAE,EAAE;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAEpF,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ;AAjID,sEAiIC"}
|
package/out/index.d.ts
CHANGED
package/out/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./accounts"), exports);
|
|
|
21
21
|
__exportStar(require("./core"), exports);
|
|
22
22
|
__exportStar(require("./delegation"), exports);
|
|
23
23
|
__exportStar(require("./entrypoints"), exports);
|
|
24
|
+
__exportStar(require("./gasEstimator"), exports);
|
|
24
25
|
__exportStar(require("./governance"), exports);
|
|
25
26
|
__exportStar(require("./multisig"), exports);
|
|
26
27
|
__exportStar(require("./networkProviders"), exports);
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,wCAAsB;AACtB,sDAAoC;AACpC,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B;AAC3B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,+DAA6C;AAC7C,8CAA4B;AAC5B,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;AAEH,wCAAsB;AACtB,sDAAoC;AACpC,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B;AAC/B,+CAA6B;AAC7B,6CAA2B;AAC3B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,+DAA6C;AAC7C,8CAA4B;AAC5B,2CAAyB"}
|
package/out/multisig/index.d.ts
CHANGED
package/out/multisig/index.js
CHANGED
|
@@ -10,7 +10,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./multisigController"), exports);
|
|
13
14
|
__exportStar(require("./multisigTransactionsFactory"), exports);
|
|
15
|
+
__exportStar(require("./multisigTransactionsOutcomeParser"), exports);
|
|
14
16
|
__exportStar(require("./proposeTransferExecuteContractInput"), exports);
|
|
15
17
|
__exportStar(require("./resources"), exports);
|
|
16
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/multisig/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA8C;AAC9C,wEAAsD;AACtD,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/multisig/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqC;AACrC,gEAA8C;AAC9C,sEAAoD;AACpD,wEAAsD;AACtD,8CAA4B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Abi } from "../abi";
|
|
2
|
-
import { Address, BaseController, BaseControllerInput, IAccount, Transaction, TransactionOnNetwork } from "../core";
|
|
2
|
+
import { Address, BaseController, BaseControllerInput, IAccount, IGasLimitEstimator, Transaction, TransactionOnNetwork } from "../core";
|
|
3
3
|
import { INetworkProvider } from "../networkProviders/interface";
|
|
4
4
|
import { SmartContractDeployOutcome } from "../smartContracts";
|
|
5
5
|
import * as resources from "./resources";
|
|
@@ -12,6 +12,7 @@ export declare class MultisigController extends BaseController {
|
|
|
12
12
|
chainID: string;
|
|
13
13
|
networkProvider: INetworkProvider;
|
|
14
14
|
abi: Abi;
|
|
15
|
+
gasLimitEstimator?: IGasLimitEstimator;
|
|
15
16
|
});
|
|
16
17
|
/**
|
|
17
18
|
* Creates a transaction for deploying a new multisig contract
|
|
@@ -27,7 +27,7 @@ const multisigTransactionsOutcomeParser_1 = require("./multisigTransactionsOutco
|
|
|
27
27
|
const resources = __importStar(require("./resources"));
|
|
28
28
|
class MultisigController extends core_1.BaseController {
|
|
29
29
|
constructor(options) {
|
|
30
|
-
super();
|
|
30
|
+
super({ gasLimitEstimator: options.gasLimitEstimator });
|
|
31
31
|
this.mapResponseToAction = (responseData) => {
|
|
32
32
|
const { name, fields } = responseData;
|
|
33
33
|
switch (name) {
|
|
@@ -71,11 +71,12 @@ class MultisigController extends core_1.BaseController {
|
|
|
71
71
|
* Creates a transaction for deploying a new multisig contract
|
|
72
72
|
*/
|
|
73
73
|
async createTransactionForDeploy(sender, nonce, options) {
|
|
74
|
-
|
|
74
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
75
|
+
const transaction = await this.multisigFactory.createTransactionForDeploy(sender.address, options);
|
|
75
76
|
transaction.guardian = options.guardian ?? core_1.Address.empty();
|
|
76
77
|
transaction.relayer = options.relayer ?? core_1.Address.empty();
|
|
77
78
|
transaction.nonce = nonce;
|
|
78
|
-
this.setTransactionGasOptions(transaction, options);
|
|
79
|
+
await this.setTransactionGasOptions(transaction, options);
|
|
79
80
|
transaction.signature = await sender.signTransaction(transaction);
|
|
80
81
|
return transaction;
|
|
81
82
|
}
|
|
@@ -297,48 +298,36 @@ class MultisigController extends core_1.BaseController {
|
|
|
297
298
|
* Creates a transaction for proposing to add a board member
|
|
298
299
|
*/
|
|
299
300
|
async createTransactionForProposeAddBoardMember(sender, nonce, options) {
|
|
300
|
-
|
|
301
|
-
transaction
|
|
302
|
-
transaction
|
|
303
|
-
transaction.nonce = nonce;
|
|
304
|
-
this.setTransactionGasOptions(transaction, options);
|
|
305
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
301
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
302
|
+
const transaction = await this.multisigFactory.createTransactionForProposeAddBoardMember(sender.address, options);
|
|
303
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
306
304
|
return transaction;
|
|
307
305
|
}
|
|
308
306
|
/**
|
|
309
307
|
* Creates a transaction for proposing to add a proposer
|
|
310
308
|
*/
|
|
311
309
|
async createTransactionForProposeAddProposer(sender, nonce, options) {
|
|
312
|
-
|
|
313
|
-
transaction
|
|
314
|
-
transaction
|
|
315
|
-
transaction.nonce = nonce;
|
|
316
|
-
this.setTransactionGasOptions(transaction, options);
|
|
317
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
310
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
311
|
+
const transaction = await this.multisigFactory.createTransactionForProposeAddProposer(sender.address, options);
|
|
312
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
318
313
|
return transaction;
|
|
319
314
|
}
|
|
320
315
|
/**
|
|
321
316
|
* Creates a transaction for proposing to remove a user
|
|
322
317
|
*/
|
|
323
318
|
async createTransactionForProposeRemoveUser(sender, nonce, options) {
|
|
324
|
-
|
|
325
|
-
transaction
|
|
326
|
-
transaction
|
|
327
|
-
transaction.nonce = nonce;
|
|
328
|
-
this.setTransactionGasOptions(transaction, options);
|
|
329
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
319
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
320
|
+
const transaction = await this.multisigFactory.createTransactionForProposeRemoveUser(sender.address, options);
|
|
321
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
330
322
|
return transaction;
|
|
331
323
|
}
|
|
332
324
|
/**
|
|
333
325
|
* Creates a transaction for proposing to change quorum
|
|
334
326
|
*/
|
|
335
327
|
async createTransactionForProposeChangeQuorum(sender, nonce, options) {
|
|
336
|
-
|
|
337
|
-
transaction
|
|
338
|
-
transaction
|
|
339
|
-
transaction.nonce = nonce;
|
|
340
|
-
this.setTransactionGasOptions(transaction, options);
|
|
341
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
328
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
329
|
+
const transaction = await this.multisigFactory.createTransactionForProposeChangeQuorum(sender.address, options);
|
|
330
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
342
331
|
return transaction;
|
|
343
332
|
}
|
|
344
333
|
parseProposeAction(transaction) {
|
|
@@ -352,24 +341,18 @@ class MultisigController extends core_1.BaseController {
|
|
|
352
341
|
* Creates a transaction for signing an action
|
|
353
342
|
*/
|
|
354
343
|
async createTransactionForSignAction(sender, nonce, options) {
|
|
355
|
-
|
|
356
|
-
transaction
|
|
357
|
-
transaction
|
|
358
|
-
transaction.nonce = nonce;
|
|
359
|
-
this.setTransactionGasOptions(transaction, options);
|
|
360
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
344
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
345
|
+
const transaction = await this.multisigFactory.createTransactionForSignAction(sender.address, options);
|
|
346
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
361
347
|
return transaction;
|
|
362
348
|
}
|
|
363
349
|
/**
|
|
364
350
|
* Creates a transaction for performing an action
|
|
365
351
|
*/
|
|
366
352
|
async createTransactionForPerformAction(sender, nonce, options) {
|
|
367
|
-
|
|
368
|
-
transaction
|
|
369
|
-
transaction
|
|
370
|
-
transaction.nonce = nonce;
|
|
371
|
-
this.setTransactionGasOptions(transaction, options);
|
|
372
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
353
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
354
|
+
const transaction = await this.multisigFactory.createTransactionForPerformAction(sender.address, options);
|
|
355
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
373
356
|
return transaction;
|
|
374
357
|
}
|
|
375
358
|
parsePerformAction(transaction) {
|
|
@@ -383,156 +366,117 @@ class MultisigController extends core_1.BaseController {
|
|
|
383
366
|
* Creates a transaction for unsigning an action
|
|
384
367
|
*/
|
|
385
368
|
async createTransactionForUnsignAction(sender, nonce, options) {
|
|
386
|
-
|
|
387
|
-
transaction
|
|
388
|
-
transaction
|
|
389
|
-
transaction.nonce = nonce;
|
|
390
|
-
this.setTransactionGasOptions(transaction, options);
|
|
391
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
369
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
370
|
+
const transaction = await this.multisigFactory.createTransactionForUnsign(sender.address, options);
|
|
371
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
392
372
|
return transaction;
|
|
393
373
|
}
|
|
394
374
|
/**
|
|
395
375
|
* Creates a transaction for discarding an action
|
|
396
376
|
*/
|
|
397
377
|
async createTransactionForDiscardAction(sender, nonce, options) {
|
|
398
|
-
|
|
399
|
-
transaction
|
|
400
|
-
transaction
|
|
401
|
-
transaction.nonce = nonce;
|
|
402
|
-
this.setTransactionGasOptions(transaction, options);
|
|
403
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
378
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
379
|
+
const transaction = await this.multisigFactory.createTransactionForDiscardAction(sender.address, options);
|
|
380
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
404
381
|
return transaction;
|
|
405
382
|
}
|
|
406
383
|
/**
|
|
407
384
|
* Creates a transaction for deposit native token or tokens
|
|
408
385
|
*/
|
|
409
386
|
async createTransactionForDeposit(sender, nonce, options) {
|
|
410
|
-
|
|
411
|
-
transaction
|
|
412
|
-
transaction
|
|
413
|
-
transaction.nonce = nonce;
|
|
414
|
-
this.setTransactionGasOptions(transaction, options);
|
|
415
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
387
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
388
|
+
const transaction = await this.multisigFactory.createTransactionForDeposit(sender.address, options);
|
|
389
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
416
390
|
return transaction;
|
|
417
391
|
}
|
|
418
392
|
/**
|
|
419
393
|
* Creates a transaction for proposing to transfer REWA and execute a smart contract call
|
|
420
394
|
*/
|
|
421
395
|
async createTransactionForProposeTransferExecute(sender, nonce, options) {
|
|
422
|
-
|
|
423
|
-
transaction
|
|
424
|
-
transaction
|
|
425
|
-
transaction.nonce = nonce;
|
|
426
|
-
this.setTransactionGasOptions(transaction, options);
|
|
427
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
396
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
397
|
+
const transaction = await this.multisigFactory.createTransactionForProposeTransferExecute(sender.address, options);
|
|
398
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
428
399
|
return transaction;
|
|
429
400
|
}
|
|
430
401
|
/**
|
|
431
402
|
* Creates a transaction for proposing to transfer DCDT tokens and execute a smart contract call
|
|
432
403
|
*/
|
|
433
404
|
async createTransactionForProposeTransferExecuteDcdt(sender, nonce, options) {
|
|
434
|
-
|
|
435
|
-
transaction
|
|
436
|
-
transaction
|
|
437
|
-
transaction.nonce = nonce;
|
|
438
|
-
this.setTransactionGasOptions(transaction, options);
|
|
439
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
405
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
406
|
+
const transaction = await this.multisigFactory.createTransactionForProposeTransferExecuteDcdt(sender.address, options);
|
|
407
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
440
408
|
return transaction;
|
|
441
409
|
}
|
|
442
410
|
/**
|
|
443
411
|
* Creates a transaction for proposing an async call to another contract
|
|
444
412
|
*/
|
|
445
413
|
async createTransactionForProposeAsyncCall(sender, nonce, options) {
|
|
446
|
-
|
|
447
|
-
transaction
|
|
448
|
-
transaction
|
|
449
|
-
transaction.nonce = nonce;
|
|
450
|
-
this.setTransactionGasOptions(transaction, options);
|
|
451
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
414
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
415
|
+
const transaction = await this.multisigFactory.createTransactionForProposeAsyncCall(sender.address, options);
|
|
416
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
452
417
|
return transaction;
|
|
453
418
|
}
|
|
454
419
|
/**
|
|
455
420
|
* Creates a transaction for proposing to deploy a smart contract from source
|
|
456
421
|
*/
|
|
457
422
|
async createTransactionForProposeContractDeployFromSource(sender, nonce, options) {
|
|
458
|
-
|
|
459
|
-
transaction
|
|
460
|
-
transaction
|
|
461
|
-
transaction.nonce = nonce;
|
|
462
|
-
this.setTransactionGasOptions(transaction, options);
|
|
463
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
423
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
424
|
+
const transaction = await this.multisigFactory.createTransactionForProposeContractDeployFromSource(sender.address, options);
|
|
425
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
464
426
|
return transaction;
|
|
465
427
|
}
|
|
466
428
|
/**
|
|
467
429
|
* Creates a transaction for proposing to upgrade a smart contract from source
|
|
468
430
|
*/
|
|
469
431
|
async createTransactionForProposeContractUpgradeFromSource(sender, nonce, options) {
|
|
470
|
-
|
|
471
|
-
transaction
|
|
472
|
-
transaction
|
|
473
|
-
transaction.nonce = nonce;
|
|
474
|
-
this.setTransactionGasOptions(transaction, options);
|
|
475
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
432
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
433
|
+
const transaction = await this.multisigFactory.createTransactionForProposeContractUpgradeFromSource(sender.address, options);
|
|
434
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
476
435
|
return transaction;
|
|
477
436
|
}
|
|
478
437
|
/**
|
|
479
438
|
* Creates a transaction for signing a batch of actions
|
|
480
439
|
*/
|
|
481
440
|
async createTransactionForSignBatch(sender, nonce, options) {
|
|
482
|
-
|
|
483
|
-
transaction
|
|
484
|
-
transaction
|
|
485
|
-
transaction.nonce = nonce;
|
|
486
|
-
this.setTransactionGasOptions(transaction, options);
|
|
487
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
441
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
442
|
+
const transaction = await this.multisigFactory.createTransactionForSignBatch(sender.address, options);
|
|
443
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
488
444
|
return transaction;
|
|
489
445
|
}
|
|
490
446
|
/**
|
|
491
447
|
* Creates a transaction for signing and performing an action in one step
|
|
492
448
|
*/
|
|
493
449
|
async createTransactionForSignAndPerform(sender, nonce, options) {
|
|
494
|
-
|
|
495
|
-
transaction
|
|
496
|
-
transaction
|
|
497
|
-
transaction.nonce = nonce;
|
|
498
|
-
this.setTransactionGasOptions(transaction, options);
|
|
499
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
450
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
451
|
+
const transaction = await this.multisigFactory.createTransactionForSignAndPerform(sender.address, options);
|
|
452
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
500
453
|
return transaction;
|
|
501
454
|
}
|
|
502
455
|
/**
|
|
503
456
|
* Creates a transaction for unsigning for outdated board members
|
|
504
457
|
*/
|
|
505
458
|
async createTransactionForUnsignForOutdatedBoardMembers(sender, nonce, options) {
|
|
506
|
-
|
|
507
|
-
transaction
|
|
508
|
-
transaction
|
|
509
|
-
transaction.nonce = nonce;
|
|
510
|
-
this.setTransactionGasOptions(transaction, options);
|
|
511
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
459
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
460
|
+
const transaction = await this.multisigFactory.createTransactionForUnsignForOutdatedBoardMembers(sender.address, options);
|
|
461
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
512
462
|
return transaction;
|
|
513
463
|
}
|
|
514
464
|
/**
|
|
515
465
|
* Creates a transaction for performing a batch of actions
|
|
516
466
|
*/
|
|
517
467
|
async createTransactionForPerformBatch(sender, nonce, options) {
|
|
518
|
-
|
|
519
|
-
transaction
|
|
520
|
-
transaction
|
|
521
|
-
transaction.nonce = nonce;
|
|
522
|
-
this.setTransactionGasOptions(transaction, options);
|
|
523
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
468
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
469
|
+
const transaction = await this.multisigFactory.createTransactionForPerformBatch(sender.address, options);
|
|
470
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
524
471
|
return transaction;
|
|
525
472
|
}
|
|
526
473
|
/**
|
|
527
474
|
* Creates a transaction for discarding a batch of actions
|
|
528
475
|
*/
|
|
529
476
|
async createTransactionForDiscardBatch(sender, nonce, options) {
|
|
530
|
-
|
|
531
|
-
transaction
|
|
532
|
-
transaction
|
|
533
|
-
transaction.nonce = nonce;
|
|
534
|
-
this.setTransactionGasOptions(transaction, options);
|
|
535
|
-
transaction.signature = await sender.signTransaction(transaction);
|
|
477
|
+
options.gasLimit = options.gasLimit ? options.gasLimit : 0n;
|
|
478
|
+
const transaction = await this.multisigFactory.createTransactionForDiscardBatch(sender.address, options);
|
|
479
|
+
await this.setupAndSignTransaction(transaction, options, nonce, sender);
|
|
536
480
|
return transaction;
|
|
537
481
|
}
|
|
538
482
|
}
|