Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit 034a2a3

Browse files
committed
fix: coverage, lint, fix, size
1 parent 1de6736 commit 034a2a3

4 files changed

Lines changed: 30 additions & 5 deletions

File tree

hardhat.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ dotenv.config({ path: './.env.local' });
33
import '@nomiclabs/hardhat-etherscan';
44
import '@nomiclabs/hardhat-waffle';
55
import 'hardhat-gas-reporter';
6+
import 'hardhat-contract-sizer';
7+
import 'solidity-coverage';
68

79
module.exports = {
810
defaultNetwork: 'hardhat',

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"scripts": {
99
"test": "npx hardhat test test-ts/*.ts",
1010
"coverage": "npx hardhat coverage",
11-
"lint": "yarn run lint:sol && yarn run lint:js",
11+
"lint": "yarn run lint:sol && yarn run lint:ts",
1212
"lint:ts": "eslint . --ext .ts",
1313
"lint:sol": "solhint 'contracts/**/*.sol'",
14-
"fix": "yarn fix:sol && yarn fix:js",
14+
"fix": "yarn fix:sol && yarn fix:ts",
1515
"fix:ts": "prettier --config .prettierrc.json './**/*.ts' --write",
16-
"fix:sol": "prettier --write 'contracts/**/*.sol'",
16+
"fix:sol": "prettier --write 'src/**/*.sol'",
1717
"size": "npx hardhat size-contracts",
1818
"postinstall": "husky install"
1919
},
@@ -32,6 +32,7 @@
3232
"ethereum-waffle": "^3.4.0",
3333
"ethers": "^5.4.1",
3434
"hardhat": "^2.5.0",
35+
"hardhat-contract-sizer": "^2.6.1",
3536
"hardhat-gas-reporter": "^1.0.4",
3637
"husky": "^7.0.1",
3738
"prettier": "^2.3.2",

test-ts/test-print-tree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('Test RedBlackBinaryTree Library', () => {
2222

2323
describe('Print tree', () => {
2424
it('Apply instructions', async () => {
25-
await testScenario('./test/instruction.json', testRedBlackBinaryTree);
25+
await testScenario('./test-ts/instruction.json', testRedBlackBinaryTree);
2626
await printTreeStucture(testRedBlackBinaryTree);
2727
});
2828
});

yarn.lock

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
chalk "^2.0.0"
2424
js-tokens "^4.0.0"
2525

26+
"@colors/colors@1.5.0":
27+
version "1.5.0"
28+
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
29+
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
30+
2631
"@cspotcode/source-map-consumer@0.8.0":
2732
version "0.8.0"
2833
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b"
@@ -2633,7 +2638,7 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2:
26332638
escape-string-regexp "^1.0.5"
26342639
supports-color "^5.3.0"
26352640

2636-
chalk@^4.1.0:
2641+
chalk@^4.0.0, chalk@^4.1.0:
26372642
version "4.1.2"
26382643
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
26392644
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -2770,6 +2775,15 @@ cli-table3@^0.5.0:
27702775
optionalDependencies:
27712776
colors "^1.1.2"
27722777

2778+
cli-table3@^0.6.0:
2779+
version "0.6.3"
2780+
resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2"
2781+
integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==
2782+
dependencies:
2783+
string-width "^4.2.0"
2784+
optionalDependencies:
2785+
"@colors/colors" "1.5.0"
2786+
27732787
cli-width@^2.0.0:
27742788
version "2.2.1"
27752789
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
@@ -4948,6 +4962,14 @@ har-validator@~5.1.3:
49484962
ajv "^6.12.3"
49494963
har-schema "^2.0.0"
49504964

4965+
hardhat-contract-sizer@^2.6.1:
4966+
version "2.6.1"
4967+
resolved "https://registry.yarnpkg.com/hardhat-contract-sizer/-/hardhat-contract-sizer-2.6.1.tgz#2b0046a55fa1ec96f19fdab7fde372377401c874"
4968+
integrity sha512-b8wS7DBvyo22kmVwpzstAQTdDCThpl/ySBqZh5ga9Yxjf61/uTL12TEg5nl7lDeWy73ntEUzxMwY6XxbQEc2wA==
4969+
dependencies:
4970+
chalk "^4.0.0"
4971+
cli-table3 "^0.6.0"
4972+
49514973
hardhat-gas-reporter@^1.0.4:
49524974
version "1.0.9"
49534975
resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz#9a2afb354bc3b6346aab55b1c02ca556d0e16450"

0 commit comments

Comments
 (0)