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

chore: use hardhat-secure-accounts for non local chains #1070

Open
wants to merge 2 commits into
base: mde/horizon-and-subgrah-service-deploy-fix
Choose a base branch
from
Open
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
10 changes: 7 additions & 3 deletions packages/horizon/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@nomicfoundation/hardhat-toolbox'
import '@nomicfoundation/hardhat-ignition-ethers'
import 'hardhat-storage-layout'
import 'hardhat-contract-sizer'
import 'hardhat-secure-accounts'

import { HardhatUserConfig } from 'hardhat/config'

Expand All @@ -20,17 +21,20 @@ const config: HardhatUserConfig = {
artifacts: './build/contracts',
sources: './contracts',
},
secureAccounts: {
enabled: true,
},
networks: {
hardhat: {
secureAccounts: {
enabled: false,
},
accounts: {
mnemonic: 'myth like bonus scare over problem client lizard pioneer submit female collect',
},
},
arbitrumSepolia: {
url: 'https://sepolia-rollup.arbitrum.io/rpc',
accounts: {
mnemonic: process.env.MNEMONIC ?? '',
},
},
},
etherscan: {
Expand Down
1 change: 1 addition & 0 deletions packages/horizon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"hardhat": "^2.20.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-secure-accounts": "^1.0.4",
"hardhat-storage-layout": "^0.1.7",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
Expand Down
17 changes: 17 additions & 0 deletions packages/subgraph-service/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@nomicfoundation/hardhat-ignition-ethers'
import '@nomicfoundation/hardhat-toolbox'
import 'hardhat-contract-sizer'
import 'hardhat-storage-layout'
import 'hardhat-secure-accounts'
import 'solidity-docgen'

import { HardhatUserConfig } from 'hardhat/config'
Expand All @@ -21,6 +22,22 @@ const config: HardhatUserConfig = {
artifacts: './build/contracts',
sources: './contracts',
},
secureAccounts: {
enabled: true,
},
networks: {
hardhat: {
secureAccounts: {
enabled: false,
},
accounts: {
mnemonic: 'myth like bonus scare over problem client lizard pioneer submit female collect',
},
},
arbitrumSepolia: {
url: 'https://sepolia-rollup.arbitrum.io/rpc',
},
},
}

export default config
1 change: 1 addition & 0 deletions packages/subgraph-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"hardhat": "^2.20.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-secure-accounts": "^1.0.4",
"hardhat-storage-layout": "^0.1.7",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
Expand Down
18 changes: 18 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2953,6 +2953,7 @@ __metadata:
hardhat: "npm:^2.20.1"
hardhat-contract-sizer: "npm:^2.10.0"
hardhat-gas-reporter: "npm:^1.0.8"
hardhat-secure-accounts: "npm:^1.0.4"
hardhat-storage-layout: "npm:^0.1.7"
lint-staged: "npm:^15.2.2"
prettier: "npm:^3.2.5"
Expand Down Expand Up @@ -3046,6 +3047,7 @@ __metadata:
hardhat: "npm:^2.20.1"
hardhat-contract-sizer: "npm:^2.10.0"
hardhat-gas-reporter: "npm:^1.0.8"
hardhat-secure-accounts: "npm:^1.0.4"
hardhat-storage-layout: "npm:^0.1.7"
lint-staged: "npm:^15.2.2"
prettier: "npm:^3.2.5"
Expand Down Expand Up @@ -14246,6 +14248,22 @@ __metadata:
languageName: node
linkType: hard

"hardhat-secure-accounts@npm:^1.0.4":
version: 1.0.4
resolution: "hardhat-secure-accounts@npm:1.0.4"
dependencies:
debug: "npm:^4.3.4"
enquirer: "npm:^2.3.6"
lodash.clonedeep: "npm:^4.5.0"
prompt-sync: "npm:^4.2.0"
peerDependencies:
"@nomicfoundation/hardhat-ethers": ^3.0.0
ethers: ^6.13.0
hardhat: ^2.22.0
checksum: 6406be693502234f342b9e27215bb3ecb3502a0d9f5299c5c1f5e1be28f08d26226cff511723e719639dc12fb2e4e329386a41e5c90f57b3bf3116656c45c2b5
languageName: node
linkType: hard

"hardhat-storage-layout@npm:0.1.6":
version: 0.1.6
resolution: "hardhat-storage-layout@npm:0.1.6"
Expand Down