Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

alchemyplatform/polygon-smart-contract-tutorial

Repository files navigation

  1. npm init --yes

  2. npm install --save-dev hardhat

  3. add node_modules and .env to .gitignore file

  4. npx hardhat -> sample project

  5. in hardhat.config.js -> add mumbai network -> use alchemy rpc + metamask private key

  6. npx hardhat run scripts/sample-script.js -> errors bc ERR_INVALID_URL (didn't save alchemy url string correctly) -> fix

  7. npx hardhat run scripts/sample-script.js -> error due to INSUFFICIENT_FUNDS (no mumbai MATIC)

  8. get mumbai testnet eth from https://mumbaifaucet.com/

  9. npx hardhat run scripts/sample-script.js -> deploys successfully and logs the contract address to console

  10. Check your address (0xa41B6af0e5a3611E3694eE14EcEFeA85AD0cCADD) on https://mumbai.polygonscan.com/

  11. Write a script to interact with your contract -> scripts/greet.js

About

A guide for coding and deploying a basic Polygon (MATIC) smart contract!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published