A full-stack application for interacting with the Ethereum blockchain via smart contracts.
- A contract for creating and updating a message on the Ethereum blockchain
- A contract for minting tokens, which allows the owner of the contract to send tokens to others and to read the token balances, and lets owners of the new tokens also send them to others
1.Read the greeting from the contract deployed to the blockchain 1.Update the greeting 1.Send the newly minted tokens from their address to another address
- Once someone has received tokens, allow them to also send their tokens to someone else
- Read the token balance from the contract deployed to the blockchain
The easiest way to test this is to use a test ETH network: this project is configured to work with Ropsten. You will also need an Infura project ID to interface with the ETH blockchain.
- Create an account with Infura.io if you don't already have one
- Create an API project on the Ethereum network
- Under "Keys" copy your project ID and put in your
.env
file under theINFURA_PROJECT_ID
variable - Add your wallet address to the "Allowlist Etherum Addresses"
- Update the
WALLET_PRIVATE_KEY
environment variable with your wallet's key (the same one used in the last step) - Run
npx hardhat run scripts/deploy.js --network ropsten
to deploy your smart contract. Take note of the contract address and save it to theREACT_APP_GREETER_CONTRACT_ADDRESS
environment variable.
You should now be able to see your smart contract on the Etherscan Ropsten Testnet Explorer by searching for the contract address.
Run yarn start
to interact with the contract from the React application.
Originally based on The Complete Guide to Full Stack Ethereum Development tutorial by Nader Dabit.