Skip to content

Commit

Permalink
chore: clean de code
Browse files Browse the repository at this point in the history
  • Loading branch information
juliopavila committed Sep 9, 2024
1 parent f5c4174 commit 387d076
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 348 deletions.
86 changes: 46 additions & 40 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,59 +1,65 @@
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-verify";
import "hardhat-gas-reporter";
import "solidity-coverage";
import dotenv from "dotenv";
import type { HttpNetworkUserConfig } from "hardhat/types";
import yargs from "yargs";
import "hardhat-contract-sizer";



import '@nomicfoundation/hardhat-toolbox'
import '@nomicfoundation/hardhat-verify'
import 'hardhat-gas-reporter'
import 'solidity-coverage'
import dotenv from 'dotenv'
import type { HttpNetworkUserConfig } from 'hardhat/types'
import yargs from 'yargs'
import 'hardhat-contract-sizer'

const argv = yargs
.option("network", {
type: "string",
default: "hardhat",
.option('network', {
type: 'string',
default: 'hardhat',
})
.help(false)
.version(false).argv;
.version(false).argv

// Load environment variables.
dotenv.config();
const { INFURA_KEY, MNEMONIC, ETHERSCAN_API_KEY, PK, ALCHEMY_KEY } =
process.env;

// import "./src/tasks/deployDeterministicDeploymentHelper";
// import "./src/tasks/setup";
// import "./src/tasks/proposals";
dotenv.config()
const { INFURA_KEY, MNEMONIC, ETHERSCAN_API_KEY, PK, ALCHEMY_KEY } = process.env

import "./src/tasks/extract-mastercopy";
import "./src/tasks/deploy-mastercopies";
import "./src/tasks/deploy-mastercopy";
import "./src/tasks/verify-mastercopies";
import "./src/tasks/verify-mastercopy";


const DEFAULT_MNEMONIC =
"candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";
'candy maple cake sugar pudding cream honey rich smooth crumble sweet treat'

const sharedNetworkConfig: HttpNetworkUserConfig = {};
const sharedNetworkConfig: HttpNetworkUserConfig = {}
if (PK) {
sharedNetworkConfig.accounts = [PK];
sharedNetworkConfig.accounts = [PK]
} else {
sharedNetworkConfig.accounts = {
mnemonic: MNEMONIC || DEFAULT_MNEMONIC,
};
}
}

if (["mainnet", "sepolia"].includes(argv.network) && INFURA_KEY === undefined) {
if (['mainnet', 'sepolia'].includes(argv.network) && INFURA_KEY === undefined) {
throw new Error(
`Could not find Infura key in env, unable to connect to network ${argv.network}`
);
`Could not find Infura key in env, unable to connect to network ${argv.network}`,
)
}

export default {
paths: {
artifacts: "build/artifacts",
cache: "build/cache",
deploy: "src/deploy",
sources: "contracts",
artifacts: 'build/artifacts',
cache: 'build/cache',
deploy: 'src/deploy',
sources: 'contracts',
},
solidity: {
compilers: [{ version: "0.8.0" }, { version: "0.6.12" }],
compilers: [
{ version: '0.8.20' },
{ version: '0.8.4' },
{ version: '0.8.2' },
{ version: '0.8.1' },
{ version: '0.8.0' },
{ version: '0.6.12' },
],
},
networks: {
mainnet: {
Expand All @@ -70,18 +76,18 @@ export default {
},
xdai: {
...sharedNetworkConfig,
url: "https://xdai.poanetwork.dev",
url: 'https://xdai.poanetwork.dev',
},
matic: {
...sharedNetworkConfig,
url: "https://polygon-rpc.com",
url: 'https://polygon-rpc.com',
},
bsc: {
...sharedNetworkConfig,
url: "https://bsc-dataseed.binance.org",
url: 'https://bsc-dataseed.binance.org',
},
"truffle-dashboard": {
url: "http://localhost:24012/rpc",
'truffle-dashboard': {
url: 'http://localhost:24012/rpc',
timeout: 100000000,
},
},
Expand All @@ -94,4 +100,4 @@ export default {
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
};
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"author": "[email protected]",
"license": "MIT",
"devDependencies": {
"@gnosis-guild/zodiac-core": "^2.0.2",
"@gnosis-guild/zodiac-core": "^2.0.3",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.7",
"@nomicfoundation/hardhat-ethers": "^3.0.6",
"@nomicfoundation/hardhat-ignition": "^0.15.5",
Expand Down
28 changes: 0 additions & 28 deletions src/deploy/deploy_modules.ts

This file was deleted.

32 changes: 0 additions & 32 deletions src/deploy/verify.ts

This file was deleted.

107 changes: 0 additions & 107 deletions src/tasks/deployDeterministicDeploymentHelper.ts

This file was deleted.

Loading

0 comments on commit 387d076

Please sign in to comment.