Skip to content

Commit

Permalink
Fix L2 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Dec 3, 2024
1 parent 2a8697a commit 328191a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/safe_cli/operators/safe_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,10 @@ def update_version_to_l2(
fallback_handler = safe_deployments["1.3.0"][
"CompatibilityFallbackHandler"
][str(chain_id)]
# Assuming first element of the array is the `canonical` address
data = HexBytes(
l2_migration_contract.functions.migrateFromV111(
safe_l2_singleton, fallback_handler
safe_l2_singleton[0], fallback_handler[0]
).build_transaction(get_empty_tx_params())["data"]
)
elif safe_version in ("1.3.0", "1.4.1"):
Expand All @@ -738,7 +739,7 @@ def update_version_to_l2(
fallback_handler = self.safe_cli_info.fallback_handler
data = HexBytes(
l2_migration_contract.functions.migrateToL2(
safe_l2_singleton
safe_l2_singleton[0]
).build_transaction(get_empty_tx_params())["data"]
)
else:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_safe_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ def test_update_to_l2_v111(self):
"safe_cli.operators.safe_operator.safe_deployments",
{
"1.3.0": {
"GnosisSafeL2": {"1337": self.safe_contract_V1_3_0.address},
"GnosisSafeL2": {"1337": [self.safe_contract_V1_3_0.address]},
"CompatibilityFallbackHandler": {
"1337": self.compatibility_fallback_handler.address
"1337": [self.compatibility_fallback_handler.address]
},
}
},
Expand Down Expand Up @@ -404,7 +404,7 @@ def test_update_to_l2_v130(self):
"safe_cli.operators.safe_operator.safe_deployments",
{
"1.3.0": {
"GnosisSafeL2": {"1337": safe_contract_l2_130_address},
"GnosisSafeL2": {"1337": [safe_contract_l2_130_address]},
}
},
):
Expand Down

0 comments on commit 328191a

Please sign in to comment.