- HTML / JS
- To spin up website either use liver server extension or using yarn call - "yarn http-server"
- NextJS / React and "raw" ethers
- NextJS & "webs3-react"
- NextJS & "react-moralis"
- NextJS & "web3Modal"
- NextJS & "useDapp"
forge init --force anvil forge test forge build forge create src/Counter.sol:Counter --private-key (Private-Key)
Find contract abi in out folder under contract name (Foundry)
since i used the counter.sol contract from foundry, I added setNumber, increment, and getNumber buttons
think this has something to do with
const provider = new ethers.providers.Web3Provider(window.ethereum);
vs.
const provider = new ethers.BrowswerProvider(window.ethereum);
yarn add browserify - this adds it to the project directory in the package.json file
yarn browserify index.js --standalone bundle -o ./dist/bundle.js (ParseError: 'import' and 'export' may appear only with 'sourceType: module')
would need to change things in html to reflect where the code sits