-
npm init --yes -
npm install --save-dev hardhat -
add
node_modulesand.envto.gitignorefile -
npx hardhat-> sample project -
in hardhat.config.js -> add mumbai network -> use alchemy rpc + metamask private key
-
npx hardhat run scripts/sample-script.js-> errors bcERR_INVALID_URL(didn't save alchemy url string correctly) -> fix -
npx hardhat run scripts/sample-script.js-> error due toINSUFFICIENT_FUNDS(no mumbai MATIC) -
get mumbai testnet eth from https://mumbaifaucet.com/
-
npx hardhat run scripts/sample-script.js-> deploys successfully and logs the contract address to console -
Check your address (0xa41B6af0e5a3611E3694eE14EcEFeA85AD0cCADD) on https://mumbai.polygonscan.com/
-
Write a script to interact with your contract ->
scripts/greet.js
This repository was archived by the owner on Feb 19, 2025. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 12
A guide for coding and deploying a basic Polygon (MATIC) smart contract!
alchemyplatform/polygon-smart-contract-tutorial
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A guide for coding and deploying a basic Polygon (MATIC) smart contract!
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published