Skip to content

Commit

Permalink
Use test node hardhat plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonD3 committed Mar 1, 2024
1 parent 2b7e286 commit c7a296b
Show file tree
Hide file tree
Showing 4 changed files with 296 additions and 30 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -23,15 +20,6 @@ jobs:
- name: Install foundry dependencies
run: forge install

- name: Install test node dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
cmake pkg-config libssl-dev clang
- name: Install test node
run: |
cargo install --git https://github.com/matter-labs/era-test-node.git --locked
- uses: actions/setup-node@v1
with:
node-version: 16.x
Expand All @@ -53,9 +41,5 @@ jobs:
- name: Compile
run: yarn compile

- name: Run test node
run: |
era_test_node run &
- name: Run tests
run: yarn test
6 changes: 2 additions & 4 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import '@matterlabs/hardhat-zksync-solc'
import '@matterlabs/hardhat-zksync-verify'
import '@nomicfoundation/hardhat-toolbox'
import '@matterlabs/hardhat-zksync-chai-matchers'
import '@matterlabs/hardhat-zksync-node'
import { task } from 'hardhat/config'
import deploy from './script/deploy'

Expand All @@ -14,9 +15,7 @@ task('deploy')

export default {
networks: {
zkSyncTestNode: {
url: 'http://localhost:8011',
ethNetwork: '',
hardhat: {
zksync: true,
},
zkSyncTestnet: {
Expand All @@ -38,7 +37,6 @@ export default {
verifyURL: 'https://zksync2-mainnet-explorer.zksync.io/contract_verification',
},
},
defaultNetwork: 'zkSyncTestNode',
solidity: {
version: '0.8.17',
},
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"devDependencies": {
"@matterlabs/hardhat-zksync-chai-matchers": "^0.1.3",
"@matterlabs/hardhat-zksync-deploy": "^0.6.3",
"@matterlabs/hardhat-zksync-node": "^1.0.2",
"@matterlabs/hardhat-zksync-solc": "^0.3.17",
"@matterlabs/hardhat-zksync-verify": "^0.1.5",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
Expand All @@ -26,12 +27,13 @@
"hardhat": "^2.14.0",
"hardhat-gas-reporter": "^1.0.8",
"mocha-chai-jest-snapshot": "^1.1.4",
"prettier": "^2.0.5",
"solidity-coverage": "^0.8.1",
"ts-node": "^10.9.1",
"typechain": "^8.1.0",
"typescript": "^5.0.4",
"zksync-web3": "^0.14.3",
"prettier": "^2.0.5"
"zksync-ethers": "^5.0.0",
"zksync-web3": "^0.14.3"
},
"scripts": {
"compile": "hardhat compile",
Expand Down
Loading

0 comments on commit c7a296b

Please sign in to comment.