deploy okay
This commit is contained in:
parent
75919b0327
commit
a8650f3004
@ -4,29 +4,29 @@
|
|||||||
// You can also run a script with `npx hardhat run <script>`. If you do that, Hardhat
|
// You can also run a script with `npx hardhat run <script>`. If you do that, Hardhat
|
||||||
// will compile your contracts, add the Hardhat Runtime Environment's members to the
|
// will compile your contracts, add the Hardhat Runtime Environment's members to the
|
||||||
// global scope, and execute the script.
|
// global scope, and execute the script.
|
||||||
|
|
||||||
import hre from "hardhat";
|
import hre from "hardhat";
|
||||||
|
|
||||||
const FavoriteNumber = await hre.ethers.getContractFactory("FavoriteNumber");
|
const favoriteNumber = await hre.ethers.deployContract("FavoriteNumber");
|
||||||
const favoriteNumber = await FavoriteNumber.deploy();
|
|
||||||
|
|
||||||
await favoriteNumber.deployed();
|
// await favoriteNumber.deployed();
|
||||||
|
|
||||||
console.log("FavoriteNumber deployed to:", favoriteNumber.address);
|
await favoriteNumber.waitForDeployment();
|
||||||
|
|
||||||
|
console.log("FavoriteNumber deployed to:", favoriteNumber.target);
|
||||||
|
|
||||||
// const currentTimestampInSeconds = Math.round(Date.now() / 1000);
|
// const currentTimestampInSeconds = Math.round(Date.now() / 1000);
|
||||||
// const unlockTime = currentTimestampInSeconds + 60;
|
// const unlockTime = currentTimestampInSeconds + 60;
|
||||||
|
|
||||||
// const lockedAmount = hre.ethers.parseEther("0.001");
|
// const lockedAmount = hre.ethers.parseEther("0.001");
|
||||||
|
|
||||||
// const lock = await ethers.deployContract("Lock", [unlockTime], {
|
// const lock = await hre.ethers.deployContract("Lock", [unlockTime], {
|
||||||
// value: lockedAmount,
|
// value: lockedAmount,
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// await lock.waitForDeployment();
|
// await lock.waitForDeployment();
|
||||||
|
|
||||||
// console.log(
|
// console.log(
|
||||||
// `Lock with ${ethers.formatEther(
|
// `Lock with ${hre.ethers.formatEther(
|
||||||
// lockedAmount
|
// lockedAmount
|
||||||
// )}ETH and unlock timestamp ${unlockTime} deployed to ${lock.target}`
|
// )}ETH and unlock timestamp ${unlockTime} deployed to ${lock.target}`
|
||||||
// );
|
// );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user