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 build #282

Merged
merged 5 commits into from
Aug 15, 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
35 changes: 11 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Build and publish
# cspell:words ncipollo

name: publish
on:
push:
branches-ignore:
Expand All @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down
31 changes: 4 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test
name: test
on: [push, pull_request]

env:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
7 changes: 4 additions & 3 deletions src/submitters/auto-submitter.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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";


Expand Down Expand Up @@ -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);
}
Expand Down
Loading