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: add forking option #1261

Merged
merged 1 commit into from
Mar 5, 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 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
Loading