A package to deploy your react app as a smart contract for use with a web3 browser.
AGPL-3.0 License
A package to deploy your react app as a smart contract for use with a web3 browser.
This project includes several Hardhat tasks to help you deploy, manage, and interact with your smart contract. Here's how to use them:
To build your react app you'll need to open your project in a new terminal window and run:
npm run build
This will create a build folder with the react app's code, which you will need to copy into the build folder of this project.
To deploy the WebContract or use an existing deployment:
npx hardhat deploy-contract [action] --network <network-name>
[action]
: Optional. Use 'redeploy' to force redeployment.--network
: Optional. The network to deploy to, if not specified, the hardhat VM network will be used.Note: After deployment, the contract address is automatically added to the package.json
file under the "contract"
key.
To upload large and unsupported assets to IPFS:
npx hardhat upload-ipfs-assets [action] --network <network-name>
[action]
: Optional. Use 'force' to force reupload.--network
: Optional. The network to upload to, if not specified, the hardhat VM network will be used.To write files to the smart contract:
npx hardhat write-to-contract [action] --network <network-name>
[action]
: Optional. Use 'force' to force rewrite.--network
: Optional. The network to write to, if not specified, the hardhat VM network will be used.To read files from the smart contract:
npx hardhat read-from-contract <fileName> --network <network-name>
<fileName>
: Required. The name of the file to read.--network
: Optional. The network to read from, if not specified, the hardhat VM network will be used.These instructions were generated by the Claude-3.5-sonnet model using Cursor AI. Please verify and adjust as needed for your specific project setup.