|
1 | | -# |
| 1 | +# Aligned Token Claim Contracts |
2 | 2 |
|
3 | | -## Local |
| 3 | +## How to run locally |
4 | 4 |
|
5 | | -### Requisites |
6 | | - |
7 | | -- Foundry |
8 | | - |
9 | | -### Run |
| 5 | +> [!IMPORTANT] |
| 6 | +> Foundry must be installed and running. |
| 7 | +
|
| 8 | +1. Run `anvil` in one terminal. |
| 9 | +2. Get your local **foundation** and **token distributor** wallet addresses and write them down in the `claim_contracts/script-config/config.example.json` file. |
| 10 | +3. Run `make deploy-token-local DEPLOYER_PRIVATE_KEY=<deployer_private_key>` in another terminal. |
| 11 | +4. Write down the forge script's output (the addresses of the token proxy and its admin preferably). |
| 12 | +5. From the output of the previous step, complete the `claim_contracts/script-config/config.example.json` file with the token proxy address. |
| 13 | +6. Run `make deploy-claimable DEPLOYER_PRIVATE_KEY=<deployer_private_key>`. |
| 14 | +7. Write down the forge script's output (the addresses of the claimable proxy and its admin preferably). |
| 15 | +8. From the output of the previous step, complete the `claim_contracts/script-config/config.example.json` file with the claimable proxy address. |
| 16 | +9. Run `make claimable-update-root RPC_URL=http://localhost:8545 OWNER_PRIVATE_KEY=<foundation_private_key> AIRDROP=<claimable_proxy_address> MERKLE_ROOT=<merkle_root>`. |
| 17 | +10. Run `make claimable-update-timestamp RPC_URL=http://localhost:8545 OWNER_PRIVATE_KEY=<foundation_private_key> AIRDROP=<claimable_proxy_address> TIMESTAMP=2733427549`. |
| 18 | +11. Run `make approve-claimable RPC_URL=http://localhost:8545 DISTRIBUTOR_PRIVATE_KEY=<token_distributor_private_key> TOKEN=<token_proxy_address> AIRDROP=<claimable_proxy_address>`. |
| 19 | +12. Run `make claimable-unpause RPC_URL=http://localhost:8545 OWNER_PRIVATE_KEY=<foundation_private_key> AIRDROP=<claimable_proxy_address>`. |
10 | 20 |
|
11 | | -1. Run anvil in one terminal: |
12 | | - ``` |
13 | | - anvil |
14 | | - ``` |
15 | | -2. Deploy the token |
16 | | - ``` |
17 | | - make deploy-token |
18 | | - ``` |
19 | | -3. Write down the token proxy address that is printed in the console output. Do this in the `config.example.json` file, under the `tokenProxy` key. |
20 | | -4. Deploy the claimable contract |
21 | | - ``` |
22 | | - make deploy-claimable-local |
23 | | - ``` |
24 | | -5. Write down the claimable contract proxy address that is printed in the console output. |
| 21 | +> [!NOTE] |
| 22 | +> You can do the previous steps in one run with `make deploy-example MERKLE_ROOT=<merkle_root> TIMESTAMP=2733427549`. |
| 23 | +> Remember to write down the addresses of the proxies and their admins. |
25 | 24 |
|
26 | 25 | ## Testnet (Sepolia) |
27 | 26 |
|
|
56 | 55 | > - Step 3 must be done by the token distributor multisig as it is the one that has the tokens to be claimed. |
57 | 56 |
|
58 | 57 | > [!WARNING] |
| 58 | +> |
59 | 59 | > - Double-check the data you passing into the commands, any mistake can lead to undesired behavior. |
60 | 60 |
|
61 | 61 | 1. Update the merkle root |
|
0 commit comments