@firmachain/firma-js 0.3.4 → 0.3.5
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/dist/index.js +5 -1
- package/dist/sdk/FirmaAuthzService.d.ts +8 -7
- package/dist/sdk/FirmaAuthzService.js +12 -22
- package/dist/sdk/FirmaBankService.js +2 -2
- package/dist/sdk/FirmaChainService.js +1 -1
- package/dist/sdk/FirmaContractService.d.ts +1 -1
- package/dist/sdk/FirmaContractService.js +6 -6
- package/dist/sdk/FirmaCosmWasmCw20.d.ts +2 -2
- package/dist/sdk/FirmaCosmWasmCw20.js +8 -8
- package/dist/sdk/FirmaCosmWasmCw721.d.ts +2 -2
- package/dist/sdk/FirmaCosmWasmCw721.js +12 -12
- package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmCwBridge.js +8 -8
- package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmCwMarketplace.js +5 -5
- package/dist/sdk/FirmaCosmWasmService.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmService.js +13 -13
- package/dist/sdk/FirmaDistributionService.d.ts +1 -1
- package/dist/sdk/FirmaDistributionService.js +6 -6
- package/dist/sdk/FirmaFeeGrantService.d.ts +7 -6
- package/dist/sdk/FirmaFeeGrantService.js +9 -26
- package/dist/sdk/FirmaGovService.d.ts +1 -1
- package/dist/sdk/FirmaGovService.js +14 -14
- package/dist/sdk/FirmaIbcService.d.ts +3 -3
- package/dist/sdk/FirmaIbcService.js +11 -8
- package/dist/sdk/FirmaIpfsService.js +1 -1
- package/dist/sdk/FirmaMintService.js +1 -1
- package/dist/sdk/FirmaNftService.d.ts +1 -1
- package/dist/sdk/FirmaNftService.js +6 -6
- package/dist/sdk/FirmaSlashingService.js +1 -1
- package/dist/sdk/FirmaStakingService.d.ts +3 -3
- package/dist/sdk/FirmaStakingService.js +6 -6
- package/dist/sdk/FirmaTokenService.d.ts +1 -1
- package/dist/sdk/FirmaTokenService.js +5 -5
- package/dist/sdk/FirmaUtil.d.ts +25 -24
- package/dist/sdk/FirmaUtil.js +199 -144
- package/dist/sdk/FirmaWalletService.d.ts +6 -7
- package/dist/sdk/FirmaWalletService.js +78 -36
- package/dist/sdk/firmachain/authz/AuthzQueryClient.js +4 -4
- package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +8 -11
- package/dist/sdk/firmachain/authz/AuthzTxTypes.js +6 -10
- package/dist/sdk/firmachain/authz/index.js +5 -1
- package/dist/sdk/firmachain/bank/BankQueryClient.js +5 -5
- package/dist/sdk/firmachain/bank/index.js +5 -1
- package/dist/sdk/firmachain/common/ITxClient.d.ts +2 -4
- package/dist/sdk/firmachain/common/ITxClient.js +20 -92
- package/dist/sdk/firmachain/common/LedgerWallet.d.ts +19 -3
- package/dist/sdk/firmachain/common/LedgerWallet.js +138 -68
- package/dist/sdk/firmachain/common/TendermintQueryClient.js +1 -1
- package/dist/sdk/firmachain/common/TxCommon.d.ts +13 -29
- package/dist/sdk/firmachain/common/accounts.d.ts +1 -1
- package/dist/sdk/firmachain/common/accounts.js +7 -7
- package/dist/sdk/firmachain/{amino → common}/coins.d.ts +2 -14
- package/dist/sdk/firmachain/{amino → common}/coins.js +4 -25
- package/dist/sdk/firmachain/common/index.d.ts +0 -1
- package/dist/sdk/firmachain/common/index.js +5 -4
- package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
- package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
- package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
- package/dist/sdk/firmachain/contract/index.js +5 -1
- package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
- package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
- package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
- package/dist/sdk/firmachain/distribution/index.js +5 -1
- package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
- package/dist/sdk/firmachain/feegrant/index.js +5 -1
- package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
- package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
- package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
- package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
- package/dist/sdk/firmachain/gov/index.js +5 -1
- package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
- package/dist/sdk/firmachain/ibc/index.js +5 -1
- package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
- package/dist/sdk/firmachain/mint/index.js +5 -1
- package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
- package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
- package/dist/sdk/firmachain/nft/index.js +5 -1
- package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
- package/dist/sdk/firmachain/slashing/index.js +5 -1
- package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
- package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
- package/dist/sdk/firmachain/staking/index.js +5 -1
- package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
- package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
- package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
- package/dist/sdk/firmachain/token/index.js +5 -1
- package/dist/test/00.wallet.test.js +4 -4
- package/dist/test/01.contract_tx.test.js +5 -5
- package/dist/test/02.contract_query.test.js +15 -15
- package/dist/test/03.contract_scenario.test.js +28 -28
- package/dist/test/04.bank_tx.test.js +4 -4
- package/dist/test/05.bank_query.test.js +9 -9
- package/dist/test/06.feegrant_tx.test.js +59 -35
- package/dist/test/07.feegrant_query.test.js +18 -15
- package/dist/test/08.gas_estimate.test.js +110 -70
- package/dist/test/09.ipfs.test.js +4 -4
- package/dist/test/10.nft_tx.test.js +7 -7
- package/dist/test/11.nft_query.test.js +9 -9
- package/dist/test/12.staking_tx.test.js +27 -15
- package/dist/test/13.staking_query.test.js +20 -20
- package/dist/test/14.distribution_tx.test.js +8 -8
- package/dist/test/15.distribution_query.test.js +15 -15
- package/dist/test/16.gov_tx.test.js +17 -17
- package/dist/test/17.gov_query.test.js +19 -19
- package/dist/test/18.util.test.js +105 -63
- package/dist/test/19.chain.test.js +38 -38
- package/dist/test/20.slashing_query.test.js +25 -25
- package/dist/test/21.token_tx.test.js +6 -6
- package/dist/test/22.token_query.test.js +4 -4
- package/dist/test/23.authz_tx.test.js +77 -47
- package/dist/test/24.authz_query.test.js +66 -67
- package/dist/test/25.cosmwasm_tx.test.js +7 -7
- package/dist/test/26.cosmwasm_query.test.js +127 -59
- package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +34 -62
- package/dist/test/28.ibc_tx.test.js +8 -8
- package/dist/test/29.mint_query.test.js +2 -2
- package/dist/test/30.cw20_tx.test.js +20 -20
- package/dist/test/31.cw20_query.test.js +24 -24
- package/dist/test/32.cw721_tx.test.js +19 -19
- package/dist/test/33.cw721_query.test.js +32 -32
- package/dist/test/34.cw_bridge_tx.test.js +19 -19
- package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
- package/dist/test/36.cw_bridge_query.test.js +20 -20
- package/dist/test/37.cw_marketplace_tx.test.js +32 -32
- package/dist/test/38.cw_marketplace_query.test.js +2 -2
- package/package.json +9 -10
- package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
- package/dist/sdk/firmachain/amino/addresses.js +0 -46
- package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
- package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
- package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
- package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
- package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
- package/dist/sdk/firmachain/amino/encoding.js +0 -252
- package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
- package/dist/sdk/firmachain/amino/multisig.js +0 -42
- package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
- package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
- package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
- package/dist/sdk/firmachain/amino/signature.js +0 -36
- package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
- package/dist/sdk/firmachain/amino/signdoc.js +0 -68
- package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
- package/dist/sdk/firmachain/amino/signer.js +0 -2
- package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
- package/dist/sdk/firmachain/amino/stdtx.js +0 -17
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
- package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
- package/dist/sdk/firmachain/common/aminotypes.js +0 -74
- package/dist/sdk/firmachain/common/events.d.ts +0 -32
- package/dist/sdk/firmachain/common/events.js +0 -18
- package/dist/sdk/firmachain/common/fee.d.ts +0 -26
- package/dist/sdk/firmachain/common/fee.js +0 -83
- package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
- package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
- package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
- package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
- package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
- package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
- package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
- package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
- package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
- package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
- package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
- package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
- package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
- package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
- package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
- package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
- package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
- package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
- package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
- package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
- package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
- package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
- package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
- package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
- package/dist/sdk/firmachain/common/modules/index.js +0 -101
- package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
- package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
- package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
- package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
- package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
- package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
- package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
- package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
- package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
- package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
- package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
- package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
- package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
- package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
- package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
- package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
- package/dist/sdk/firmachain/common/search.d.ts +0 -10
- package/dist/sdk/firmachain/common/search.js +0 -7
- package/dist/sdk/firmachain/common/signing.d.ts +0 -15
- package/dist/sdk/firmachain/common/signing.js +0 -87
- package/dist/sdk/firmachain/common/signingstargateclient.d.ts +0 -121
- package/dist/sdk/firmachain/common/signingstargateclient.js +0 -674
- package/dist/sdk/firmachain/common/stargateclient.d.ts +0 -210
- package/dist/sdk/firmachain/common/stargateclient.js +0 -527
- package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
- package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
- /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
- /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
- /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
- /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -138,7 +138,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
138
138
|
case 1:
|
|
139
139
|
result = _a.sent();
|
|
140
140
|
codeId = extractValue(result.events, "store_code", "code_id");
|
|
141
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
141
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
142
142
|
return [2 /*return*/];
|
|
143
143
|
}
|
|
144
144
|
});
|
|
@@ -182,7 +182,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
182
182
|
case 1:
|
|
183
183
|
result = _a.sent();
|
|
184
184
|
contractAddress = extractValue(result.events, "instantiate", "_contract_address");
|
|
185
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
185
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
186
186
|
return [2 /*return*/];
|
|
187
187
|
}
|
|
188
188
|
});
|
|
@@ -200,7 +200,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
200
200
|
return [4 /*yield*/, firma.Cw20.transfer(aliceWallet, contractAddress, bobAddress, amount, { gas: gas, fee: fee })];
|
|
201
201
|
case 2:
|
|
202
202
|
result = _a.sent();
|
|
203
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
203
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
204
204
|
return [2 /*return*/];
|
|
205
205
|
}
|
|
206
206
|
});
|
|
@@ -224,7 +224,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
224
224
|
return [4 /*yield*/, firma.Cw20.mint(aliceWallet, contractAddress, aliceAddress, amount, { gas: gas, fee: fee })];
|
|
225
225
|
case 3:
|
|
226
226
|
result = _a.sent();
|
|
227
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
227
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
228
228
|
return [2 /*return*/];
|
|
229
229
|
}
|
|
230
230
|
});
|
|
@@ -242,7 +242,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
242
242
|
return [4 /*yield*/, firma.Cw20.burn(aliceWallet, contractAddress, amount, { gas: gas, fee: fee })];
|
|
243
243
|
case 2:
|
|
244
244
|
result = _a.sent();
|
|
245
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
245
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
246
246
|
return [2 /*return*/];
|
|
247
247
|
}
|
|
248
248
|
});
|
|
@@ -263,11 +263,11 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
263
263
|
return [4 /*yield*/, firma.Cw20.increaseAllowance(aliceWallet, contractAddress, bobAddress, amount, expires, { gas: gas, fee: fee })];
|
|
264
264
|
case 3:
|
|
265
265
|
result = _a.sent();
|
|
266
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
266
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
267
267
|
return [4 /*yield*/, firma.Cw20.getAllowance(contractAddress, aliceAddress, bobAddress)];
|
|
268
268
|
case 4:
|
|
269
269
|
newAllowance = _a.sent();
|
|
270
|
-
chai_1.expect(Number.parseInt(olDAllowance.allowance) + Number.parseInt(amount)).to.be.equal(Number.parseInt(newAllowance.allowance));
|
|
270
|
+
(0, chai_1.expect)(Number.parseInt(olDAllowance.allowance) + Number.parseInt(amount)).to.be.equal(Number.parseInt(newAllowance.allowance));
|
|
271
271
|
return [2 /*return*/];
|
|
272
272
|
}
|
|
273
273
|
});
|
|
@@ -285,7 +285,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
285
285
|
return [4 /*yield*/, firma.Cw20.transferFrom(bobWallet, contractAddress, aliceAddress, bobAddress, amount, { gas: gas, fee: fee })];
|
|
286
286
|
case 2:
|
|
287
287
|
result = _a.sent();
|
|
288
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
288
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
289
289
|
return [2 /*return*/];
|
|
290
290
|
}
|
|
291
291
|
});
|
|
@@ -303,7 +303,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
303
303
|
return [4 /*yield*/, firma.Cw20.burnFrom(bobWallet, contractAddress, aliceAddress, amount, { gas: gas, fee: fee })];
|
|
304
304
|
case 2:
|
|
305
305
|
result = _a.sent();
|
|
306
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
306
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
307
307
|
return [2 /*return*/];
|
|
308
308
|
}
|
|
309
309
|
});
|
|
@@ -324,11 +324,11 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
324
324
|
return [4 /*yield*/, firma.Cw20.decreaseAllowance(aliceWallet, contractAddress, bobAddress, amount, expires, { gas: gas, fee: fee })];
|
|
325
325
|
case 3:
|
|
326
326
|
result = _a.sent();
|
|
327
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
327
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
328
328
|
return [4 /*yield*/, firma.Cw20.getAllowance(contractAddress, aliceAddress, bobAddress)];
|
|
329
329
|
case 4:
|
|
330
330
|
newAllowance = _a.sent();
|
|
331
|
-
chai_1.expect(Number.parseInt(newAllowance.allowance) + Number.parseInt(amount)).to.be.equal(Number.parseInt(oldAllowance.allowance));
|
|
331
|
+
(0, chai_1.expect)(Number.parseInt(newAllowance.allowance) + Number.parseInt(amount)).to.be.equal(Number.parseInt(oldAllowance.allowance));
|
|
332
332
|
return [2 /*return*/];
|
|
333
333
|
}
|
|
334
334
|
});
|
|
@@ -347,11 +347,11 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
347
347
|
return [4 /*yield*/, firma.Cw20.updateMinter(aliceWallet, contractAddress, bobAddress, { gas: gas, fee: fee })];
|
|
348
348
|
case 3:
|
|
349
349
|
result = _a.sent();
|
|
350
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
350
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
351
351
|
return [4 /*yield*/, firma.Cw20.getMinter(contractAddress)];
|
|
352
352
|
case 4:
|
|
353
353
|
newMinter = _a.sent();
|
|
354
|
-
chai_1.expect(oldMinter).to.not.equal(newMinter);
|
|
354
|
+
(0, chai_1.expect)(oldMinter).to.not.equal(newMinter);
|
|
355
355
|
return [2 /*return*/];
|
|
356
356
|
}
|
|
357
357
|
});
|
|
@@ -373,11 +373,11 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
373
373
|
return [4 /*yield*/, firma.Cw20.updateMarketing(aliceWallet, contractAddress, description, marketingAddress, project, { gas: gas, fee: fee })];
|
|
374
374
|
case 3:
|
|
375
375
|
result = _a.sent();
|
|
376
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
376
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
377
377
|
return [4 /*yield*/, firma.Cw20.getMarketingInfo(contractAddress)];
|
|
378
378
|
case 4:
|
|
379
379
|
newMarketingInfo = _a.sent();
|
|
380
|
-
chai_1.expect(oldMarketingInfo).to.not.equal(newMarketingInfo);
|
|
380
|
+
(0, chai_1.expect)(oldMarketingInfo).to.not.equal(newMarketingInfo);
|
|
381
381
|
return [2 /*return*/];
|
|
382
382
|
}
|
|
383
383
|
});
|
|
@@ -397,11 +397,11 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
397
397
|
return [4 /*yield*/, firma.Cw20.uploadLogo(aliceWallet, contractAddress, url, { gas: gas, fee: fee })];
|
|
398
398
|
case 3:
|
|
399
399
|
result = _a.sent();
|
|
400
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
400
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
401
401
|
return [4 /*yield*/, firma.Cw20.getMarketingInfo(contractAddress)];
|
|
402
402
|
case 4:
|
|
403
403
|
newMarketingInfo = _a.sent();
|
|
404
|
-
chai_1.expect(oldMarketingInfo).to.not.equal(newMarketingInfo);
|
|
404
|
+
(0, chai_1.expect)(oldMarketingInfo).to.not.equal(newMarketingInfo);
|
|
405
405
|
return [2 /*return*/];
|
|
406
406
|
}
|
|
407
407
|
});
|
|
@@ -421,7 +421,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
421
421
|
return [4 /*yield*/, firma.Cw20.send(aliceWallet, contractAddress, targetContractAddress, amount, msg, { gas: gas, fee: fee })];
|
|
422
422
|
case 2:
|
|
423
423
|
result = _a.sent();
|
|
424
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
424
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
425
425
|
return [2 /*return*/];
|
|
426
426
|
}
|
|
427
427
|
});
|
|
@@ -442,7 +442,7 @@ describe('[30. cw20 tx Test]', function () {
|
|
|
442
442
|
return [4 /*yield*/, firma.Cw20.sendFrom(bobWallet, contractAddress, targetContractAddress, owner, amount, msg, { gas: gas, fee: fee })];
|
|
443
443
|
case 2:
|
|
444
444
|
result = _a.sent();
|
|
445
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
445
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
446
446
|
return [2 /*return*/];
|
|
447
447
|
}
|
|
448
448
|
});
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -137,7 +137,7 @@ describe('[31. cw20 query Test]', function () {
|
|
|
137
137
|
case 1:
|
|
138
138
|
storeCodeResult = _a.sent();
|
|
139
139
|
codeId = extractValue(storeCodeResult.events, "store_code", "code_id");
|
|
140
|
-
chai_1.expect(storeCodeResult.code).to.be.equal(0);
|
|
140
|
+
(0, chai_1.expect)(storeCodeResult.code).to.be.equal(0);
|
|
141
141
|
return [4 /*yield*/, aliceWallet.getAddress()];
|
|
142
142
|
case 2:
|
|
143
143
|
admin = _a.sent();
|
|
@@ -174,7 +174,7 @@ describe('[31. cw20 query Test]', function () {
|
|
|
174
174
|
case 3:
|
|
175
175
|
result = _a.sent();
|
|
176
176
|
contractAddress = extractValue(result.events, "instantiate", "_contract_address");
|
|
177
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
177
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
178
178
|
return [2 /*return*/];
|
|
179
179
|
}
|
|
180
180
|
});
|
|
@@ -186,8 +186,8 @@ describe('[31. cw20 query Test]', function () {
|
|
|
186
186
|
case 0: return [4 /*yield*/, firma.Cw20.getBalance(contractAddress, aliceAddress)];
|
|
187
187
|
case 1:
|
|
188
188
|
balance = _a.sent();
|
|
189
|
-
chai_1.expect(balance).to.be.a('string');
|
|
190
|
-
chai_1.expect(Number(balance)).to.be.at.least(0);
|
|
189
|
+
(0, chai_1.expect)(balance).to.be.a('string');
|
|
190
|
+
(0, chai_1.expect)(Number(balance)).to.be.at.least(0);
|
|
191
191
|
return [2 /*return*/];
|
|
192
192
|
}
|
|
193
193
|
});
|
|
@@ -201,8 +201,8 @@ describe('[31. cw20 query Test]', function () {
|
|
|
201
201
|
return [4 /*yield*/, firma.Cw20.getBalance(contractAddress, nobalance_address)];
|
|
202
202
|
case 1:
|
|
203
203
|
balance = _a.sent();
|
|
204
|
-
chai_1.expect(balance).to.be.a('string');
|
|
205
|
-
chai_1.expect(Number(balance)).to.equal(0);
|
|
204
|
+
(0, chai_1.expect)(balance).to.be.a('string');
|
|
205
|
+
(0, chai_1.expect)(Number(balance)).to.equal(0);
|
|
206
206
|
return [2 /*return*/];
|
|
207
207
|
}
|
|
208
208
|
});
|
|
@@ -214,8 +214,8 @@ describe('[31. cw20 query Test]', function () {
|
|
|
214
214
|
case 0: return [4 /*yield*/, firma.Cw20.getTotalSupply(contractAddress)];
|
|
215
215
|
case 1:
|
|
216
216
|
totalSupply = _a.sent();
|
|
217
|
-
chai_1.expect(totalSupply).to.be.a('string');
|
|
218
|
-
chai_1.expect(Number(totalSupply)).to.be.at.least(0);
|
|
217
|
+
(0, chai_1.expect)(totalSupply).to.be.a('string');
|
|
218
|
+
(0, chai_1.expect)(Number(totalSupply)).to.be.at.least(0);
|
|
219
219
|
return [2 /*return*/];
|
|
220
220
|
}
|
|
221
221
|
});
|
|
@@ -227,11 +227,11 @@ describe('[31. cw20 query Test]', function () {
|
|
|
227
227
|
case 0: return [4 /*yield*/, firma.Cw20.getTokenInfo(contractAddress)];
|
|
228
228
|
case 1:
|
|
229
229
|
tokenInfo = _a.sent();
|
|
230
|
-
chai_1.expect(tokenInfo).to.be.an('object');
|
|
231
|
-
chai_1.expect(tokenInfo).to.have.property('name');
|
|
232
|
-
chai_1.expect(tokenInfo).to.have.property('symbol');
|
|
233
|
-
chai_1.expect(tokenInfo).to.have.property('decimals');
|
|
234
|
-
chai_1.expect(tokenInfo).to.have.property('total_supply');
|
|
230
|
+
(0, chai_1.expect)(tokenInfo).to.be.an('object');
|
|
231
|
+
(0, chai_1.expect)(tokenInfo).to.have.property('name');
|
|
232
|
+
(0, chai_1.expect)(tokenInfo).to.have.property('symbol');
|
|
233
|
+
(0, chai_1.expect)(tokenInfo).to.have.property('decimals');
|
|
234
|
+
(0, chai_1.expect)(tokenInfo).to.have.property('total_supply');
|
|
235
235
|
return [2 /*return*/];
|
|
236
236
|
}
|
|
237
237
|
});
|
|
@@ -243,8 +243,8 @@ describe('[31. cw20 query Test]', function () {
|
|
|
243
243
|
case 0: return [4 /*yield*/, firma.Cw20.getMinter(contractAddress)];
|
|
244
244
|
case 1:
|
|
245
245
|
minter = _a.sent();
|
|
246
|
-
chai_1.expect(minter).to.be.an('object');
|
|
247
|
-
chai_1.expect(minter).to.have.property('minter');
|
|
246
|
+
(0, chai_1.expect)(minter).to.be.an('object');
|
|
247
|
+
(0, chai_1.expect)(minter).to.have.property('minter');
|
|
248
248
|
return [2 /*return*/];
|
|
249
249
|
}
|
|
250
250
|
});
|
|
@@ -256,9 +256,9 @@ describe('[31. cw20 query Test]', function () {
|
|
|
256
256
|
case 0: return [4 /*yield*/, firma.Cw20.getAllowance(contractAddress, aliceAddress, bobAddress)];
|
|
257
257
|
case 1:
|
|
258
258
|
info = _a.sent();
|
|
259
|
-
chai_1.expect(info).to.be.an('object');
|
|
260
|
-
chai_1.expect(info).to.have.property('allowance');
|
|
261
|
-
chai_1.expect(info).to.have.property('expires');
|
|
259
|
+
(0, chai_1.expect)(info).to.be.an('object');
|
|
260
|
+
(0, chai_1.expect)(info).to.have.property('allowance');
|
|
261
|
+
(0, chai_1.expect)(info).to.have.property('expires');
|
|
262
262
|
return [2 /*return*/];
|
|
263
263
|
}
|
|
264
264
|
});
|
|
@@ -270,7 +270,7 @@ describe('[31. cw20 query Test]', function () {
|
|
|
270
270
|
case 0: return [4 /*yield*/, firma.Cw20.getAllAllowances(contractAddress, aliceAddress)];
|
|
271
271
|
case 1:
|
|
272
272
|
info = _a.sent();
|
|
273
|
-
chai_1.expect(info).to.be.an('array');
|
|
273
|
+
(0, chai_1.expect)(info).to.be.an('array');
|
|
274
274
|
return [2 /*return*/];
|
|
275
275
|
}
|
|
276
276
|
});
|
|
@@ -282,7 +282,7 @@ describe('[31. cw20 query Test]', function () {
|
|
|
282
282
|
case 0: return [4 /*yield*/, firma.Cw20.getAllSpenderAllowances(contractAddress, bobAddress)];
|
|
283
283
|
case 1:
|
|
284
284
|
info = _a.sent();
|
|
285
|
-
chai_1.expect(info).to.be.an('array');
|
|
285
|
+
(0, chai_1.expect)(info).to.be.an('array');
|
|
286
286
|
return [2 /*return*/];
|
|
287
287
|
}
|
|
288
288
|
});
|
|
@@ -294,7 +294,7 @@ describe('[31. cw20 query Test]', function () {
|
|
|
294
294
|
case 0: return [4 /*yield*/, firma.Cw20.getAllAccounts(contractAddress)];
|
|
295
295
|
case 1:
|
|
296
296
|
info = _a.sent();
|
|
297
|
-
chai_1.expect(info).to.be.an('array');
|
|
297
|
+
(0, chai_1.expect)(info).to.be.an('array');
|
|
298
298
|
return [2 /*return*/];
|
|
299
299
|
}
|
|
300
300
|
});
|
|
@@ -306,7 +306,7 @@ describe('[31. cw20 query Test]', function () {
|
|
|
306
306
|
case 0: return [4 /*yield*/, firma.Cw20.getMarketingInfo(contractAddress)];
|
|
307
307
|
case 1:
|
|
308
308
|
info = _a.sent();
|
|
309
|
-
chai_1.expect(info).to.be.an('object');
|
|
309
|
+
(0, chai_1.expect)(info).to.be.an('object');
|
|
310
310
|
return [2 /*return*/];
|
|
311
311
|
}
|
|
312
312
|
});
|
|
@@ -323,7 +323,7 @@ describe('[31. cw20 query Test]', function () {
|
|
|
323
323
|
return [3 /*break*/, 3];
|
|
324
324
|
case 2:
|
|
325
325
|
error_1 = _a.sent();
|
|
326
|
-
chai_1.expect(false).to.not.equal(true);
|
|
326
|
+
(0, chai_1.expect)(false).to.not.equal(true);
|
|
327
327
|
console.log(error_1);
|
|
328
328
|
return [3 /*break*/, 3];
|
|
329
329
|
case 3: return [2 /*return*/];
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -138,7 +138,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
138
138
|
case 1:
|
|
139
139
|
result = _a.sent();
|
|
140
140
|
codeId = extractValue(result.events, "store_code", "code_id");
|
|
141
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
141
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
142
142
|
return [2 /*return*/];
|
|
143
143
|
}
|
|
144
144
|
});
|
|
@@ -163,7 +163,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
163
163
|
case 2:
|
|
164
164
|
result = _a.sent();
|
|
165
165
|
contractAddress = extractValue(result.events, "instantiate", "_contract_address");
|
|
166
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
166
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
167
167
|
return [2 /*return*/];
|
|
168
168
|
}
|
|
169
169
|
});
|
|
@@ -186,7 +186,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
186
186
|
return [4 /*yield*/, firma.Cw721.getNftData(contractAddress, token_id)];
|
|
187
187
|
case 3:
|
|
188
188
|
nftData = _a.sent();
|
|
189
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
189
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
190
190
|
return [2 /*return*/];
|
|
191
191
|
}
|
|
192
192
|
});
|
|
@@ -206,7 +206,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
206
206
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, contractAddress, owner, token_id, token_uri, { gas: mintGas, fee: mintFee })];
|
|
207
207
|
case 2:
|
|
208
208
|
mintResult = _a.sent();
|
|
209
|
-
chai_1.expect(mintResult.code).to.be.equal(0);
|
|
209
|
+
(0, chai_1.expect)(mintResult.code).to.be.equal(0);
|
|
210
210
|
return [4 /*yield*/, firma.Cw721.getGasEstimationBurn(aliceWallet, contractAddress, token_id)];
|
|
211
211
|
case 3:
|
|
212
212
|
gas = _a.sent();
|
|
@@ -214,7 +214,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
214
214
|
return [4 /*yield*/, firma.Cw721.burn(aliceWallet, contractAddress, token_id, { gas: gas, fee: fee })];
|
|
215
215
|
case 4:
|
|
216
216
|
result = _a.sent();
|
|
217
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
217
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
218
218
|
return [2 /*return*/];
|
|
219
219
|
}
|
|
220
220
|
});
|
|
@@ -234,7 +234,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
234
234
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, contractAddress, owner, token_id, token_uri, { gas: mintGas, fee: mintFee })];
|
|
235
235
|
case 2:
|
|
236
236
|
mintResult = _a.sent();
|
|
237
|
-
chai_1.expect(mintResult.code).to.be.equal(0);
|
|
237
|
+
(0, chai_1.expect)(mintResult.code).to.be.equal(0);
|
|
238
238
|
return [4 /*yield*/, firma.Cw721.getGasEstimationTransfer(aliceWallet, contractAddress, bobAddress, token_id)];
|
|
239
239
|
case 3:
|
|
240
240
|
gas = _a.sent();
|
|
@@ -242,7 +242,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
242
242
|
return [4 /*yield*/, firma.Cw721.transfer(aliceWallet, contractAddress, bobAddress, token_id, { gas: gas, fee: fee })];
|
|
243
243
|
case 4:
|
|
244
244
|
result = _a.sent();
|
|
245
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
245
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
246
246
|
return [2 /*return*/];
|
|
247
247
|
}
|
|
248
248
|
});
|
|
@@ -261,7 +261,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
261
261
|
return [4 /*yield*/, firma.Cw721.approve(aliceWallet, contractAddress, bobAddress, token_id, expires, { gas: gas, fee: fee })];
|
|
262
262
|
case 2:
|
|
263
263
|
result = _a.sent();
|
|
264
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
264
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
265
265
|
return [2 /*return*/];
|
|
266
266
|
}
|
|
267
267
|
});
|
|
@@ -279,7 +279,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
279
279
|
return [4 /*yield*/, firma.Cw721.revoke(aliceWallet, contractAddress, bobAddress, token_id, { gas: gas, fee: fee })];
|
|
280
280
|
case 2:
|
|
281
281
|
result = _a.sent();
|
|
282
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
282
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
283
283
|
return [2 /*return*/];
|
|
284
284
|
}
|
|
285
285
|
});
|
|
@@ -297,7 +297,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
297
297
|
return [4 /*yield*/, firma.Cw721.approveAll(aliceWallet, contractAddress, bobAddress, expires, { gas: gas, fee: fee })];
|
|
298
298
|
case 2:
|
|
299
299
|
result = _a.sent();
|
|
300
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
300
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
301
301
|
return [2 /*return*/];
|
|
302
302
|
}
|
|
303
303
|
});
|
|
@@ -313,7 +313,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
313
313
|
return [4 /*yield*/, firma.Cw721.revokeAll(aliceWallet, contractAddress, bobAddress, { gas: gas, fee: fee })];
|
|
314
314
|
case 2:
|
|
315
315
|
result = _a.sent();
|
|
316
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
316
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
317
317
|
return [2 /*return*/];
|
|
318
318
|
}
|
|
319
319
|
});
|
|
@@ -333,7 +333,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
333
333
|
return [4 /*yield*/, firma.Cw721.sendNft(aliceWallet, contractAddress, targetContractAddress, bobAddress, token_id, { gas: gas, fee: fee })];
|
|
334
334
|
case 2:
|
|
335
335
|
result = _a.sent();
|
|
336
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
336
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
337
337
|
return [2 /*return*/];
|
|
338
338
|
}
|
|
339
339
|
});
|
|
@@ -354,7 +354,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
354
354
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, contractAddress, owner, token_id, token_uri, { gas: gas, fee: fee })];
|
|
355
355
|
case 2:
|
|
356
356
|
result = _a.sent();
|
|
357
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
357
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
358
358
|
return [4 /*yield*/, firma.Cw721.getGasEstimationApproveAll(aliceWallet, contractAddress, bobAddress, expires)];
|
|
359
359
|
case 3:
|
|
360
360
|
gas = _a.sent();
|
|
@@ -362,7 +362,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
362
362
|
return [4 /*yield*/, firma.Cw721.approveAll(aliceWallet, contractAddress, bobAddress, expires, { gas: gas, fee: fee })];
|
|
363
363
|
case 4:
|
|
364
364
|
result = _a.sent();
|
|
365
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
365
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
366
366
|
return [4 /*yield*/, firma.Cw721.getGasEstimationTransfer(bobWallet, contractAddress, bobAddress, token_id)];
|
|
367
367
|
case 5:
|
|
368
368
|
gas = _a.sent();
|
|
@@ -370,7 +370,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
370
370
|
return [4 /*yield*/, firma.Cw721.transfer(bobWallet, contractAddress, bobAddress, token_id, { gas: gas, fee: fee })];
|
|
371
371
|
case 6:
|
|
372
372
|
result = _a.sent();
|
|
373
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
373
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
374
374
|
return [2 /*return*/];
|
|
375
375
|
}
|
|
376
376
|
});
|
|
@@ -389,7 +389,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
389
389
|
return [4 /*yield*/, firma.Cw721.updateOwnerShipTransfer(aliceWallet, contractAddress, new_owner, expires, { gas: gas, fee: fee })];
|
|
390
390
|
case 2:
|
|
391
391
|
result = _a.sent();
|
|
392
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
392
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
393
393
|
return [2 /*return*/];
|
|
394
394
|
}
|
|
395
395
|
});
|
|
@@ -405,7 +405,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
405
405
|
return [4 /*yield*/, firma.Cw721.updateOwnerShipAccept(bobWallet, contractAddress, { gas: gas, fee: fee })];
|
|
406
406
|
case 2:
|
|
407
407
|
result = _a.sent();
|
|
408
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
408
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
409
409
|
return [2 /*return*/];
|
|
410
410
|
}
|
|
411
411
|
});
|
|
@@ -423,7 +423,7 @@ describe('[32. cw721 tx Test]', function () {
|
|
|
423
423
|
return [4 /*yield*/, firma.Cw721.updateOwnerShipRenounce(bobWallet, contractAddress, { gas: gas, fee: fee })];
|
|
424
424
|
case 2:
|
|
425
425
|
result = _a.sent();
|
|
426
|
-
chai_1.expect(result.code).to.be.equal(0);
|
|
426
|
+
(0, chai_1.expect)(result.code).to.be.equal(0);
|
|
427
427
|
return [2 /*return*/];
|
|
428
428
|
}
|
|
429
429
|
});
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -138,7 +138,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
138
138
|
case 1:
|
|
139
139
|
storeCodeResult = _a.sent();
|
|
140
140
|
codeId = extractValue(storeCodeResult.events, "store_code", "code_id");
|
|
141
|
-
chai_1.expect(storeCodeResult.code).to.be.equal(0);
|
|
141
|
+
(0, chai_1.expect)(storeCodeResult.code).to.be.equal(0);
|
|
142
142
|
return [4 /*yield*/, aliceWallet.getAddress()];
|
|
143
143
|
case 2:
|
|
144
144
|
admin = _a.sent();
|
|
@@ -155,7 +155,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
155
155
|
case 3:
|
|
156
156
|
instantiateResult = _a.sent();
|
|
157
157
|
contractAddress = extractValue(instantiateResult.events, "instantiate", "_contract_address");
|
|
158
|
-
chai_1.expect(instantiateResult.code).to.be.equal(0);
|
|
158
|
+
(0, chai_1.expect)(instantiateResult.code).to.be.equal(0);
|
|
159
159
|
owner = aliceAddress;
|
|
160
160
|
new_token_id = "1";
|
|
161
161
|
new_token_uri = "https://meta.nft.io/uri/" + new_token_id;
|
|
@@ -166,7 +166,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
166
166
|
return [4 /*yield*/, firma.Cw721.mint(aliceWallet, contractAddress, owner, new_token_id, new_token_uri, { gas: mintGas, fee: mintFee })];
|
|
167
167
|
case 5:
|
|
168
168
|
mintResult = _a.sent();
|
|
169
|
-
chai_1.expect(mintResult.code).to.be.equal(0);
|
|
169
|
+
(0, chai_1.expect)(mintResult.code).to.be.equal(0);
|
|
170
170
|
expires = { never: {} };
|
|
171
171
|
token_id = "1";
|
|
172
172
|
return [4 /*yield*/, firma.Cw721.getGasEstimationApprove(aliceWallet, contractAddress, bobAddress, token_id, expires)];
|
|
@@ -176,7 +176,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
176
176
|
return [4 /*yield*/, firma.Cw721.approve(aliceWallet, contractAddress, bobAddress, token_id, expires, { gas: approveGas, fee: approveFee })];
|
|
177
177
|
case 7:
|
|
178
178
|
approveResult = _a.sent();
|
|
179
|
-
chai_1.expect(approveResult.code).to.be.equal(0);
|
|
179
|
+
(0, chai_1.expect)(approveResult.code).to.be.equal(0);
|
|
180
180
|
return [2 /*return*/];
|
|
181
181
|
}
|
|
182
182
|
});
|
|
@@ -190,8 +190,8 @@ describe('[33. cw721 query Test]', function () {
|
|
|
190
190
|
return [4 /*yield*/, firma.Cw721.getOwnerFromNftID(contractAddress, tokenId)];
|
|
191
191
|
case 1:
|
|
192
192
|
owner = _a.sent();
|
|
193
|
-
chai_1.expect(owner).to.be.a('string');
|
|
194
|
-
chai_1.expect(owner.length).to.be.greaterThan(0);
|
|
193
|
+
(0, chai_1.expect)(owner).to.be.a('string');
|
|
194
|
+
(0, chai_1.expect)(owner.length).to.be.greaterThan(0);
|
|
195
195
|
return [2 /*return*/];
|
|
196
196
|
}
|
|
197
197
|
});
|
|
@@ -209,13 +209,13 @@ describe('[33. cw721 query Test]', function () {
|
|
|
209
209
|
return [4 /*yield*/, firma.Cw721.getApproval(contractAddress, tokenId, bobAddress, isIncludeExpired)];
|
|
210
210
|
case 2:
|
|
211
211
|
approval = _a.sent();
|
|
212
|
-
chai_1.expect(approval).to.be.an('object');
|
|
213
|
-
chai_1.expect(approval).to.have.property('spender');
|
|
214
|
-
chai_1.expect(approval).to.have.property('expires');
|
|
212
|
+
(0, chai_1.expect)(approval).to.be.an('object');
|
|
213
|
+
(0, chai_1.expect)(approval).to.have.property('spender');
|
|
214
|
+
(0, chai_1.expect)(approval).to.have.property('expires');
|
|
215
215
|
return [3 /*break*/, 4];
|
|
216
216
|
case 3:
|
|
217
217
|
error_1 = _a.sent();
|
|
218
|
-
chai_1.expect(error_1).to.exist;
|
|
218
|
+
(0, chai_1.expect)(error_1).to.exist;
|
|
219
219
|
return [3 /*break*/, 4];
|
|
220
220
|
case 4: return [2 /*return*/];
|
|
221
221
|
}
|
|
@@ -231,10 +231,10 @@ describe('[33. cw721 query Test]', function () {
|
|
|
231
231
|
return [4 /*yield*/, firma.Cw721.getApprovals(contractAddress, tokenId, isIncludeExpired)];
|
|
232
232
|
case 1:
|
|
233
233
|
approvals = _a.sent();
|
|
234
|
-
chai_1.expect(approvals).to.be.an('array');
|
|
234
|
+
(0, chai_1.expect)(approvals).to.be.an('array');
|
|
235
235
|
if (approvals.length > 0) {
|
|
236
|
-
chai_1.expect(approvals[0]).to.have.property('spender');
|
|
237
|
-
chai_1.expect(approvals[0]).to.have.property('expires');
|
|
236
|
+
(0, chai_1.expect)(approvals[0]).to.have.property('spender');
|
|
237
|
+
(0, chai_1.expect)(approvals[0]).to.have.property('expires');
|
|
238
238
|
}
|
|
239
239
|
return [2 /*return*/];
|
|
240
240
|
}
|
|
@@ -249,7 +249,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
249
249
|
return [4 /*yield*/, firma.Cw721.getAllOperators(contractAddress, aliceAddress, isIncludeExpired)];
|
|
250
250
|
case 1:
|
|
251
251
|
operators = _a.sent();
|
|
252
|
-
chai_1.expect(operators).to.be.an('array');
|
|
252
|
+
(0, chai_1.expect)(operators).to.be.an('array');
|
|
253
253
|
return [2 /*return*/];
|
|
254
254
|
}
|
|
255
255
|
});
|
|
@@ -261,7 +261,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
261
261
|
case 0: return [4 /*yield*/, firma.Cw721.getTotalNfts(contractAddress)];
|
|
262
262
|
case 1:
|
|
263
263
|
total = _a.sent();
|
|
264
|
-
chai_1.expect(total).to.be.at.least(0);
|
|
264
|
+
(0, chai_1.expect)(total).to.be.at.least(0);
|
|
265
265
|
return [2 /*return*/];
|
|
266
266
|
}
|
|
267
267
|
});
|
|
@@ -273,9 +273,9 @@ describe('[33. cw721 query Test]', function () {
|
|
|
273
273
|
case 0: return [4 /*yield*/, firma.Cw721.getContractInfo(contractAddress)];
|
|
274
274
|
case 1:
|
|
275
275
|
contractInfo = _a.sent();
|
|
276
|
-
chai_1.expect(contractInfo).to.be.an('object');
|
|
277
|
-
chai_1.expect(contractInfo).to.have.property('name');
|
|
278
|
-
chai_1.expect(contractInfo).to.have.property('symbol');
|
|
276
|
+
(0, chai_1.expect)(contractInfo).to.be.an('object');
|
|
277
|
+
(0, chai_1.expect)(contractInfo).to.have.property('name');
|
|
278
|
+
(0, chai_1.expect)(contractInfo).to.have.property('symbol');
|
|
279
279
|
return [2 /*return*/];
|
|
280
280
|
}
|
|
281
281
|
});
|
|
@@ -289,7 +289,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
289
289
|
return [4 /*yield*/, firma.Cw721.getNftTokenUri(contractAddress, tokenId)];
|
|
290
290
|
case 1:
|
|
291
291
|
nftInfo = _a.sent();
|
|
292
|
-
chai_1.expect(nftInfo).to.be.a('string');
|
|
292
|
+
(0, chai_1.expect)(nftInfo).to.be.a('string');
|
|
293
293
|
return [2 /*return*/];
|
|
294
294
|
}
|
|
295
295
|
});
|
|
@@ -303,13 +303,13 @@ describe('[33. cw721 query Test]', function () {
|
|
|
303
303
|
return [4 /*yield*/, firma.Cw721.getNftData(contractAddress, tokenId)];
|
|
304
304
|
case 1:
|
|
305
305
|
nftInfo = _a.sent();
|
|
306
|
-
chai_1.expect(nftInfo).to.have.property('access');
|
|
307
|
-
chai_1.expect(nftInfo.access).to.have.property('owner');
|
|
308
|
-
chai_1.expect(nftInfo.access).to.have.property('approvals');
|
|
309
|
-
chai_1.expect(nftInfo.access.approvals).to.be.an('array');
|
|
310
|
-
chai_1.expect(nftInfo).to.have.property('info');
|
|
311
|
-
chai_1.expect(nftInfo.info).to.have.property('token_uri');
|
|
312
|
-
chai_1.expect(nftInfo.info).to.have.property('extension');
|
|
306
|
+
(0, chai_1.expect)(nftInfo).to.have.property('access');
|
|
307
|
+
(0, chai_1.expect)(nftInfo.access).to.have.property('owner');
|
|
308
|
+
(0, chai_1.expect)(nftInfo.access).to.have.property('approvals');
|
|
309
|
+
(0, chai_1.expect)(nftInfo.access.approvals).to.be.an('array');
|
|
310
|
+
(0, chai_1.expect)(nftInfo).to.have.property('info');
|
|
311
|
+
(0, chai_1.expect)(nftInfo.info).to.have.property('token_uri');
|
|
312
|
+
(0, chai_1.expect)(nftInfo.info).to.have.property('extension');
|
|
313
313
|
return [2 /*return*/];
|
|
314
314
|
}
|
|
315
315
|
});
|
|
@@ -321,7 +321,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
321
321
|
case 0: return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(contractAddress, aliceAddress)];
|
|
322
322
|
case 1:
|
|
323
323
|
nftIdList = _a.sent();
|
|
324
|
-
chai_1.expect(nftIdList).to.be.an('array');
|
|
324
|
+
(0, chai_1.expect)(nftIdList).to.be.an('array');
|
|
325
325
|
return [2 /*return*/];
|
|
326
326
|
}
|
|
327
327
|
});
|
|
@@ -333,7 +333,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
333
333
|
case 0: return [4 /*yield*/, firma.Cw721.getAllNftIdList(contractAddress)];
|
|
334
334
|
case 1:
|
|
335
335
|
nftIdList = _a.sent();
|
|
336
|
-
chai_1.expect(nftIdList).to.be.an('array');
|
|
336
|
+
(0, chai_1.expect)(nftIdList).to.be.an('array');
|
|
337
337
|
return [2 /*return*/];
|
|
338
338
|
}
|
|
339
339
|
});
|
|
@@ -345,7 +345,7 @@ describe('[33. cw721 query Test]', function () {
|
|
|
345
345
|
case 0: return [4 /*yield*/, firma.Cw721.getMinter(contractAddress)];
|
|
346
346
|
case 1:
|
|
347
347
|
minter = _a.sent();
|
|
348
|
-
chai_1.expect(minter).to.be.a('string');
|
|
348
|
+
(0, chai_1.expect)(minter).to.be.a('string');
|
|
349
349
|
return [2 /*return*/];
|
|
350
350
|
}
|
|
351
351
|
});
|
|
@@ -357,8 +357,8 @@ describe('[33. cw721 query Test]', function () {
|
|
|
357
357
|
case 0: return [4 /*yield*/, firma.Cw721.getOwnerShip(contractAddress)];
|
|
358
358
|
case 1:
|
|
359
359
|
data = _a.sent();
|
|
360
|
-
chai_1.expect(data).to.be.an('object');
|
|
361
|
-
chai_1.expect(data).to.have.property('owner');
|
|
360
|
+
(0, chai_1.expect)(data).to.be.an('object');
|
|
361
|
+
(0, chai_1.expect)(data).to.have.property('owner');
|
|
362
362
|
return [2 /*return*/];
|
|
363
363
|
}
|
|
364
364
|
});
|