Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add step-by-step about how to enable claimability #1661

Open
wants to merge 2 commits into
base: testnet
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions claim_contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#
# Airdrop Claim Contracts

## Local
## Deployment

### Requisites
### Local

#### Requisites

- Foundry

### Run
#### Run

1. Run anvil in one terminal:
```
Expand All @@ -27,14 +29,14 @@
make approve-claimable TOKEN=<token-proxy-address> AIRDROP=<claimable-proxy-address> 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
Expand All @@ -51,3 +53,25 @@
```
make approve-claimable TOKEN=<token-proxy-address> AIRDROP=<claimable-proxy-address> PRIVATE_KEY=<sepolia-funded-distributor-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=<claims-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=<token-proxy-address> AIRDROP=<claimable-proxy-address> PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
```
5. Unpause the claimable contract
```
make unpause RPC_URL=http://localhost:8545 PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a AIRDROP=<claimable-proxy-address>
```