Skip to content

Commit 81461eb

Browse files
author
ilitteri
committed
Update Makefile
1 parent 7fa77ff commit 81461eb

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

claim_contracts/Makefile

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

99
RPC_URL?=http://localhost:8545
10-
PRIVATE_KEY?=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
11-
VERSION?=1
10+
PRIVATE_KEY?=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
11+
12+
deploy-all: ## 🚀 Deploy all contracts
13+
cd script && forge script DeployAll.s.sol --private-key $(PRIVATE_KEY) --rpc-url $(RPC_URL) --broadcast
1214

1315
MINT?="1 ether"
1416
OWNER?=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
@@ -20,38 +22,43 @@ CLAIM_TIME_LIMIT?=1632960000
2022
MERKLE_ROOT?=0x90076b5fb9a6c81d9fce83dfd51760987b8c49e7c861ea25b328e6e63d2cd3df
2123
TOKEN_OWNER?=$(OWNER)
2224

25+
deploy-proxy-admin: ## 🚀 Deploy the ProxyAdmin contract
26+
cd script/proxy_admin && \
27+
forge script DeployProxyAdmin.s.sol \
28+
--sig "run(address)" \
29+
$(OWNER) \
30+
--rpc-url $(RPC_URL) \
31+
--private-key $(PRIVATE_KEY) \
32+
--broadcast
33+
2334
deploy-aligned-token-implementation: ## 🚀 Deploy the AlignedToken implementation contract
2435
cd script/aligned_token && \
2536
forge script DeployAlignedTokenImplementation.s.sol \
26-
--sig "run(uint256)" \
27-
$(VERSION) \
2837
--rpc-url $(RPC_URL) \
2938
--private-key $(PRIVATE_KEY) \
3039
--broadcast
3140

3241
deploy-aligned-token-proxy: ## 🚀 Deploy the AlignedToken proxy contract
3342
cd script/aligned_token && \
3443
forge script DeployAlignedTokenProxy.s.sol \
35-
--sig "run(address,uint256,address,address,address,address,uint256)" \
36-
$(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) \
44+
--sig "run(address,address,address,address,address,address,uint256)" \
45+
$(PROXY_ADMIN) $(IMPLEMENTATION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) \
3746
--rpc-url $(RPC_URL) \
3847
--private-key $(PRIVATE_KEY) \
3948
--broadcast
4049

4150
deploy-claimable-airdrop-implementation: ## 🚀 Deploy the ClaimableAirdrop implementation contract
4251
cd script/claimable_airdrop && \
4352
forge script DeployClaimableAirdropImplementation.s.sol \
44-
--sig "run(uint256)" \
45-
$(VERSION) \
4653
--rpc-url $(RPC_URL) \
4754
--private-key $(PRIVATE_KEY) \
4855
--broadcast
4956

5057
deploy-claimable-airdrop-proxy: ## 🚀 Deploy the ClaimableAirdrop proxy contract
5158
cd script/claimable_airdrop && \
5259
forge script DeployClaimableAirdropProxy.s.sol \
53-
--sig "run(address,uint256,address,address,address,uint256,bytes32)" \
54-
$(IMPLEMENTATION) $(VERSION) $(OWNER) $(TOKEN) $(BENEFICIARY1) $(CLAIM_TIME_LIMIT) $(MERKLE_ROOT) \
60+
--sig "run(address,address,address,address,address,uint256,bytes32)" \
61+
$(PROXY_ADMIN) $(IMPLEMENTATION) $(OWNER) $(TOKEN) $(BENEFICIARY1) $(CLAIM_TIME_LIMIT) $(MERKLE_ROOT) \
5562
--rpc-url $(RPC_URL) \
5663
--private-key $(PRIVATE_KEY) \
5764
--broadcast
@@ -120,6 +127,7 @@ test-token:
120127
cast call $(ADDRESS) "name()(string)" --rpc-url $(RPC_URL)
121128
cast call $(ADDRESS) "totalSupply()(uint256)" --rpc-url $(RPC_URL)
122129

130+
# The following target needs the proof API running on localhost:4000
123131
AMOUNT_TO_CLAIM=$(shell curl -S -H "Content-Type: application/json" http://localhost:4000/api/proof/\$(CLAIMER) | jq -r .amount)
124132
MERKLE_PROOF_TO_CLAIM=$(shell curl -S -H "Content-Type: application/json" http://localhost:4000/api/proof/\$(CLAIMER) | jq .proof | tr -d '"\n ')
125133
test-claim:
@@ -128,3 +136,11 @@ test-claim:
128136
test-claimed:
129137
cast call $(AIRDROP) "hasClaimed(address)(bool)" $(CLAIMER) --rpc-url $(RPC_URL)
130138
cast balance --erc20 $(TOKEN) $(CLAIMER) --rpc-url $(RPC_URL)
139+
140+
OWNER_PRIVATE_KEY?=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
141+
142+
test-pause:
143+
cast send $(AIRDROP) --private-key $(OWNER_PRIVATE_KEY) "pause()" --rpc-url $(RPC_URL)
144+
145+
test-unpause:
146+
cast send $(AIRDROP) --private-key $(OWNER_PRIVATE_KEY) "unpause()" --rpc-url $(RPC_URL)

0 commit comments

Comments
 (0)