diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2b7c401..ac67c2a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,6 @@ -name: Build and publish +# cspell:words ncipollo + +name: publish on: push: branches-ignore: @@ -18,26 +20,15 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + - uses: actions/checkout@v4 - name: Set up Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} registry-url: 'https://registry.npmjs.org' always-auth: true + cache: 'yarn' - name: Install project run: | @@ -65,26 +56,22 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: ncipollo/release-action@v1 with: - tag_name: ${{ env.VERSION }} - release_name: ${{ env.VERSION }} + tag: ${{ env.VERSION }} prerelease: ${{ env.PRERELEASE }} clean: runs-on: ubuntu-latest if: github.event.pull_request.merged steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Node - uses: actions/setup-node@v2 + uses: actions/setup-node@ve with: node-version: ${{ env.NODE_VERSION }} - registry-url: 'https://registry.npmjs.org' + cache: 'yarn' - name: Remove feature tag env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 380230d..3cebdaa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Build and test +name: test on: [push, pull_request] env: @@ -13,36 +13,13 @@ jobs: node-version: [18.x, 20.x] steps: - - uses: actions/checkout@v2 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + - uses: actions/checkout@v4 - name: Install NODE JS - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ env.PYTHON_VERSION }} + cache: 'yarn' - name: Install project run: yarn install diff --git a/package.json b/package.json index 1c68913..cc8825f 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@openzeppelin/hardhat-upgrades": "^3.1.1", "@openzeppelin/upgrades-core": "^1.27.1", "@types/mocha": "^9.1.0", - "ethers": "^6.1.0", + "ethers": "^6.7.1", "hardhat": "^2.9.9" } } diff --git a/src/submitters/auto-submitter.ts b/src/submitters/auto-submitter.ts index 3d097e7..ca123f8 100644 --- a/src/submitters/auto-submitter.ts +++ b/src/submitters/auto-submitter.ts @@ -1,4 +1,4 @@ -import hre, {ethers} from "hardhat"; +import {Transaction, ethers} from "ethers"; import {EXIT_CODES} from "../exitCodes"; import {EoaSubmitter} from "./eoa-submitter"; import {MARIONETTE_ADDRESS} from "./types/marionette"; @@ -7,9 +7,10 @@ import { } from "./safe-ima-legacy-marionette-submitter"; import {SafeSubmitter} from "./safe-submitter"; import {Submitter} from "./submitter"; -import {Transaction} from "ethers"; + import {Upgrader} from "../upgrader"; import chalk from "chalk"; +import hre from "hardhat"; import {skaleContracts} from "@skalenetwork/skale-contracts-ethers-v6"; @@ -110,7 +111,7 @@ export class AutoSubmitter extends Submitter { process.exit(EXIT_CODES.UNKNOWN_IMA); } const contractsNetwork = - await skaleContracts.getNetworkByProvider(ethers.provider); + await skaleContracts.getNetworkByProvider(hre.ethers.provider); const ima = await contractsNetwork.getProject("ima"); return await ima.getInstance(process.env.IMA); }