Replies: 1 comment
-
reduce the amount of test eth that you are funding so that it is less than what you have in metamask make it like 0.1 or 0.05 in the line below const FUND_AMOUNT = ethers.utils.parseEther("1") // 1 Ether, or 1e18 (10^18) Wei |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
An unexpected error occurred:
Error: ERROR processing /home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/deploy/01-deploy-raffle.js:
ProviderError: transaction underpriced
at HttpProvider.request (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/providers/http.ts:88:21)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at DeploymentsManager.executeDeployScripts (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1223:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at DeploymentsManager.runDeploy (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1053:5)
at SimpleTaskDefinition.action (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat-deploy/src/index.ts:409:5)
at Environment._runTaskDefinition (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
at Environment.run (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
at SimpleTaskDefinition.action (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat-deploy/src/index.ts:555:32)
at Environment._runTaskDefinition (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
at Environment.run (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
at SimpleTaskDefinition.action (/home/yixin/hh-fcc/hardhat_smartcontract-lottery-fcc/node_modules/hardhat-deploy/src/index.ts:640:5)
error Command failed with exit code 1.
00-deploy
const { network } = require("hardhat")
const BASE_FEE = "250000000000000000" // 0.25 is this the premium in LINK?
const GAS_PRICE_LINK = 1e9 // link per gas, is this the gas lane? // 0.000000001 LINK per gas
module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy, log } = deployments
const { deployer } = await getNamedAccounts()
const chainId = network.config.chainId
// If we are on a local development network, we need to deploy mocks!
if (chainId == 31337) {
log("Local network detected! Deploying mocks...")
await deploy("VRFCoordinatorV2Mock", {
from: deployer,
log: true,
args: [BASE_FEE, GAS_PRICE_LINK],
})
}
module.exports.tags = ["all", "mocks"]
01-deploy
const { network, ethers } = require("hardhat")
const {
networkConfig,
developmentChains,
VERIFICATION_BLOCK_CONFIRMATIONS,
} = require("../helper-hardhat-config")
const { verify } = require("../utils/verify")
const FUND_AMOUNT = ethers.utils.parseEther("1") // 1 Ether, or 1e18 (10^18) Wei
module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy, log } = deployments
const { deployer } = await getNamedAccounts()
const chainId = network.config.chainId
let vrfCoordinatorV2Address, subscriptionId, vrfCoordinatorV2Mock
}
module.exports.tags = ["all", "raffle"]
Beta Was this translation helpful? Give feedback.
All reactions