-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#step 1 | ||
#signer of the Safe multisignature contract that can propose a transaction | ||
OWNER_1_ADDRESS_PRIVATE_KEY= | ||
#parent chain id - 1 etheruem, 42161 arbitrum one | ||
PARENT_CHAIN_ID= | ||
#Safe multisignature contract address | ||
SAFE_ADDRESS= | ||
#stakers and validators that are whitelisted on the Rollup contract | ||
FC_VALIDATORS='["0x1234567890123456789012345678901234567890"]' | ||
|
||
#step 2 | ||
#Rollup contract address | ||
ROLLUP_ADDRESS= | ||
#Safe address that was created on step 1 | ||
FC_VALIDATORS_SAFE_ADDRESS= | ||
#RPC url | ||
RPC= | ||
#signer of the Safe multisignature contract that can propose a transaction | ||
OWNER_1_ADDRESS_PRIVATE_KEY= | ||
#parent chain id - 1 etheruem, 42161 arbitrum one | ||
PARENT_CHAIN_ID= | ||
#Safe multisignature contract address | ||
SAFE_ADDRESS= | ||
#stakers and validators that are whitelisted on the Rollup contract | ||
FC_VALIDATORS='["0x1234567890123456789012345678901234567890"]' | ||
|
||
#step 3 | ||
#Rollup contract address | ||
ROLLUP_ADDRESS= | ||
#add Safe address that was created on step 1 as fast-confirmer (setAnyTrustFastConfirmerPrepareTransactionRequest - fastConfirmer: safeAddress) | ||
FC_VALIDATORS_SAFE_ADDRESS= | ||
#RPC url | ||
RPC= | ||
#signer of the Safe multisignature contract that can propose a transaction | ||
OWNER_1_ADDRESS_PRIVATE_KEY= | ||
#parent chain id - 1 etheruem, 42161 arbitrum one | ||
PARENT_CHAIN_ID= | ||
#Safe multisignature contract address | ||
SAFE_ADDRESS= | ||
#stakers and validators that are whitelisted on the Rollup contract | ||
FC_VALIDATORS='["0x1234567890123456789012345678901234567890"]' | ||
|
||
#step 4 | ||
#Rollup contract address | ||
ROLLUP_ADDRESS= | ||
#Safe address that was created on step 1 | ||
FC_VALIDATORS_SAFE_ADDRESS= | ||
#RPC url | ||
RPC= | ||
#signer of the Safe multisignature contract that can propose a transaction | ||
OWNER_1_ADDRESS_PRIVATE_KEY= | ||
#parent chain id - 1 etheruem, 42161 arbitrum one | ||
PARENT_CHAIN_ID= | ||
#Safe multisignature contract address | ||
SAFE_ADDRESS= | ||
#default is 75 (15minutes) | ||
MINIMUM_ASSERTION_PERIOD=1 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
|
||
## Multisig ownership | ||
Beware: At least one of the signers needs to be an EOA account so that it can propose transactions through this script. | ||
If you want to use this script then you need to make sure the owner of the Rollup has been transfered to a Multisig contract and it has execution rights on L1 Executor Contract. | ||
|
||
1. Build this example: yarn dev | ||
2. This step will create a new Safe on the parent chain and add fast confirmation validators as owners. | ||
``` | ||
node ./dist/1-create_multisig.js | ||
``` | ||
3. The validators list is expanded with the Safe created with step 1 (1-create_multisig). That's why you need to provide FC_VALIDATORS_SAFE_ADDRESS. | ||
``` | ||
node ./dist/2-add_validators.js | ||
``` | ||
|
||
4. We also add Safe as `fast confirmer`. | ||
``` | ||
node ./dist/3-set-any-trust-fast-confirmer.js | ||
``` | ||
|
||
|
||
5. Configure minimum assertion period. The default is 75 (~15 minutes) | ||
``` | ||
node ./dist/4-configure-minimum-assertion-period.js | ||
``` |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "setup-fast-withdrawal", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "tsc --outDir dist" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.9.0", | ||
"typescript": "^5.2.2", | ||
"@safe-global/api-kit": "^2.4.5", | ||
"@safe-global/safe-core-sdk-types": "^5.1.0" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"include": ["./**/*"], | ||
"compilerOptions": { | ||
"moduleResolution": "NodeNext", | ||
"module": "NodeNext", | ||
} | ||
} |
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