-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(claim_contracts): update README #1620
Open
ManuelBilbao
wants to merge
3
commits into
yetanotherco:testnet
Choose a base branch
from
ManuelBilbao:claim_improve_readme
base: testnet
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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=<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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify that deployer must be a CREATE2 deterministic deploy factory |
||
- `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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The json file includes claimSupplierPrivateKey. Should we have it? |
||
|
||
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should the salt be generated?