From 7005cbcced7149fa09708e0336eeeb92931b78ed Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 20 Aug 2024 21:28:41 +0900 Subject: [PATCH] docs: add env instruction --- scripts/foundry/arbos-upgrades/at-timestamp/README.md | 3 +++ scripts/foundry/contract-upgrades/1.2.1/README.md | 3 +++ scripts/foundry/contract-upgrades/2.1.0/README.md | 5 ++++- scripts/foundry/creator-upgrades/1.2.1/README.md | 3 +++ scripts/foundry/creator-upgrades/1.2.2/README.md | 3 +++ scripts/foundry/fast-confirm/README.md | 3 +++ scripts/foundry/stylus/setCacheManager/README.md | 3 +++ 7 files changed, 22 insertions(+), 1 deletion(-) diff --git a/scripts/foundry/arbos-upgrades/at-timestamp/README.md b/scripts/foundry/arbos-upgrades/at-timestamp/README.md index e29f2b4..b4172e7 100644 --- a/scripts/foundry/arbos-upgrades/at-timestamp/README.md +++ b/scripts/foundry/arbos-upgrades/at-timestamp/README.md @@ -11,6 +11,9 @@ forge script --sender $DEPLOYER --rpc-url $CHILD_CHAIN_RPC --broadcast --slow ./ ``` This would deploy the upgrade action. Update your .env file with the address of the upgrade action. +> [!CAUTION] +> The .env file must be in project root. + 2. Next step is to execute the ArbOs upgrade action. Assumption is that child chain UpgradeExecutor is the arbowner, and there is an EOA which has executor rights on the child chain UpgradeExecutor. Upgrade can be executed using `cast` CLI command (part of Foundry installation), using the owner account (the one with executor rights on child chain UpgradeExecutor) to send the transaction: ```bash (export $(cat .env | xargs) && cast send $CHILD_UPGRADE_EXECUTOR_ADDRESS "execute(address, bytes)" $UPGRADE_ACTION_ADDRESS $(cast calldata "perform()") --rpc-url $CHILD_CHAIN_RPC --account EXECUTOR) diff --git a/scripts/foundry/contract-upgrades/1.2.1/README.md b/scripts/foundry/contract-upgrades/1.2.1/README.md index 2ff9a1a..20d77a0 100644 --- a/scripts/foundry/contract-upgrades/1.2.1/README.md +++ b/scripts/foundry/contract-upgrades/1.2.1/README.md @@ -37,6 +37,9 @@ Please refers to the top [README](../../README.md) `Check Version and Upgrade Pa 1. Setup .env according to the example files, make sure you have everything correctly defined. The script do some sanity checks but not everything can be checked. +> [!CAUTION] +> The .env file must be in project root. + 2. (Skip this step if you can use the deployed instances of action contract) `DeployNitroContracts1Point2Point1UpgradeAction.s.sol` script deploys OSPs and ChallengeManager templates, blob reader and SequencerInbox template, and finally the upgrade action itself. It can be executed in this directory like this: ```bash diff --git a/scripts/foundry/contract-upgrades/2.1.0/README.md b/scripts/foundry/contract-upgrades/2.1.0/README.md index 1b14a34..75188f4 100644 --- a/scripts/foundry/contract-upgrades/2.1.0/README.md +++ b/scripts/foundry/contract-upgrades/2.1.0/README.md @@ -44,7 +44,10 @@ Also, expectation is that rollup being upgraded currently uses official ArbOS20 ## How to use it -1. Setup .env according to the example files, make sure you have everything correctly defined. The script will do some sanity checks but not everything can be checked. +1. Setup .env according to the example files, make sure you have everything correctly defined. The script will do some sanity checks but not everything can be checked. The .env file must be in project root for recent foundary versions. + +> [!CAUTION] +> The .env file must be in project root. 2. (Skip this step if you can use the deployed instances of action contract) `DeployNitroContracts2Point1Point0UpgradeActionScript.s.sol` script deploys templates, and upgrade action itself. It can be executed in this directory like this: diff --git a/scripts/foundry/creator-upgrades/1.2.1/README.md b/scripts/foundry/creator-upgrades/1.2.1/README.md index 18b1ab7..08184ba 100644 --- a/scripts/foundry/creator-upgrades/1.2.1/README.md +++ b/scripts/foundry/creator-upgrades/1.2.1/README.md @@ -5,6 +5,9 @@ This script is used to deploy new 1.2.1 templates (if not already deployed) and 1. Setup .env according to the example files, make sure you have everything correctly defined. The script do some sanity checks but not everything can be checked. Template addresses should be set to address zero if they're supposed to be deployed. If templates are already deployed, provide the respective addresses. +> [!CAUTION] +> The .env file must be in project root. + 2. `UpgradeCreatorTemplatesScript.s.sol` script deploys templates if necessary and updates the creators if possible. RollupCreator and BridgeCreator will be updated if `CREATOR_OWNER_IS_MULTISIG` is set to false and wallet running the script is the owner, otherwise the update calldatas will be generated and stored in `${root}/scripts/foundry/creator-upgrades1.2.1/output/${chainId}.json`. diff --git a/scripts/foundry/creator-upgrades/1.2.2/README.md b/scripts/foundry/creator-upgrades/1.2.2/README.md index 3579f9f..9919e72 100644 --- a/scripts/foundry/creator-upgrades/1.2.2/README.md +++ b/scripts/foundry/creator-upgrades/1.2.2/README.md @@ -6,6 +6,9 @@ This script is used to deploy new token bridge creator 1.2.2 logic contracts (L1 Prepare the .env file according to the templates. +> [!CAUTION] +> The .env file must be in project root. + Script can be simulated in this directory like this (note that you may need to create the output directory `mkdir -p output`): ```bash diff --git a/scripts/foundry/fast-confirm/README.md b/scripts/foundry/fast-confirm/README.md index 99d5e00..8867ddb 100644 --- a/scripts/foundry/fast-confirm/README.md +++ b/scripts/foundry/fast-confirm/README.md @@ -37,6 +37,9 @@ Please refer to the top [README](../../README.md) `Check Version and Upgrade Pat ## How to use it 1. Setup .env according to the example files, make sure your fast confirm committee is secure (it should match your DAS committee). See the previous section for predeployed instances of the action contract. If you need to deploy the action contract yourself, follow the steps below. +> [!CAUTION] +> The .env file must be in project root. + `DeployEnableFastConfirmAction.s.s.sol` script deploys `EnableFastConfirmAction` contract. It can be executed in this directory like this: ```bash forge script --sender $DEPLOYER --rpc-url $PARENT_CHAIN_RPC --broadcast --slow DeployEnableFastConfirmAction -vvv --verify diff --git a/scripts/foundry/stylus/setCacheManager/README.md b/scripts/foundry/stylus/setCacheManager/README.md index 27e4238..1250721 100644 --- a/scripts/foundry/stylus/setCacheManager/README.md +++ b/scripts/foundry/stylus/setCacheManager/README.md @@ -6,6 +6,9 @@ This script empowers `AddWasmCacheManagerAction` contract which enables CacheMan 1. Setup .env according to the example files, make sure you provide correct values. You can use default values for `INIT_CACHE_SIZE` and `INIT_DECAY`. +> [!CAUTION] +> The .env file must be in project root. + `DeployAddWasmCacheManagerAction.s.sol` script deploys `AddWasmCacheManagerAction` contract. It can be executed in this directory like this: ```bash