Transfer To Server

This commit is contained in:
2024-08-10 12:04:31 +08:00
parent 2320250d51
commit 255dc6e19b
2 changed files with 0 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
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],
});
log("Mocks Deployed!");
log("----------------------------------------------------------");
log(
"You are deploying to a local network, you'll need a local network running to interact",
);
log(
"Please run `yarn hardhat console --network localhost` to interact with the deployed smart contracts!",
);
log("----------------------------------------------------------");
}
};
module.exports.tags = ["all", "mocks"];