How akm4033/complete-example-dapp works
This is a small token-minting dapp: users connect a browser wallet, view token supply, submit a paid mint transaction, and inspect recent purchase events. The React app assembles these views around a contract instance; the components perform contract reads, writes, and event queries. The repository also includes a Hardhat deployment script and Moonbase Alpha configuration. The Solidity contract and ABI were not excerpted, so their internal behavior is not inferred; edges reflect only the shown frontend calls, deployment code, and provider setup.
Main entry points: App.js Dapp shell · MintableERC20.sol Mintable token · index.js Provider setup · SupplyComponent.js Supply display
Components 12
Dapp frontend
- Dapp shell
frontend/src/App.js - Wallet controls
frontend/src/App.js - Supply display
frontend/src/SupplyComponent.js - Mint purchase
frontend/src/MintingComponent.js - Purchase history
frontend/src/PurchaseOccurredEvents.js - Provider setup
frontend/src/index.js
Token and chain
- Contract ABI
frontend/src/MintableERC20.json - Mintable token
contracts/MintableERC20.sol - Moonbase Alpha RPC
Deployment
- Token deployer
scripts/deploy.js - Network config
hardhat.config.js
Other components
- Token user
Connections 13
- Token user → Dapp shell: uses
frontend/src/App.js - Dapp shell → Wallet controls: renders
frontend/src/App.js - Dapp shell → Supply display: renders
frontend/src/App.js - Dapp shell → Mint purchase: renders
frontend/src/App.js - Dapp shell → Purchase history: renders
frontend/src/App.js - Dapp shell → Contract ABI: loads ABI
frontend/src/App.js - Dapp shell → Mintable token: creates contract client
frontend/src/App.js - Supply display → Mintable token: reads supply
frontend/src/SupplyComponent.js - Mint purchase → Mintable token: calls purchaseMint
frontend/src/MintingComponent.js - Purchase history → Mintable token: queries purchase events
frontend/src/PurchaseOccurredEvents.js - Provider setup → Dapp shell: renders in provider
frontend/src/index.js - Provider setup → Moonbase Alpha RPC: configures read RPC
frontend/src/index.js - Token deployer → Mintable token: deploys
scripts/deploy.js