Skip to content

Commit 56312ad

Browse files
KyrylRArvolear
andauthored
Migrate to HH-3 (#160)
* Draft * Added @solarity/hardhat-markup * Added @solidstate/hardhat-contract-sizer * Fixed tests. * Updated node-version * Added --stack_size * Added codecov.yml * Updated devDependencies * Fixed typo * Updated @noble/curves * Updated CHANGELOG.md * Deleted .skip * Deleted redundant cmpMock function * Added gasLimit for verifyBrainpoolP512r1WithoutHashing --------- Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>
1 parent 5575f31 commit 56312ad

File tree

82 files changed

+2893
-5105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2893
-5105
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
- name: Setup node
77
uses: actions/setup-node@v4
88
with:
9-
node-version: "20.x"
9+
node-version: "22.10.x"
1010
cache: npm
1111
registry-url: 'https://registry.npmjs.org/'
1212

.github/codecov.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
codecov:
2+
require_ci_to_pass: true
3+
4+
ignore:
5+
- "contracts/interfaces/**"
6+
- "contracts/mock/**"
7+
- "contracts/libs/crypto/ECDSA512.sol"
8+
- "contracts/libs/crypto/ECDSA384.sol"
9+
10+
coverage:
11+
status:
12+
project:
13+
default:
14+
target: 99%
15+
threshold: 1%
16+
patch:
17+
default:
18+
target: 99%
19+
threshold: 1%

.github/workflows/changelog-validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
uses: ./.github/actions/setup
1818

1919
- name: Validate structure
20-
run: npx tsx scripts/release/validate-changelog.ts
20+
run: npx tsx scripts/release/validate-changelog.cts

.github/workflows/coverage.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ jobs:
1515
steps:
1616
- name: Checkout the repository
1717
uses: actions/checkout@v5
18+
1819
- name: Setup
1920
uses: ./.github/actions/setup
21+
2022
- name: Run coverage
2123
env:
22-
NODE_OPTIONS: "--max_old_space_size=8192"
23-
run: npm run coverage
24+
NODE_OPTIONS: "--max_old_space_size=16384"
25+
run: node --stack_size=8192 ./node_modules/.bin/hardhat test --coverage
26+
2427
- name: Upload coverage to Codecov
2528
uses: codecov/codecov-action@v4
2629
with:

.github/workflows/pre-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: ./.github/actions/setup
2020

2121
- name: Validate structure
22-
run: npx tsx scripts/release/validate-changelog.ts
22+
run: npx tsx scripts/release/validate-changelog.cts
2323

2424
pre-release:
2525
name: Apply version and tag
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
script: |
4545
require('ts-node/register/transpile-only');
46-
await require('./scripts/release/apply-release.ts').default(core);
46+
await require('./scripts/release/apply-release.cts').default(core);
4747
4848
- name: Update package-lock
4949
run: npm install --package-lock-only

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
result-encoding: string
3030
script: |
3131
require('ts-node/register/transpile-only');
32-
await require('./scripts/release/get-release-state.ts').default(core);
32+
await require('./scripts/release/get-release-state.cts').default(core);
3333
outputs:
3434
local_version: ${{ steps.state.outputs.local_version }}
3535
notes: ${{ steps.state.outputs.notes }}

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ jobs:
1515
steps:
1616
- name: Checkout the repository
1717
uses: actions/checkout@v5
18+
1819
- name: Setup
1920
uses: ./.github/actions/setup
21+
2022
- name: Run tests
2123
env:
22-
NODE_OPTIONS: "--max_old_space_size=8192"
24+
NODE_OPTIONS: "--max_old_space_size=16384"
2325
run: npm run test

.prettierrc.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,32 @@
1414
{
1515
"files": "*.ts",
1616
"options": {
17+
"plugins": ["@trivago/prettier-plugin-sort-imports"],
1718
"printWidth": 120,
18-
"tabWidth": 2
19+
"tabWidth": 2,
20+
"singleQuote": false,
21+
"importOrder": [
22+
"(^chai$)|(hardhat$)",
23+
"ethers$",
24+
"^@nomicfoundation/(.*)$",
25+
"^@solarity/(.*)$",
26+
"^@typechain/hardhat$",
27+
"^hardhat-[a-zA-Z0-9_\\-]+$",
28+
"^tsconfig-paths/register$",
29+
"^solidity-[a-zA-Z0-9_\\-]+$",
30+
"^hardhat/config$",
31+
"^dotenv$",
32+
"@scripts",
33+
"@test-helpers",
34+
"@(?:/generated-types|ethers-v6)",
35+
"",
36+
"^[a-zA-Z0-9_\\-]+$",
37+
"^\\u0000",
38+
"^\\.\\./",
39+
"^\\./"
40+
],
41+
"importOrderSeparation": true,
42+
"importOrderSortSpecifiers": true
1943
}
2044
}
2145
]

.solcover.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Changelog
22

3-
## [none]
3+
## [patch]
44

5-
- Fixed typo in readme.
5+
- Migrated to Hardhat 3.
66

77
## [3.2.1]
88

0 commit comments

Comments
 (0)