Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions contract-deploy-demo/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ async function main() {

const lockedAmount = ethers.utils.parseEther("0.00000001");

const Lock = await ethers.getContractFactory("Lock");
const lock = await Lock.deploy(unlockTime, { value: lockedAmount });
const lock = await ethers.deployContract("Lock", [unlockTime], {
value: lockedAmount,
});
await lock.waitForDeployment();

await lock.deployed();

console.log(`Lock with 0.00000001 ETH and unlock timestamp ${unlockTime} deployed to ${lock.address}`);
console.log(`Block explorer URL: https://blockscout.scroll.io/address/${lock.address}`);
console.log(`Lock with 0.00000001 ETH and unlock timestamp ${unlockTime} deployed to ${lock.target}`);
console.log(`Block explorer URL: https://blockscout.scroll.io/address/${lock.target}`);
}

// We recommend this pattern to be able to use async/await everywhere
Expand Down