From d421c972b218bcb3e91d86d443890bf8147ce9df Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Fri, 26 Apr 2024 19:06:08 +0100 Subject: [PATCH] fix hardhat deploy script Signed-off-by: Enrique Lacal --- samples/solidity/scripts/deploy.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/samples/solidity/scripts/deploy.ts b/samples/solidity/scripts/deploy.ts index 07e44f5..282de8b 100644 --- a/samples/solidity/scripts/deploy.ts +++ b/samples/solidity/scripts/deploy.ts @@ -11,18 +11,16 @@ async function main() { // // If this script is run directly using `node` you may want to call compile // manually to make sure everything is compiled - // await hre.run('compile'); + // await hre.run('compile'); // We get the contract to deploy const ERC20 = await ethers.getContractFactory('ERC20WithData'); const erc20 = await ERC20.deploy('FFC', 'FFC'); - await erc20.deployed(); - console.log('ERC-20 contract deployed to:', erc20.address); + console.log('ERC-20 contract deployed to:', erc20.target); const ERC721 = await ethers.getContractFactory('ERC721WithData'); const erc721 = await ERC721.deploy('FFNFT', 'FFNFT', ""); - await erc721.deployed(); - console.log('ERC-721 contract deployed to:', erc721.address); + console.log('ERC-721 contract deployed to:', erc721.target); } // We recommend this pattern to be able to use async/await everywhere