difftreelog
Chain extensions in progress
in: master
6 files changed
tests/package-lock.jsondiffbeforeafterbothno changes
tests/package.jsondiffbeforeafterboth4 "description": "Substrate Nft tests",4 "description": "Substrate Nft tests",5 "main": "",5 "main": "",6 "devDependencies": {6 "devDependencies": {7 "@polkadot/dev": "^0.52.11",7 "@polkadot/dev": "^0.61.24",8 "@polkadot/ts": "^0.3.41",8 "@polkadot/ts": "^0.3.59",9 "@polkadot/typegen": "^3.6.3",10 "@polkadot/util-crypto": "^5.4.4",9 "@types/chai": "^4.2.12",11 "@types/chai": "^4.2.12",10 "@types/chai-as-promised": "^7.1.3",12 "@types/chai-as-promised": "^7.1.3",11 "@types/mocha": "^8.0.3",13 "@types/mocha": "^8.0.3",36 "license": "Apache 2.0",38 "license": "Apache 2.0",37 "homepage": "",39 "homepage": "",38 "dependencies": {40 "dependencies": {39 "@polkadot/api": "^2.3.1",41 "@polkadot/api": "^3.6.3",40 "@polkadot/api-contract": "^2.3.1",42 "@polkadot/api-contract": "^3.6.3",41 "@polkadot/types": "^2.3.1",42 "@polkadot/util": "^3.4.1",43 "@polkadot/util": "^3.6.3",43 "bignumber.js": "^9.0.0",44 "bignumber.js": "^9.0.0",44 "chai-as-promised": "^7.1.1"45 "chai-as-promised": "^7.1.1"45 },46 },tests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth102 const fee = aliceBalanceBefore.minus(aliceBalanceAfter);102 const fee = aliceBalanceBefore.minus(aliceBalanceAfter);103 const treasuryIncrease = treasuryBalanceAfter.minus(treasuryBalanceBefore);103 const treasuryIncrease = treasuryBalanceAfter.minus(treasuryBalanceBefore);104104105 expect(fee.dividedBy(1e15).toNumber()).to.be.lessThan(0.01);105 expect(fee.dividedBy(1e15).toNumber()).to.be.lessThan(saneMaximumFee);106 expect(fee.dividedBy(1e15).toNumber()).to.be.greaterThan(0.0001);106 expect(fee.dividedBy(1e15).toNumber()).to.be.greaterThan(saneMinimumFee);107 });107 });108 });108 });109109tests/src/substrate/promisify-substrate.tsdiffbeforeafterboth3// file 'LICENSE', which is part of this source code package.3// file 'LICENSE', which is part of this source code package.4//4//556import ApiPromise from "@polkadot/api/promise/Api";6import { ApiPromise } from "@polkadot/api";778type PromiseType<T> = T extends PromiseLike<infer TInner> ? TInner : T;8type PromiseType<T> = T extends PromiseLike<infer TInner> ? TInner : T;99tests/src/util/contracthelpers.tsdiffbeforeafterboth87export async function getFlipValue(contract: Contract, deployer: IKeyringPair) {87export async function getFlipValue(contract: Contract, deployer: IKeyringPair) {88 const result = await contract.query.get(deployer.address, value, gasLimit);88 const result = await contract.query.get(deployer.address, value, gasLimit);8990 if(!result.result.isSuccess) {89 console.log(result);91 throw `Failed to get flipper value`;9092 }91// if(!result.result.isSuccess) {92// throw `Failed to get flipper value`;93// }94// return (result.result.asSuccess.data[0] == 0x00) ? false : true;93 return (result.result.asSuccess.data[0] == 0x00) ? false : true;95 return false;94}96}9597tests/yarn.lockdiffbeforeafterbothno changes