mirror of
https://github.com/logos-messaging/waku-rlnv1-contract.git
synced 2026-01-06 00:03:08 +00:00
Merge pull request #13 from waku-org/deploy-local-with-provided-url
Add option to provide the RPC URL for a localhost network deployment
This commit is contained in:
commit
1f9661038d
@ -1,3 +1,4 @@
|
|||||||
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_KEY>
|
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_KEY>
|
||||||
SEPOLIA_URL=https://eth-sepolia.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
|
SEPOLIA_URL=https://eth-sepolia.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
|
||||||
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
|
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
|
||||||
|
RPC_PROVIDER=http://<RPC_IP>:<RPC_PORT>
|
||||||
|
|||||||
@ -12,7 +12,8 @@ import "hardhat-gas-reporter";
|
|||||||
import "solidity-docgen";
|
import "solidity-docgen";
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
const { SEPOLIA_URL, PRIVATE_KEY, ETHERSCAN_API_KEY } = process.env;
|
const { SEPOLIA_URL, PRIVATE_KEY, ETHERSCAN_API_KEY, RPC_PROVIDER } =
|
||||||
|
process.env;
|
||||||
|
|
||||||
const getNetworkConfig = (): NetworksUserConfig | undefined => {
|
const getNetworkConfig = (): NetworksUserConfig | undefined => {
|
||||||
if (SEPOLIA_URL && PRIVATE_KEY) {
|
if (SEPOLIA_URL && PRIVATE_KEY) {
|
||||||
@ -34,8 +35,14 @@ const getNetworkConfig = (): NetworksUserConfig | undefined => {
|
|||||||
url: "http://localhost:8545",
|
url: "http://localhost:8545",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
const LOCALHOST_PROVIDER = RPC_PROVIDER || "http://localhost:8545";
|
||||||
|
return {
|
||||||
|
localhost_integration: {
|
||||||
|
url: LOCALHOST_PROVIDER,
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return undefined;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// You need to export an object to set up your config
|
// You need to export an object to set up your config
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user