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: change accounts to be present for localhost and cluster #176

Merged
merged 1 commit into from
Apr 18, 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
2 changes: 1 addition & 1 deletion deploy/local/000_deploy_factory.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DeployFunction } from 'hardhat-deploy/types';

const func: DeployFunction = async function ({ deployments, getNamedAccounts, network, ethers }) {
const func: DeployFunction = async function ({ deployments, getNamedAccounts, ethers }) {
const { deploy, log } = deployments;
const { deployer } = await getNamedAccounts();

Expand Down
17 changes: 11 additions & 6 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import { HardhatUserConfig } from 'hardhat/types';
const PRIVATE_RPC_MAINNET: string | undefined = process.env.PRIVATE_RPC_MAINNET;
const PRIVATE_RPC_TESTNET: string | undefined = process.env.PRIVATE_RPC_TESTNET;

// We use WALLET_SECRET_2 because of collide with SI repo that uses WALLET_SECRET and we use both of them for cluster deployment
const walletSecret: string = process.env.WALLET_SECRET_2 === undefined ? 'undefined' : process.env.WALLET_SECRET_2;
const walletSecret: string = process.env.WALLET_SECRET === undefined ? 'undefined' : process.env.WALLET_SECRET;

if (walletSecret === 'undefined') {
console.log('Please set your WALLET_SECRET_2 in a .env file');
console.log('Please set your WALLET_SECRET in a .env file');
} else if (walletSecret.length !== 64) {
console.log('WALLET_SECRET_2 must be 64 characters long.');
console.log('WALLET_SECRET must be 64 characters long.');
}

const mainnetEtherscanKey: string | undefined = process.env.MAINNET_ETHERSCAN_KEY;
Expand Down Expand Up @@ -94,13 +93,19 @@ const config: HardhatUserConfig = {
},
localhost: {
url: 'http://localhost:8545',
// accounts, if not defined uses the same as above hardhat
accounts: [
'0x8d56d322a1bb1e94c7d64ccd62aa2e5cc9760f59575eda0f7fd392bab8d6ba0d', // deployer 0x7E71bA1aB8AF3454a01CFafe358BEbb7691d02f8
'0xb65c0589ad60bc9985f0b6eafe5dd480b7ad63f073a7e9625dd23466a0d1947d', // admin 0x77CbAdb1059dDC7334227e025fC940469f52FEd8
],
chainId: 12345,
deploy: ['deploy/local/'],
},
localcluster: {
url: 'http://geth-swap:8545',
// accounts, if not defined uses the same as above hardhat
accounts: [
'0x8d56d322a1bb1e94c7d64ccd62aa2e5cc9760f59575eda0f7fd392bab8d6ba0d', // deployer 0x7E71bA1aB8AF3454a01CFafe358BEbb7691d02f8
'0xb65c0589ad60bc9985f0b6eafe5dd480b7ad63f073a7e9625dd23466a0d1947d', // admin 0x77CbAdb1059dDC7334227e025fC940469f52FEd8
],
chainId: 12345,
deploy: ['deploy/local/'],
},
Expand Down
Loading