A webpage that interact with a smart contract on a real live Ethereum testnet on the internet.
- Download and Install MetaMask.
- Click Ethereum Mainnet at the top. Change to the Goerli Testnet and get a copy of the account's public address on your Metamask Wallet.
- Request some Goerli Testnet Ether from a faucet loaded into your Metamask Wallet.
- Open
index.html
in your code editor. - Serve the webpage via terminal/command prompt from the directory that has
index.html
in it using a HTTP lite-server/live server. - Got your web server up? Go to http://127.0.0.1:3000/ or http://localhost:3000/ in your browser to see the page!
- Test the functions and approve the transactions as needed through Metamask. Note block times are ~15 seconds... so wait a bit to read the state of the blockchain
- See the contract and transaction info via https://goerli.etherscan.io/address/0xd615b39c35ac7128e7554e62a0aa3b7ac99e04e0
- Open the console in the browser to see the magic happen as you press those buttons.