Skip to content

Commit

Permalink
Bring over hardhat and github actions configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Dec 23, 2024
1 parent ad7e8d1 commit 5367da1
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 31 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build
on:
push:
branches:
- '*'
pull_request:
types: [opened, reopened, synchronize]

env:
TS_NODE_TRANSPILE_ONLY: 1
FORCE_COLORS: 1

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-node@v1
with:
node-version: '22'
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn install
- run: yarn compile
- run: yarn test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: '22'
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn install
- run: yarn lint
24 changes: 19 additions & 5 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import '@nomiclabs/hardhat-waffle'
import '@typechain/hardhat'
import { HardhatUserConfig } from 'hardhat/config'

const config: HardhatUserConfig = {
solidity: "0.8.28",
};
solidity: {
compilers: [
{
version: '0.8.24',
settings: {
evmVersion: 'cancun',
viaIR: true,
optimizer: {
enabled: true,
runs: 1000000
}
}
}
]
}
}

export default config;
export default config
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,31 @@
"license": "MIT",
"scripts": {
"compile": "hardhat compile",
"test": "hardhat test"
"test": "hardhat test",
"lint": "yarn run lint:sol && yarn run lint:js",
"lint:js": "eslint -f unix .",
"lint:sol": "solhint -f unix \"contracts/**/*.sol\" --max-warnings 0"
},
"dependencies": {
"@account-abstraction/contracts": "^0.7.0",
"@openzeppelin/contracts": "^5.1.0"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.0",
"@nomicfoundation/hardhat-ignition": "^0.15.0",
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.0",
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/ethers-v6": "^0.5.0",
"@typechain/hardhat": "^2.3.0",
"@types/chai": "^4.2.0",
"@types/mocha": ">=9.1.0",
"@types/node": ">=18.0.0",
"chai": "^4.2.0",
"ethers": "^5.4.2",
"ethers": "^5.7.2",
"hardhat": "^2.22.17",
"hardhat-gas-reporter": "^1.0.8",
"solidity-coverage": "^0.8.0",
Expand Down
33 changes: 11 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,6 @@
deep-eql "^4.0.1"
ordinal "^1.0.3"

"@nomicfoundation/hardhat-ethers@^3.0.0":
version "3.0.8"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.8.tgz#af078f566373abeb77e11cbe69fe3dd47f8bfc27"
integrity sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA==
dependencies:
debug "^4.1.1"
lodash.isequal "^4.5.0"

"@nomicfoundation/hardhat-ignition-ethers@^0.15.0":
version "0.15.9"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.9.tgz#706801c2e8c70b39c77377439bdb240c20eee76c"
Expand Down Expand Up @@ -692,6 +684,16 @@
"@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.2"
"@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.2"

"@nomiclabs/hardhat-ethers@^2.2.3":
version "2.2.3"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0"
integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==

"@nomiclabs/hardhat-waffle@^2.0.6":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.6.tgz#d11cb063a5f61a77806053e54009c40ddee49a54"
integrity sha512-+Wz0hwmJGSI17B+BhU/qFRZ1l6/xMW82QGXE/Gi+WTmwgJrQefuBs1lIf7hzQ1hLk6hpkvb/zwcNkpVKRYTQYg==

"@openzeppelin/[email protected]":
version "3.4.2-solc-0.7"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz#38f4dbab672631034076ccdf2f3201fab1726635"
Expand Down Expand Up @@ -849,14 +851,6 @@
lodash "^4.17.15"
ts-essentials "^7.0.1"

"@typechain/ethers-v6@^0.5.0":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz#42fe214a19a8b687086c93189b301e2b878797ea"
integrity sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==
dependencies:
lodash "^4.17.15"
ts-essentials "^7.0.1"

"@typechain/hardhat@^2.3.0":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-2.3.1.tgz#1e8a6e3795e115a5d5348526282b5c597fab0b78"
Expand Down Expand Up @@ -1909,7 +1903,7 @@ ethereumjs-util@^7.1.4:
ethereum-cryptography "^0.1.3"
rlp "^2.2.4"

ethers@^5.4.2, ethers@^5.7.2:
ethers@^5.7.2:
version "5.7.2"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e"
integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==
Expand Down Expand Up @@ -2668,11 +2662,6 @@ lodash.clonedeep@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==

lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==

lodash.truncate@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
Expand Down

0 comments on commit 5367da1

Please sign in to comment.