From 45e92949ce73ec701d211b0893dfde97ab08378b Mon Sep 17 00:00:00 2001 From: ilitteri Date: Thu, 19 Dec 2024 13:49:26 -0300 Subject: [PATCH] Add step-by-step doc to enable claiming --- claim_contracts/README.md | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/claim_contracts/README.md b/claim_contracts/README.md index 5716560d0..49fb4b037 100644 --- a/claim_contracts/README.md +++ b/claim_contracts/README.md @@ -1,12 +1,14 @@ -# +# Airdrop Claim Contracts -## Local +## Deployment -### Requisites +### Local + +#### Requisites - Foundry -### Run +#### Run 1. Run anvil in one terminal: ``` @@ -27,14 +29,14 @@ make approve-claimable TOKEN= AIRDROP= PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d ``` -## Testnet (Sepolia) +### Testnet (Sepolia) Deployment -### Requisites +#### Requisites - Foundry - Etherscan API key -### Run +#### Run 1. Create a file `script-config/config.sepolia.json` following the example in `script-config/config.sepolia.example.json`. 2. Deploy the token @@ -51,3 +53,25 @@ ``` make approve-claimable TOKEN= AIRDROP= PRIVATE_KEY= ``` + +## Enabling Claimability + +### Local + +1. Deploy the claimable contract as explained above. +2. Set the correct merkle root + ``` + make claimable-update-root RPC_URL=http://localhost:8545 PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a MERKLE_ROOT= + ``` +3. Set the correct claim time limit + ``` + make claimable-update-timestamp RPC_URL=http://localhost:8545 PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a TIMESTAMP=2733427549 + ``` +4. Approve the claimable contract to spend the token from the distributor + ``` + make approve-claimable RPC_URL=http://localhost:8545 TOKEN= AIRDROP= PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d + ``` +5. Unpause the claimable contract + ``` + make unpause RPC_URL=http://localhost:8545 PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a AIRDROP= + ```