This Solidity smart contract implements a Vault, allowing users to deposit Ether as grants for specific beneficiaries. The contract facilitates the donation process, tracks grant details such as amounts and deadlines, and enables beneficiaries to claim their grants once the specified deadline is reached.
Before deploying the contract, ensure you have the following dependencies installed:
- Node.js
- Hardhat
- Clone this repository to your local machine:
git clone https://github.com/your-username/vault-contract.git
- Navigate to the project directory:
cd vault-contract
- Install the required npm packages:
npm install
-
Configure your Ethereum wallet provider in the
hardhat.config.js
file. -
Write your Vault contract in the
contracts
directory or use the provided contract. -
Compile the contracts:
npx hardhat compile
- Deploy the contract to the desired Ethereum network:
npx hardhat run scripts/deploy.js --network <network-name>
Replace <network-name>
with the desired network (e.g., rinkeby
, mainnet
).
Once the contract is deployed, users can interact with it through the following actions:
- Donate: Users can donate Ether to the vault, specifying the beneficiary and the duration of the grant.
- Claim Grant: Beneficiaries can claim their grants once the specified deadline is reached, and the grant becomes available for withdrawal.
If you encounter any issues or have questions about using the Vault contract, you can refer to the Solidity documentation, Hardhat documentation, or seek assistance from the Ethereum development community.
This project is licensed under the MIT License - see the LICENSE file for details.