Add RedeploySettlers + revive_chain.sh for reviving abandoned chains - #573
Add RedeploySettlers + revive_chain.sh for reviving abandoned chains#573jparklev wants to merge 11 commits into
Conversation
🛡️ Immunefi PR ReviewsWe noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below: Once submitted, we'll take care of assigning a reviewer and follow up here. |
duncancmt
left a comment
There was a problem hiding this comment.
Should deploy_safe_infra.sh also check and deploy v1.4.1?
Does this work like it should on weirdo chains like Tempo?
| if [[ $safe_migration == null ]] ; then | ||
| safe_migration=0x0000000000000000000000000000000000000000 | ||
| fi |
There was a problem hiding this comment.
This doesn't seem like a safe default
| required="$(bc <<<"$gas_price * ${sender_gas[$sender]}")" | ||
| actual="$(cast balance --rpc-url "$rpc_url" "$sender")" | ||
| if (( $(bc <<<"$actual < $required") )) ; then | ||
| echo "Insufficient ETH at $sender ($actual wei, need >= $required wei for ${sender_gas[$sender]} gas)" >&2 |
There was a problem hiding this comment.
| echo "Insufficient ETH at $sender ($actual wei, need >= $required wei for ${sender_gas[$sender]} gas)" >&2 | |
| echo "Insufficient native asset at $sender ($actual wei, need >= $required wei for ${sender_gas[$sender]} gas)" >&2 |
| ISafeMigration(safeMigration).SAFE_FALLBACK_HANDLER() == safeFallbackV141, "SafeMigration fallback mismatch" | ||
| ); | ||
|
|
||
| _execTransaction( |
There was a problem hiding this comment.
Shouldn't this use _execDelegateCall?
| safeBytecodes: SafeBytecodes("", "", "", "", "", "", "", "") | ||
| }); | ||
| safeCompatConfig.safeBytecodes.load(vm); | ||
| if (safeCompatConfig.isEraVm) safeCompatConfig.safeBytecodes.loadV141(vm); |
There was a problem hiding this comment.
That's a bit confusing. Why do we only load v1.4.1 when it's EraVm? I think this warrants a comment
| require(predictedTakerSubmittedSettler.code.length == 0, "predicted taker settler slot occupied"); | ||
| require(predictedMetaTxSettler.code.length == 0, "predicted metatx settler slot occupied"); | ||
| require(predictedIntentSettler.code.length == 0, "predicted intent settler slot occupied"); | ||
| require(predictedBridgeSettler.code.length == 0, "predicted bridge settler slot occupied"); |
There was a problem hiding this comment.
This is unnecessarily defensive
| bytes memory takerDeployTx = _wrapSingleMultisend(_encodeMultisend(deployerProxy, takerSubmittedDeployCall)); | ||
| bytes memory metaTxDeployTx = _wrapSingleMultisend(_encodeMultisend(deployerProxy, metaTxDeployCall)); | ||
| bytes memory intentDeployTx = _wrapSingleMultisend(_encodeMultisend(deployerProxy, intentDeployCall)); | ||
| bytes memory bridgeDeployTx = _wrapSingleMultisend(_encodeMultisend(deployerProxy, bridgeDeployCall)); |
There was a problem hiding this comment.
_wrapSingleMultisend seems unnecessary
A refactoring #564 to be chain-agnostic + support eraVM