Skip to content

Commit

Permalink
Merge pull request #55 from niftyhorde/BumpContractGoerliSupport
Browse files Browse the repository at this point in the history
Beta release Goerli support
  • Loading branch information
leslyto authored Sep 21, 2022
2 parents 6badcb8 + ef3353d commit 288d7e0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INFURA_PROJECT_ID="your infura project id"
GOERLI_MNEMONIC="your goerli mnemonic"
ROPSTEN_MNEMONIC="your ropsten mnemonic"
RINKEBY_MNEMONIC="your rinkeby mnemonic"
MAINNET_MNEMONIC="your mainnet mnemonic"
COINMARKETCAP_API_KEY="your coinmarketcap api key"
REPORT_GAS=false
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Contracts
on:
push:
branches:
- 'master'
- "master"

jobs:
tag:
Expand Down Expand Up @@ -33,10 +33,10 @@ jobs:
- name: Setup Nodejs
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: "12.x"
always-auth: true
registry-url: 'https://npm.pkg.github.com'
scope: '@niftyhorde'
registry-url: "https://npm.pkg.github.com"
scope: "@niftyhorde"
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
Expand All @@ -54,11 +54,11 @@ jobs:

- name: Deploy local
run: yarn run deploy:local
- name: Deploy ropsten
run: yarn run deploy:ropsten
- name: Deploy goerli
run: yarn run deploy:goerli
env:
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }}
ROPSTEN_MNEMONIC: ${{ secrets.TESTNET_MNEMONIC }}
GOERLI_MNEMONIC: ${{ secrets.TESTNET_MNEMONIC }}
- name: Deploy rinkeby
run: yarn run deploy:rinkeby
env:
Expand Down
55 changes: 22 additions & 33 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {HardhatUserConfig} from "hardhat/types";
import accounts from "./test/Accounts"
import dotenv from 'dotenv';
import { HardhatUserConfig } from "hardhat/types";
import accounts from "./test/Accounts";
import dotenv from "dotenv";

import "@nomiclabs/hardhat-ethers"
import "@nomiclabs/hardhat-ethers";

import "solidity-coverage";
import "hardhat-gas-reporter";
import "hardhat-deploy";
import "hardhat-typechain";

dotenv.config()
dotenv.config();

const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
Expand All @@ -18,9 +18,9 @@ const config: HardhatUserConfig = {
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
runs: 200,
},
},
},
paths: {
sources: "./contracts",
Expand All @@ -31,70 +31,59 @@ const config: HardhatUserConfig = {
hardhat: {
loggingEnabled: false,
live: false,
accounts: accounts
accounts: accounts,
},
coverage: {
url: 'http://127.0.0.1:5458'
url: "http://127.0.0.1:5458",
},
localhost: {
url: 'http://127.0.0.1:8545',
url: "http://127.0.0.1:8545",
live: true,
loggingEnabled: true
loggingEnabled: true,
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: `${process.env.GOERLI_MNEMONIC}`
mnemonic: `${process.env.GOERLI_MNEMONIC}`,
},
chainId: 5,
loggingEnabled: true,
gas: "auto",
gasPrice: "auto",
gasMultiplier: 1.5
gasMultiplier: 1.5,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: `${process.env.RINKEBY_MNEMONIC}`
mnemonic: `${process.env.RINKEBY_MNEMONIC}`,
},
chainId: 4,
loggingEnabled: true,
gas: "auto",
gasPrice: "auto",
gasMultiplier: 1.5
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: `${process.env.ROPSTEN_MNEMONIC}`
},
chainId: 3,
loggingEnabled: true,
gas: "auto",
gasPrice: "auto",
gasMultiplier: 1.5
gasMultiplier: 1.5,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: `${process.env.MAINNET_MNEMONIC}`
mnemonic: `${process.env.MAINNET_MNEMONIC}`,
},
}
},
},
gasReporter: {
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
enabled: !!(process.env.REPORT_GAS && process.env.REPORT_GAS != "false"),
},
typechain: {
outDir: "typechain",
target: "ethers-v5"
target: "ethers-v5",
},
namedAccounts: {
deployer: {
default: 0,
6: 0
}
}
6: 0,
},
},
};

export default config;
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@niftyhorde/swap-kiwi-contracts",
"version": "1.0.1",
"version": "1.0.2-beta",
"private": false,
"repository": {
"url": "[email protected]:niftyhorde/swap.kiwi.git",
Expand Down Expand Up @@ -30,7 +30,6 @@
"deploy:localhost": "./wait-for-it.sh localhost:8545 -- sleep 1 && hardhat deploy --network localhost",
"deploy:local": "concurrently --raw --kill-others --success first \"hardhat node\" \"yarn deploy:localhost\"",
"deploy:goerli": "hardhat deploy --network goerli",
"deploy:ropsten": "hardhat deploy --network ropsten",
"deploy:rinkeby": "hardhat deploy --network rinkeby",
"deploy:mainnet": "hardhat deploy --network mainnet",
"help": "npx hardhat help",
Expand Down

0 comments on commit 288d7e0

Please sign in to comment.