This repository contains a straightforward Ethereum smart contract developed in Solidity, tested using TypeScript, and equipped with a minimalistic frontend to facilitate user interaction. The smart contract enables users to create an account with multiple owners. To make a withdrawal, an owner must initiate a request for approval, and all other owners must grant their consent before the withdrawal can proceed.
- Account creation with multiple owners.
- Withdrawal requests require approval from all owners.
- A simple web-based frontend for interacting with the contract.
Follow these steps to set up and use the smart contract locally:
- Clone this repository to your local machine
git clone https://github.com/AnonC0DER/decentralized-bank-account.git
- Install the necessary dependencies
npm install
- Launch a local Ethereum node using Hardhat
npx hardhat node
- Install the live server extension in your IDE and run the HTML frontend
- Install MetaMask extension in your browser
- Install the MetaMask extension in your browser. Import several Hardhat test accounts into MetaMask using their private keys
- Now, you should be able to create accounts using the frontend
To run the TypeScript tests for the smart contract, use the following command:
npx hardhat test