Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hardhat deploy script #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions samples/solidity/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const config: HardhatUserConfig = {
solidity: {
version: '0.8.24',
settings: {
evmVersion: 'paris',
optimizer: {
enabled: true,
runs: 1000,
Expand Down
8 changes: 3 additions & 5 deletions samples/solidity/scripts/deploy.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this script used?

I think we probably need to pick:

  • script is unused and can be deleted
  • script is used/supported and needs some automated test to ensure it doesn't break from release to release

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading