A Flutter web application that enables decentralized auctions for device control using Ethereum smart contracts.
- Clone the repository:
git clone https://github.com/MuffinsThaCat/DADI.git
cd DADI- Install Node.js dependencies:
npm install- Install Flutter dependencies:
flutter pub get- Start a local Hardhat node:
npx hardhat node- In a new terminal, deploy the smart contract:
npx hardhat run --network localhost scripts/deploy.js- Configure MetaMask:
- Add a new network with:
- Network Name: Hardhat Local
- RPC URL: http://127.0.0.1:8545
- Chain ID: 31337
- Import a test account using the private key from the Hardhat node output
- Add a new network with:
- Start the Flutter web app:
flutter run -d web-server --web-port=3001- Open your browser and navigate to:
http://localhost:3001
- Connect MetaMask when prompted by the app
- Create auctions for device control
- Place bids on active auctions
- View auction history and status
- Control devices during won time slots
- Real-time updates using blockchain events
- Smart Contract:
contracts/DADIAuction.sol - Flutter App:
lib/directory- Screens:
lib/screens/ - Services:
lib/services/ - Contract Bindings:
lib/contracts/
- Screens:
Run smart contract tests:
npx hardhat testRun Flutter tests:
flutter test