Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
wsdt committed Aug 17, 2024
1 parent 71a1cdd commit a171e60
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import "@nomicfoundation/hardhat-ignition-ethers";
dotenv.config();

const {PRIVATE_KEY} = process.env;
if (!PRIVATE_KEY) {
console.warn("[hardhat.config] No PRIVATE_KEY defined!")
}
const DUMMY_PRIVATE_KEY = '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'

console.log("Using private key: ", PRIVATE_KEY, DUMMY_PRIVATE_KEY)
let privateKeyToUse: string = PRIVATE_KEY!
if (!PRIVATE_KEY || PRIVATE_KEY.length !== DUMMY_PRIVATE_KEY.length) {
console.warn("[hardhat.config] No or invalid PRIVATE_KEY defined!")
privateKeyToUse = DUMMY_PRIVATE_KEY
}

const config: HardhatUserConfig & {
etherscan: { apiKey: any; customChains: any };
Expand All @@ -32,11 +33,11 @@ const config: HardhatUserConfig & {
networks: {
boba_sepolia: {
url: "https://sepolia.boba.network",
accounts: [PRIVATE_KEY ?? DUMMY_PRIVATE_KEY],
accounts: [privateKeyToUse],
},
boba_local: {
url: "http://localhost:9545",
accounts: [PRIVATE_KEY ?? DUMMY_PRIVATE_KEY],
accounts: [privateKeyToUse],
},
},
etherscan: {
Expand Down

0 comments on commit a171e60

Please sign in to comment.