Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the autoInstallPeers error #30

Merged
merged 5 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 33 additions & 38 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,48 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies and run tests
run: |
pnpm install
pnpm test
- name: Checkout source code
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
run_install: false

- name: Get pnpm store directory
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: Linux-pnpm-store-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
Linux-pnpm-store-

- name: Update pnpm lockfile
run: pnpm install --no-frozen-lockfile

- name: Install dependencies and run tests
run: |
pnpm install
pnpm test
5 changes: 1 addition & 4 deletions deploy/deploy-basic.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "@nomiclabs/hardhat-ethers"
const color = require("cli-color")
import color from "cli-color"
var msg = color.xterm(39).bgXterm(128)
import hre, { ethers, network } from "hardhat"

Expand All @@ -17,9 +17,6 @@ export default async ({ getNamedAccounts, deployments }: any) => {
log: true
})

console.log("basic.receipt.contractAddress:", basic.receipt.contractAddress)
console.log("hre.network.name:", hre.network.name)

switch (hre.network.name) {
case "arthera":
console.log(
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"compile": "hardhat compile",
"deploy:arthera": "hardhat deploy --network arthera",
"deploy:sepolia": "hardhat deploy --network sepolia",
"deploy:arthera-testnet": "hardhat deploy --network arthera-testnet",
"deploy:arthera-testnet": "hardhat deploy --network arthera-testnet && hardhat sourcify --network arthera-testnet",
"deploy:op-sepolia": "hardhat deploy --network op-sepolia",
"sourcify:arthera": "hardhat sourcify --network arthera",
"sourcify:arthera-testnet": "hardhat sourcify --network arthera-testnet",
Expand All @@ -35,6 +35,7 @@
"@typechain/ethers-v6": "^0.4.3",
"@typechain/hardhat": "^8.0.3",
"@types/chai": "^4.3.5",
"@types/cli-color": "^2.0.6",
"@types/mocha": "^10.0.1",
"chai": "^4.3.8",
"hardhat": "^2.17.2",
Expand Down
12 changes: 11 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions test/Basic.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const {
loadFixture
} = require("@nomicfoundation/hardhat-toolbox/network-helpers")
const { expect } = require("chai")
const { ethers } = require("hardhat")
import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers"
import { expect } from "chai"
import { ethers } from "hardhat"

describe("Basic ERC-20", function () {
async function deployContracts() {
Expand Down
Loading