|
1 | | -// import { ethers } from "hardhat"; |
2 | | - |
3 | | -// async function main() { |
4 | | -// const [deployer] = await ethers.getSigners(); |
5 | | -// console.log("Deployer:", deployer.address); |
6 | | - |
7 | | -// const Factory = await ethers.getContractFactory("PlinkoEntropy"); |
8 | | -// const contract = await Factory.deploy(); |
9 | | -// await contract.waitForDeployment(); |
10 | | -// const addr = await contract.getAddress(); |
11 | | - |
12 | | -// console.log("PlinkoEntropy deployed to:", addr); |
13 | | - |
14 | | -// const fee = await contract.getCurrentFee(); |
15 | | -// console.log("Current Pyth Entropy fee (wei):", fee.toString()); |
16 | | -// } |
17 | | - |
18 | | -// main().catch((e) => { |
19 | | -// console.error(e); |
20 | | -// process.exit(1); |
21 | | -// }); |
22 | | - |
23 | | -// scripts/deploy.ts |
24 | | -// import hre from "hardhat"; // ← default import (CJS interop) |
25 | | -// const { ethers } = hre; |
26 | | - |
27 | | -// async function main() { |
28 | | -// const [deployer] = await ethers.getSigners(); |
29 | | -// console.log("Deployer:", deployer.address); |
30 | | - |
31 | | -// const Factory = await ethers.getContractFactory("PlinkoEntropy"); |
32 | | -// const contract = await Factory.deploy(); |
33 | | -// await contract.waitForDeployment(); |
34 | | - |
35 | | -// const addr = await contract.getAddress(); |
36 | | -// console.log("PlinkoEntropy deployed to:", addr); |
37 | | - |
38 | | -// const fee = await contract.getCurrentFee(); |
39 | | -// console.log("Current Pyth Entropy fee (wei):", fee.toString()); |
40 | | -// } |
41 | | - |
42 | | -// main().catch((err) => { |
43 | | -// console.error(err); |
44 | | -// process.exit(1); |
45 | | -// }); |
46 | | - |
47 | 1 | // scripts/deploy.ts (ESM-friendly) |
48 | 2 | import hre from "hardhat"; |
49 | 3 | const { ethers } = hre; |
|
0 commit comments