From 5126b3c30a878a11591cd643f904cb1b392223b6 Mon Sep 17 00:00:00 2001 From: Alexander Biryukov Date: Thu, 3 Oct 2024 00:03:14 +0400 Subject: [PATCH] README.md --- README.md | 69 ++++++++----------------------------------------------- 1 file changed, 10 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 9265b45..d56fc19 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,17 @@ -## Foundry +## MerkleAirdrop -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** +A merkle tree based contract for airdropping ETH. -Foundry consists of: +### Usage -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. +Use the `01-generate-merkle-tree.ts` script as an example to generate the merkle tree based on -## Documentation +- recipient address +- amount of ETH in wei for that recipient -https://book.getfoundry.sh/ +The script produces a `tree.json` file, which can later be used in a browser to generate for each individual claimer: -## Usage +- amount of ETH to claim +- merkle proof -### Build - -```shell -$ forge build -``` - -### Test - -```shell -$ forge test -``` - -### Format - -```shell -$ forge fmt -``` - -### Gas Snapshots - -```shell -$ forge snapshot -``` - -### Anvil - -```shell -$ anvil -``` - -### Deploy - -```shell -$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key -``` - -### Cast - -```shell -$ cast -``` - -### Help - -```shell -$ forge --help -$ anvil --help -$ cast --help -``` +The `MerkleAirdrop` contract has a `claim` function, which acceepts these 2 parameters (amount and merkle proof) and can be called by any recipient to get their airdrop.