Skip to content

A repository with a simple official example that uses the alchemy SDK

License

Notifications You must be signed in to change notification settings

thadouk/ethereum-alchemy-tutorials

Repository files navigation

ethereum-alchemy-tutorials

A repository with a simple official example that uses the alchemy SDK

How to use the project

Copy the .env_ file to .env and fill in with your Alchemy account details for Goerli alongside with your ethereum private key.

# Alchemy API key
# API_KEY = ""

# Alchemy API full url
# API_URL = ""

# Ethereum account private key
# PRIVATE_KEY = ""

# Etherscan api key, used for publishing contracts
# ETHERSCAN_API_KEY = ""

# Contract address to interact with. Update after deployment
# CONTRACT_ADDRESS = ""

Setup

npm init
npm install --save-dev hardhat
npx hardhat
npm install dotenv --save
npm install --save-dev @nomiclabs/hardhat-ethers "ethers@^5.0.0"

Deploy and other commands

# Runner script:
sh scripts/run_goerli_deployment.sh

# Compile
npx hardhat compile

# Deploy
npx hardhat run scripts/deploy.js --network goerli

# Etherscan publish
npm install --save-dev @nomiclabs/hardhat-etherscan
npx hardhat verify --network goerli DEPLOYED_CONTRACT_ADDRESS 'Hello World!'

# Run interact script
npx hardhat run scripts/interact.js

About

A repository with a simple official example that uses the alchemy SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published