Skip to content

Commit 2b82348

Browse files
committed
rename edr label in network config edr-simulated
This rename gives a clearer indication that the network config is for a local in-memory simulation via EDR. Resolves #7051
1 parent ef59312 commit 2b82348

File tree

28 files changed

+58
-52
lines changed

28 files changed

+58
-52
lines changed

v-next/example-project/hardhat.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const config: HardhatUserConfig = {
121121
accounts: [configVariable("OP_SENDER")],
122122
},
123123
edrOp: {
124-
type: "edr",
124+
type: "edr-simulated",
125125
chainType: "op",
126126
chainId: 10,
127127
forking: {
@@ -135,7 +135,7 @@ const config: HardhatUserConfig = {
135135
accounts: [configVariable("OP_SEPOLIA_SENDER")],
136136
},
137137
edrOpSepolia: {
138-
type: "edr",
138+
type: "edr-simulated",
139139
chainType: "op",
140140
forking: {
141141
url: "https://sepolia.optimism.io",

v-next/example-project/scripts/send-op-tx-viem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async function sendL2Transaction(networkConfigName: string) {
88
chainType: "op",
99
});
1010

11-
if (networkConfig.type === "edr") {
11+
if (networkConfig.type === "edr-simulated") {
1212
console.log("Using an EDR network simulating Optimism, forking it");
1313
} else {
1414
console.log("Using an HTTP connection to Optimism");

v-next/hardhat-errors/src/descriptors.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ Try using another mnemonic or deriving less keys.`,
945945
messageTemplate:
946946
'The provided network type "{networkType}" for network "{networkName}" is not recognized, only `http` and `edr` are supported.',
947947
websiteTitle: "Invalid network type",
948-
websiteDescription: `The network manager only supports the network types 'http' and 'edr'.`,
948+
websiteDescription: `The network manager only supports the network types 'http' and 'edr-simulated'.`,
949949
},
950950
DATA_FIELD_CANNOT_BE_NULL_WITH_NULL_ADDRESS: {
951951
number: 721,
@@ -1154,9 +1154,9 @@ Please use the fully qualified name of the contract to disambiguate it.`,
11541154
NODE: {
11551155
INVALID_NETWORK_TYPE: {
11561156
number: 1100,
1157-
messageTemplate: `The provided node network type "{networkType}" for network "{networkName}" is not recognized, only 'edr' is supported.`,
1157+
messageTemplate: `The provided node network type "{networkType}" for network "{networkName}" is not recognized, only 'edr-simulated' is supported.`,
11581158
websiteTitle: "Invalid node network type",
1159-
websiteDescription: `The node only supports the 'edr' network type.`,
1159+
websiteDescription: `The node only supports the 'edr-simulated' network type.`,
11601160
},
11611161
},
11621162
TEST_PLUGIN: {
@@ -2448,7 +2448,7 @@ Possible causes:
24482448
Specify the exact contract using the \`--contract\` flag.`,
24492449
websiteTitle: "Multiple contract matches",
24502450
websiteDescription: `The deployed bytecode matches multiple compiled contracts. Specify the exact contract using the \`--contract\` flag. For example:
2451-
2451+
24522452
\`\`\`sh
24532453
npx hardhat verify --contract contracts/Example.sol:ExampleContract <other args>
24542454
\`\`\`

v-next/hardhat-ethers-chai-matchers/test/multi-network-connections.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ describe("handle multiple connections", () => {
3131
plugins: [hardhatChaiMatchersPlugin, hardhatEthersPlugin],
3232
networks: {
3333
test1: {
34-
type: "edr",
34+
type: "edr-simulated",
3535
chainId: 1,
3636
},
3737
test2: {
38-
type: "edr",
38+
type: "edr-simulated",
3939
chainId: 2,
4040
},
4141
},

v-next/hardhat-ethers/src/internal/signers/signers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type SignerAccounts =
3737
accounts: HttpNetworkAccountsConfig;
3838
}
3939
| {
40-
type: "edr";
40+
type: "edr-simulated";
4141
accounts: EdrNetworkAccountsConfig;
4242
};
4343

@@ -69,7 +69,7 @@ export class HardhatEthersSigner implements HardhatEthersSignerI {
6969
const signerAccounts: SignerAccounts =
7070
networkConfig.type === "http"
7171
? { type: "http", accounts: networkConfig.accounts }
72-
: { type: "edr", accounts: networkConfig.accounts };
72+
: { type: "edr-simulated", accounts: networkConfig.accounts };
7373

7474
return new HardhatEthersSigner(address, provider, signerAccounts, gasLimit);
7575
}
@@ -349,7 +349,7 @@ export class HardhatEthersSigner implements HardhatEthersSignerI {
349349
}
350350
}
351351

352-
if (type === "edr") {
352+
if (type === "edr-simulated") {
353353
if (Array.isArray(accounts)) {
354354
return Promise.all(accounts.map((acc) => acc.privateKey.get()));
355355
}

v-next/hardhat-ethers/test/hardhat-ethers-signer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe("hardhat ethers signer", () => {
144144
const { ethers: hhEthers } = await initializeTestEthers([], {
145145
networks: {
146146
default: {
147-
type: "edr",
147+
type: "edr-simulated",
148148
accounts: [
149149
{ balance: "1000000000000000000", privateKey: TEST_P_KEY_1 },
150150
{ balance: "1000000000000000000", privateKey: TEST_P_KEY_2 },
@@ -160,7 +160,7 @@ describe("hardhat ethers signer", () => {
160160
const { ethers: hhEthers } = await initializeTestEthers([], {
161161
networks: {
162162
default: {
163-
type: "edr",
163+
type: "edr-simulated",
164164
accounts: HD_ACCOUNTS,
165165
},
166166
},

v-next/hardhat-ignition-core/test-integrations/fixture-projects/dont-throw-on-reverts/hardhat.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default {
1515
},
1616
networks: {
1717
hardhat: {
18-
type: "edr",
18+
type: "edr-simulated",
1919
throwOnTransactionFailures: false,
2020
},
2121
},

v-next/hardhat-ignition-ethers/src/internal/ethers-ignition-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class EthersIgnitionHelperImpl<ChainTypeT extends ChainType | string>
143143
const deploymentId = resolveDeploymentId(givenDeploymentId, chainId);
144144

145145
const deploymentDir =
146-
this.#connection.networkConfig.type === "edr"
146+
this.#connection.networkConfig.type === "edr-simulated"
147147
? undefined
148148
: path.join(
149149
this.#hardhatConfig.paths.ignition,

v-next/hardhat-ignition-viem/src/internal/viem-ignition-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class ViemIgnitionHelperImpl<ChainTypeT extends ChainType | string>
146146
const deploymentId = resolveDeploymentId(givenDeploymentId, chainId);
147147

148148
const deploymentDir =
149-
this.#connection.networkConfig.type === "edr"
149+
this.#connection.networkConfig.type === "edr-simulated"
150150
? undefined
151151
: path.join(
152152
this.#hardhatConfig.paths.ignition,

v-next/hardhat-ignition/src/internal/tasks/deploy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const taskDeploy: NewTaskActionFunction<TaskDeployArguments> = async (
6666
);
6767

6868
const deploymentDir =
69-
connection.networkConfig.type === "edr" && !writeLocalhostDeployment
69+
connection.networkConfig.type === "edr-simulated" &&
70+
!writeLocalhostDeployment
7071
? undefined
7172
: path.join(hre.config.paths.ignition, "deployments", deploymentId);
7273

0 commit comments

Comments
 (0)