diff --git a/claim_contracts/Makefile b/claim_contracts/Makefile index 20252fe0cd..b174e5303c 100644 --- a/claim_contracts/Makefile +++ b/claim_contracts/Makefile @@ -1,9 +1,12 @@ -.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 +.PHONY: help deps 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 help: ## 📚 Show help for each of the Makefile recipes @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +deps: ## 📄 Install contract dependencies + forge install + # Deployments RPC_URL?=http://localhost:8545 diff --git a/claim_contracts/README.md b/claim_contracts/README.md index e9838808ef..a6735b8a8e 100644 --- a/claim_contracts/README.md +++ b/claim_contracts/README.md @@ -6,31 +6,41 @@ ## Local deploying -To deploy the contracts, set the following environment variables: +Install the dependencies: -- `DEPLOYER_PRIVATE_KEY`: The private key of the account that's going to deploy the contracts. -- `SAFE_ADDRESS`: The address of the safe that's going to own the Proxy admin that in turn owns the token and airdrop contracts. -- `OWNER1_ADDRESS`, `OWNER2_ADDRESS`, and `OWNER3_ADDRESS`: The three owners of the token. -- `MINT_AMOUNT`: The amount to mint to each account (the contract actually supports minting different amounts of the token to each owner, but in the deploy script we simplified it). -- `RPC_URL`: The url of the network to deploy to. -- `CLAIM_TIME_LIMIT`: The claim time limit timestamp. -- `MERKLE_ROOT`: The merkle root of all valid token claims. - -Example: ``` -export DEPLOYER_PRIVATE_KEY= -export SAFE_ADDRESS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -export OWNER1_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 -export OWNER2_ADDRESS=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC -export OWNER3_ADDRESS=0x90F79bf6EB2c4f870365E785982E1f101E93b906 -export MINT_AMOUNT=100 -export RPC_URL=http://localhost:8545 -export CLAIM_TIME_LIMIT=2733247661 -export MERKLE_ROOT=0x90076b5fb9a6c81d9fce83dfd51760987b8c49e7c861ea25b328e6e63d2cd3df +make deps ``` -Then run the following script: +### Token + +To deploy the token, modify the file `script-config/config.example.json` and set the following values: + +- `safe`: The address of the safe that's going to own the Proxy admin that in turn owns the token and airdrop contracts. +- `salt`: The salt used to generate CREATE2 addresses. +- `deployer`: The address of the account that's going to deploy the contracts. +- `foundation`: The address of the Aligned Foundation account. +- `claimSupplier`: The address of the account that's going to supply the tokens. +- `limitTimestampToClaim`: The claim time limit timestamp. +- `claimMerkleRoot`: The merkle root of all valid token claims. + +Also, set the following environment variables: + +- `PRIVATE_KEY`: The private key of the account that's going to deploy the contracts. This MUST be the same account as the one in `deployer`. +- `RPC_URL`: The url of the network to deploy to. + +Then run the script: ``` -./deployClaim.sh +make deploy-token ``` + +> [!TIP] +> You can create another config file on `script-config/config.custom_name.json` and run the script with +> ``` +> make deploy-token CONFIG=custom_name +> ``` + +### Airdrop + +TBD