From b4e6c007871ed834fdbac3f2124ab04a9c70c5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20I=C3=B1aki=20Bilbao?= Date: Mon, 16 Dec 2024 13:13:21 -0300 Subject: [PATCH 1/2] Improve README --- claim_contracts/README.md | 46 +++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/claim_contracts/README.md b/claim_contracts/README.md index e9838808ef..9f4bd6a68c 100644 --- a/claim_contracts/README.md +++ b/claim_contracts/README.md @@ -6,31 +6,35 @@ ## Local deploying -To deploy the contracts, set the following environment variables: +### Token -- `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). +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. -- `CLAIM_TIME_LIMIT`: The claim time limit timestamp. -- `MERKLE_ROOT`: The merkle root of all valid token claims. -Example: +Then run the script: + ``` -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 deploy-token ``` -Then run the following script: +> [!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 +> ``` -``` -./deployClaim.sh -``` +### Airdrop + +TBD From 8f0a6261c3a8b24a8f8dd19c81c88c4743cb0ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20I=C3=B1aki=20Bilbao?= Date: Mon, 16 Dec 2024 13:19:26 -0300 Subject: [PATCH 2/2] Add deps target --- claim_contracts/Makefile | 5 ++++- claim_contracts/README.md | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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 9f4bd6a68c..a6735b8a8e 100644 --- a/claim_contracts/README.md +++ b/claim_contracts/README.md @@ -6,6 +6,12 @@ ## Local deploying +Install the dependencies: + +``` +make deps +``` + ### Token To deploy the token, modify the file `script-config/config.example.json` and set the following values: