The whole process of launching the Three Heroes vs. Lu Bu web3 game project

The project is a good example related to learning and is open source. The original project was to connect to the goerli network, but I modified it into a project that can connect to the ganache network, making it easier to start.

Smart contract part

Enter the file `hardhat.config.js` and add a wallet private key

 2. Execute npm install

3. Test contract npx hardhat test

4. Deploy to ganache test network

npx hardhat run scripts/deploy.js --network ganache

Run the front end and enter the front end directory cd game

1. Install dependencies yarn install

2. Edit the file `.env` and fill in the deployed contract address.

 3. Modify related files in index.js

3. Start the front-end yarn serve

If you need the source code, please send me a private message

Guess you like

Origin blog.csdn.net/2302_77339802/article/details/135423487