Closed mmv08 closed 11 months ago
As the 1.5.0 is not finalized I created a follow-up issue: https://github.com/safe-global/safe-contracts/issues/653
Totals | |
---|---|
Change from base Build 6233603447: | 1.3% |
Covered Lines: | 371 |
Relevant Lines: | 391 |
Question: Should we revisit the 1.4.1 migration contract and add the same checks as here that the address stored in the slot 0 is a contract?
This PR focuses on adding a new migration contract for Safe Upgrade to version 1.5.0. The notable changes include:
Safe150Migration.sol
contract for Safe Upgrade to 1.5.0migrationContractTo150
function insetup.ts
Safe150Migration
inSafe150Migration.spec.ts
The functions available in Safe150Migration.sol are:
constructor()
: Initializes the migrationSingleton with the contract's own address.migrateSingleton()
: Migrates to Safe 1.5.0 Singleton (L1) atSAFE_150_SINGLETON
.migrateWithFallbackHandler()
: Migrates and sets the fallback handler to Safe 1.5.0 Compatibility Fallback Handler.migrateWithSetGuard(address guard)
: Migrates and sets the guard to the specified address.migrateWithSetGuardAndFallbackHandler(address guard)
: Migrates, sets the guard to the specified address, and sets the fallback handler to Safe 1.5.0 Compatibility Fallback Handler.migrateL2Singleton()
: Migrates to Safe 1.5.0 Singleton (L2) atSAFE_150_SINGLETON_L2
.migrateL2WithFallbackHandler()
: Migrates to Safe 1.5.0 Singleton (L2) and sets the fallback handler to Safe 1.5.0 Compatibility Fallback Handler.migrateL2WithSetGuard(address guard)
: Migrates to Safe 1.5.0 Singleton (L2) and sets the guard to the specified address.migrateL2WithSetGuardAndFallbackHandler(address guard)
: Migrates to Safe 1.5.0 Singleton (L2), sets the guard to the specified address, and sets the fallback handler to Safe 1.5.0 Compatibility Fallback Handler.getGuard()
: Gets the address of the current guard.isContract(address account)
: Checks whether an Ethereum address corresponds to a contract or an externally owned account (EOA).