Skip to content

Commit

Permalink
chore: add forking options
Browse files Browse the repository at this point in the history
  • Loading branch information
kittybest committed Mar 4, 2024
1 parent 9b7d630 commit b066e68
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/ts/utils/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// the default URL of the EVM provider
export const DEFAULT_ETH_PROVIDER = "http://localhost:8545";
export const DEFAULT_ETH_PROVIDER = "http://127.0.0.1:8545";
// the default EVM private key
export const DEFAULT_ETH_SK = "0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3";
// the default initial voice credits assigned to users
Expand Down
3 changes: 3 additions & 0 deletions contracts/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ ETHERSCAN_API_KEY=
INFURA_KEY=
OP_RPC_URL=
GAS_PRICE=
FORKING_URL=
FORKING_BLOCK_NUM=
HARDHAT_LOGGING=
8 changes: 7 additions & 1 deletion contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,20 @@ const config: HardhatUserConfig = {
count: 20,
},
gas: DEFAULT_BLOCK_GAS_LIMIT,
loggingEnabled: false,
loggingEnabled: process.env.HARDHAT_LOGGING === "true",
allowUnlimitedContractSize: true,
throwOnTransactionFailures: true,
throwOnCallFailures: true,
mining: {
auto: true,
interval: 100,
},
forking: process.env.FORKING_URL
? {
url: process.env.FORKING_URL,
blockNumber: process.env.FORKING_BLOCK_NUM ? parseInt(process.env.FORKING_BLOCK_NUM, 10) : 0,
}
: undefined,
},
},
contractSizer: {
Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"scripts": {
"watch": "tsc --watch",
"hardhat": "hardhat node --hostname 0.0.0.0 --port 8545",
"hardhat": "hardhat node",
"compileSol": "./scripts/compileSol.sh $1",
"moveIntegrationArtifacts": "cp -r artifacts/ ../integrationTests/artifacts",
"prebuild": "pnpm run compileSol",
Expand Down

0 comments on commit b066e68

Please sign in to comment.