-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
36 lines (30 loc) · 1.03 KB
/
hardhat.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
newFunction();
function newFunction() {
require('@nomiclabs/hardhat-ethers');
module.exports = {
solidity: "0.8.4",
networks: {
localhost: {
url: "http://127.0.0.1:8545",
accounts: [
'0x5c7b2fc8d8b213703d32f5e6e4bff875d5c2b1f457f8d1dfd672f888d5a7f5fa', // Example Account 1
'0x2b2f2fc8d8b213703d32f5e6e4bff875d5c2b1f457f8d1dfd672f888d5a7f5fa',
],
},
},
};
}
export async function main() {
// Get the signers (accounts)
const [deployer] = await ethers.getSigners();
console.log("Deploying contracts with the account:", deployer.address);
// Get the contract factory
const Escrow = await ethers.getContractFactory("Escrow");
// Define constructor parameters
const developerAddress = "0x..."; // Add the developer address here
// Deploy the contract
const escrow = await Escrow.deploy(developerAddress, {
value: ethers.utils.parseEther("1.0"), // Example: initial payment in Ether
});
console.log("Escrow contract deployed to:", escrow.address);
}