Skip to content

Commit 3a3b5cd

Browse files
authored
Pull changes from testnet into staging (#1681)
2 parents 96d1d17 + f9515b0 commit 3a3b5cd

File tree

21 files changed

+892658
-8344
lines changed

21 files changed

+892658
-8344
lines changed

claim_contracts/Makefile

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ help: ## 📚 Show help for each of the Makefile recipes
77
# Deployments
88

99
RPC_URL?=http://localhost:8545
10-
PRIVATE_KEY?=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a
10+
DEPLOYER_PRIVATE_KEY?=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a
1111
CONFIG?=example
1212
deploy-token: ## 🚀 Deploy the token contract
1313
cd script && \
1414
forge script DeployAlignedToken.s.sol \
1515
--sig "run(string)" \
1616
$(CONFIG) \
17-
--private-key $(PRIVATE_KEY) \
17+
--private-key $(DEPLOYER_PRIVATE_KEY) \
1818
--rpc-url $(RPC_URL) \
1919
--broadcast \
2020
--verbosity 3
@@ -23,7 +23,7 @@ deploy-token-testnet: ## 🚀 Deploy the token contract
2323
cd script && \
2424
forge script DeployAlignedToken.s.sol \
2525
--sig "run(string)" sepolia
26-
--private-key $(PRIVATE_KEY) \
26+
--private-key $(DEPLOYER_PRIVATE_KEY) \
2727
--rpc-url $(RPC_URL) \
2828
--broadcast \
2929
--verbosity 3
@@ -42,15 +42,15 @@ deploy-claimable-local: ## 🚀 Deploy the airdrop contract in localnet
4242
cd script && \
4343
forge script DeployClaimableAirdrop.s.sol \
4444
--sig "run(string)" example \
45-
--private-key $(PRIVATE_KEY) \
45+
--private-key $(DEPLOYER_PRIVATE_KEY) \
4646
--rpc-url http://localhost:8545 \
4747
--broadcast
4848

4949
deploy-claimable-testnet: ## 🚀 Deploy the airdrop contract in Sepolia
5050
cd script && \
5151
forge script DeployClaimableAirdrop.s.sol \
5252
--sig "run(string)" sepolia \
53-
--private-key $(PRIVATE_KEY) \
53+
--private-key $(DEPLOYER_PRIVATE_KEY) \
5454
--rpc-url $(RPC_URL) \
5555
--broadcast \
5656
--verify \
@@ -85,6 +85,9 @@ upgrade-token: ## 🚀 Upgrade the token contract
8585
# Miscellaneous
8686

8787
DISTRIBUTOR_PRIVATE_KEY?=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
88+
OWNER_PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a
89+
AIRDROP=0xBC9129Dc0487fc2E169941C75aABC539f208fb01
90+
TOKEN=0x2E983A1Ba5e8b38AAAeC4B440B9dDcFBf72E15d1
8891

8992
approve-claimable: ## 🚀 Approve the ClaimableAirdrop contract to spend the token
9093
cast send \
@@ -96,7 +99,7 @@ approve-claimable: ## 🚀 Approve the ClaimableAirdrop contract to spend the to
9699
claimable-update-root: ## 🚀 Update the merkle root of the ClaimableAirdrop contract
97100
cast send \
98101
--rpc-url $(RPC_URL) \
99-
--private-key $(PRIVATE_KEY) \
102+
--private-key $(OWNER_PRIVATE_KEY) \
100103
$(AIRDROP) \
101104
'updateMerkleRoot(bytes32)' $(MERKLE_ROOT)
102105

@@ -109,7 +112,7 @@ claimable-get-root: ## 🚀 Get the merkle root of the ClaimableAirdrop contract
109112
claimable-update-timestamp: ## 🚀 Update the limit timestamp of the ClaimableAirdrop contract
110113
cast send \
111114
--rpc-url $(RPC_URL) \
112-
--private-key $(PRIVATE_KEY) \
115+
--private-key $(OWNER_PRIVATE_KEY) \
113116
$(AIRDROP) \
114117
'extendClaimPeriod(uint256)' $(TIMESTAMP)
115118

@@ -119,16 +122,16 @@ claimable-get-timestamp: ## 🚀 Get the limit timestamp of the ClaimableAirdrop
119122
$(AIRDROP) \
120123
"limitTimestampToClaim()(uint256)"
121124

122-
pause:
125+
claimable-pause:
123126
cast send \
124127
--rpc-url $(RPC_URL) \
125-
--private-key $(PRIVATE_KEY) \
128+
--private-key $(OWNER_PRIVATE_KEY) \
126129
$(AIRDROP) "pause()"
127130

128-
unpause:
131+
claimable-unpause:
129132
cast send \
130133
--rpc-url $(RPC_URL) \
131-
--private-key $(PRIVATE_KEY) \
134+
--private-key $(OWNER_PRIVATE_KEY) \
132135
$(AIRDROP) "unpause()"
133136

134137
# Upgrades
@@ -164,3 +167,6 @@ OWNER_PRIVATE_KEY?=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f
164167
test-airdrop:
165168
cast call $(AIRDROP) "paused()(bool)" --rpc-url $(RPC_URL)
166169
cast call $(AIRDROP) "owner()(address)" --rpc-url $(RPC_URL)
170+
171+
# Requires MERKLE_ROOT, TIMESTAMP
172+
deploy-example: deploy-token deploy-claimable-local claimable-update-root claimable-update-timestamp approve-claimable claimable-unpause

claim_contracts/README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
make deploy-claimable-local
2323
```
2424
5. Write down the claimable contract proxy address that is printed in the console output.
25-
6. Approve the claimable contract to spend the token from the distributor
26-
```
27-
make approve-claimable TOKEN=<token-proxy-address> AIRDROP=<claimable-proxy-address> PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
28-
```
2925

3026
## Testnet (Sepolia)
3127

@@ -44,10 +40,34 @@
4440
3. Write down the `token-proxy-address` that is printed in the console output. Do this in the `config.sepolia.json` file, under the `tokenProxy` key.
4541
4. Deploy the claimable contract
4642
```
47-
make deploy-claimable-testnet RPC_URL=<sepolia-rpc-url> PRIVATE_KEY=<sepolia-funded-account-private-key> ETHERSCAN_API_KEY=<etherscan-api-key>
43+
make deploy-claimable-testnet RPC_URL=<sepolia-rpc-url> DEPLOYER_PRIVATE_KEY=<sepolia-funded-account-private-key> ETHERSCAN_API_KEY=<etherscan-api-key>
4844
```
4945
5. Write down the `claimable-proxy-address` that is printed in the console output.
50-
6. Approve the claimable contract to spend the token from the distributor
46+
47+
## Enabling Claimability
48+
49+
### Local
50+
51+
1. Deploy the claimable contract as explained above.
52+
2. Set the correct merkle root
53+
```
54+
make claimable-update-root MERKLE_ROOT=<claims-merkle-root>
55+
```
56+
3. Set the correct claim time limit
5157
```
52-
make approve-claimable TOKEN=<token-proxy-address> AIRDROP=<claimable-proxy-address> PRIVATE_KEY=<sepolia-funded-distributor-private-key>
58+
make claimable-update-timestamp TIMESTAMP=2733427549
5359
```
60+
4. Approve the claimable contract to spend the token from the distributor
61+
```
62+
make approve-claimable
63+
```
64+
5. Unpause the claimable contract
65+
```
66+
make claimable-unpause
67+
```
68+
69+
or
70+
71+
```
72+
make deploy-example MERKLE_ROOT=<claims-merkle-root> TIMESTAMP=2733427549
73+
```

0 commit comments

Comments
 (0)