|
| 1 | +.PHONY: help deploy-aligned-token-implementation deploy-aligned-token-proxy deploy-claimable-airdrop-implementation deploy-claimable-airdrop-proxy upgrade-aligned-token-implementation aligned-token-proxy-deploy-data aligned-token-init-data aligned-token-upgrade-data aligned-token-create2 aligned-token-proxy-create2 |
| 2 | + |
| 3 | +RPC_URL?=http://localhost:8545 |
| 4 | +PRIVATE_KEY?=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 |
| 5 | +VERSION?=1 |
| 6 | + |
| 7 | +help: ## 📚 Show help for each of the Makefile recipes |
| 8 | + @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
| 9 | + |
| 10 | +# Deployments |
| 11 | + |
| 12 | +MINT?="1 ether" |
| 13 | +OWNER?=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 |
| 14 | +BENEFICIARY1?=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 |
| 15 | +BENEFICIARY2?=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC |
| 16 | +BENEFICIARY3?=0x90F79bf6EB2c4f870365E785982E1f101E93b906 |
| 17 | + |
| 18 | +deploy-aligned-token-implementation: ## 🚀 Deploy the AlignedToken implementation contract |
| 19 | + cd script/aligned_token && \ |
| 20 | + forge script DeployAlignedTokenImplementation.s.sol \ |
| 21 | + --sig "run(uint256)" \ |
| 22 | + $(VERSION) \ |
| 23 | + --rpc-url $(RPC_URL) \ |
| 24 | + --private-key $(PRIVATE_KEY) \ |
| 25 | + --broadcast |
| 26 | + |
| 27 | +deploy-aligned-token-proxy: ## 🚀 Deploy the AlignedToken proxy contract |
| 28 | + cd script/aligned_token && \ |
| 29 | + forge script DeployAlignedTokenProxy.s.sol \ |
| 30 | + --sig "run(address,uint256,address,address,address,address,uint256)" \ |
| 31 | + $(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) \ |
| 32 | + --rpc-url $(RPC_URL) \ |
| 33 | + --private-key $(PRIVATE_KEY) \ |
| 34 | + --broadcast |
| 35 | + |
| 36 | +deploy-claimable-airdrop-implementation: ## 🚀 Deploy the ClaimableAirdrop implementation contract |
| 37 | + cd script/claimable_airdrop && \ |
| 38 | + forge script DeployClaimableAirdropImplementation.s.sol \ |
| 39 | + --sig "run(uint256)" \ |
| 40 | + $(VERSION) \ |
| 41 | + --rpc-url $(RPC_URL) \ |
| 42 | + --private-key $(PRIVATE_KEY) \ |
| 43 | + --broadcast |
| 44 | + |
| 45 | +deploy-claimable-airdrop-proxy: ## 🚀 Deploy the ClaimableAirdrop proxy contract |
| 46 | + cd script/claimable_airdrop && \ |
| 47 | + forge script DeployClaimableAirdropProxy.s.sol \ |
| 48 | + --sig "run(address,uint256,address,address,address,address)" \ |
| 49 | + $(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) \ |
| 50 | + --rpc-url $(RPC_URL) \ |
| 51 | + --private-key $(PRIVATE_KEY) \ |
| 52 | + --broadcast |
| 53 | + |
| 54 | +# Upgrades |
| 55 | + |
| 56 | +upgrade-aligned-token-implementation: ## 🚀 Upgrade the AlignedToken implementation contract |
| 57 | + cd script/aligned_token && \ |
| 58 | + forge script UpgradeAlignedTokenImplementation.s.sol \ |
| 59 | + --sig "function run(address,address,uint256,address,address,address,address,uint256)" \ |
| 60 | + $(PROXY) $(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT)\ |
| 61 | + --rpc-url $(RPC_URL) \ |
| 62 | + --private-key $(PRIVATE_KEY) \ |
| 63 | + --broadcast |
| 64 | + |
| 65 | +# Deployment Data |
| 66 | + |
| 67 | +aligned-token-proxy-deploy-data: ## 🚀 Generate the deployment data for the AlignedToken proxy contract |
| 68 | + cd script/aligned_token && \ |
| 69 | + forge script AlignedTokenProxyDeploymentData.s.sol \ |
| 70 | + --sig "run(address,uint256, address,address,address,address,uint256)" \ |
| 71 | + $(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) |
| 72 | + |
| 73 | +aligned-token-init-data: ## 🚀 Generate the init data for the AlignedToken proxy contract |
| 74 | + cd script/aligned_token && \ |
| 75 | + forge script AlignedTokenInitData.s.sol \ |
| 76 | + --sig "run(address,uint256, address,address,address,address,uint256)" \ |
| 77 | + $(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) |
| 78 | + |
| 79 | +aligned-token-upgrade-data: ## 🚀 Generate the upgrade data for the AlignedToken proxy contract |
| 80 | + cd script/aligned_token && \ |
| 81 | + forge script AlignedTokenUpgradeData.s.sol \ |
| 82 | + --sig "run(address,uint256, address,address,address,address,uint256)" \ |
| 83 | + $(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) |
| 84 | + |
| 85 | +SALT?=0x0000000000000000000000000000000000000000000000000000000000000000 |
| 86 | +# Sepolia Safe CreateCall contract. |
| 87 | +DEPLOYER?=0x9b35Af71d77eaf8d7e40252370304687390A1A52 |
| 88 | + |
| 89 | +aligned-token-create2: ## 🚀 Generate the create2 data for the AlignedToken proxy contract |
| 90 | + cd script/aligned_token && \ |
| 91 | + forge script AlignedTokenCreate2.s.sol \ |
| 92 | + --sig "run(uint256,bytes32,address)" \ |
| 93 | + $(VERSION) $(SALT) $(DEPLOYER) |
| 94 | + |
| 95 | +aligned-token-proxy-create2: ## 🚀 Generate the create2 data for the AlignedToken proxy contract |
| 96 | + cd script/aligned_token && \ |
| 97 | + forge script AlignedTokenCreate2.s.sol \ |
| 98 | + --sig "run(address,uint256, address,address,address,address,uint256,bytes32,address)" \ |
| 99 | + $(IMPLEMENTATION) $(VERSION) $(OWNER) $(BENEFICIARY1) $(BENEFICIARY2) $(BENEFICIARY3) $(MINT) $(SALT) $(DEPLOYER |
| 100 | + |
| 101 | +# Test targets |
| 102 | + |
| 103 | +test-token: ## 🚀 Test the AlignedToken contract |
| 104 | + cast call $(ADDRESS) "name()(string)" --rpc-url http://localhost:8545 |
| 105 | + cast call $(ADDRESS) "totalSupply()(uint256)" --rpc-url http://localhost:8545 |
| 106 | + |
| 107 | +test-airdrop: ## 🚀 Test the ClaimableAirdrop contract |
| 108 | + cast call $(ADDRESS) "hasClaimed(address)(bool)" --rpc-url http://localhost:8545 |
0 commit comments