This is an Escrow Dapp built with Hardhat.
Steps:
- Buyer User creates a New Contract with an Arbiter User and a Beneficiary User and deposits some ETH.
- Beneficiary User sends the product bought from the Buyer user.
- Arbiter User confirms and approves the Contract. Only the Arbiter User can do it.
- Dapp finally sends ETH to the Beneficiary User.
Each user logged in can see his contracts and/or the contracts to approve.
Here you can see and example of transactions on the contract.
There are three top-level folders:
/app
- contains the front-end application/contracts
- contains the solidity contract/tests
- contains tests for the solidity contract
Install dependencies in the top-level directory with npm install
.
After you have installed hardhat locally, you can use commands to test and compile the contracts, among other things. To learn more about these commands run npx hardhat help
.
Compile the contracts using npx hardhat compile
. The artifacts will be placed in the /app
folder, which will make it available to the front-end. This path configuration can be found in the hardhat.config.js
file.
cd
into the /app
directory and run npm install
To run the front-end application run npm start
from the /app
directory. Open http://localhost:3000 to view it in your browser.