From f167cbc1fbac7643ee8b8d910fd1d894dc17617d Mon Sep 17 00:00:00 2001 From: Intizar Date: Mon, 3 Jun 2024 17:27:04 +0900 Subject: [PATCH] add localhost options --- hardhat.config.ts | 10 +++++++--- scripts/utils.ts | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 5e54357..b2be353 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -37,7 +37,9 @@ const config: HardhatUserConfig = { networks: { localhost: { gas: 1_400_000, - gasPrice: 250_000_000_000 + gasPrice: 250_000_000_000, + ...commonConfig, + url: process.env.PROVIDER || 'http://127.0.0.1:8545' }, baobab: { url: process.env.PROVIDER || 'https://api.baobab.klaytn.net:8651', @@ -57,11 +59,13 @@ const config: HardhatUserConfig = { }, prepayment: { baobab: '0x8d3A1663d10eEb0bC9C9e537e1BBeA69383194e7', - cypress: '0xc2C88492Cf7e5240C3EB49353539E75336960600' + cypress: '0xc2C88492Cf7e5240C3EB49353539E75336960600', + localhost: '0x5FbDB2315678afecb367f032d93F642f64180aa3' }, vrfCoordinator: { baobab: '0xDA8c0A00A372503aa6EC80f9b29Cc97C454bE499', - cypress: '0x3F247f70DC083A2907B8E76635986fd09AA80EFb' + cypress: '0x3F247f70DC083A2907B8E76635986fd09AA80EFb', + localhost: '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512' } } } diff --git a/scripts/utils.ts b/scripts/utils.ts index 443e848..76cf5dd 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -4,6 +4,8 @@ export function getKeyHash() { return '0xd9af33106d664a53cb9946df5cd81a30695f5b72224ee64e798b278af812779c' } else if (networkName == 'cypress') { return '0x6cff5233743b3c0321a19ae11ab38ae0ddc7ddfe1e91b162fa8bb657488fb157' + } else if (networkName == 'localhost') { + return '0xeaec8ebbc75ec18c1d761e4e11d2eab84392a55786264a3aa7385ab4532db1e4' } else { throw new Error(`Key Hash is not defined for network: ${networkName}`) }