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

Update the Deploy a Smart Contract page #1575

Closed
Ginowine opened this issue May 26, 2024 · 0 comments · Fixed by #1580
Closed

Update the Deploy a Smart Contract page #1575

Ginowine opened this issue May 26, 2024 · 0 comments · Fixed by #1580
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Ginowine
Copy link
Contributor

Describe the solution you'd like

  1. The current "npx hardhat" command does not include the "Create a basic sample project" option as used on this page. Instead, it presents the following options:
  • Create a JavaScript project
  • Create a TypeScript project
  • Create a TypeScript project (with Viem)
  • Create an empty hardhat.config.js

The instruction to "Select 'Create a basic sample project'" should be replaced with one of the above options in step 5 of the process.

  1. Additionally, it would be beneficial to include instructions on obtaining YOUR PRIVATE KEY, as demonstrated on this page.

  2. The current deploy.js script produces the following error:

TypeError: counter.deployed is not a function

Fix:

Commenting out await counter.deployed() allows the contract to be deployed, but to an undefined address. Using await counter.getAddress() in the console log statement correctly displays the deployed address. We should replace counter.address with await counter.getAddress() to properly display the address.

@Ginowine Ginowine added the documentation Improvements or additions to documentation label May 26, 2024
@Ginowine Ginowine self-assigned this May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant