From 43587930c1e088d48f50c3f170dc39aba7e9d071 Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 28 Aug 2024 11:37:06 +0200 Subject: [PATCH 1/8] [#790] Update CHANGELOG.md --- CHANGELOG.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64fb9cf3a..5e56188d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,33 +20,39 @@ Solidity optimizer: `disabled` ### Core contracts -- `Safe` at `0x41675C099F32341bf84BFc5382aF534df5C7461a` -- `SafeL2` at `0x29fcB43b46531BcA003ddC8FCB67FFE91900C762` +- `Safe` at `0xCDaf5D62B2bA00C9A5D7e85983055B4168db16B3` +- `SafeL2` at `0xAF6c08332c2a45E49216464274156bFEC79bA28b` ### Factory contracts -- `SafeProxyFactory` at `0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67` +- `SafeProxyFactory` at `0x9bc5E71d9E5cC5E0cd6fd96DA22b9a4b417dBAC6` ### Handler contracts -- `TokenCallbackHandler` at `0xeDCF620325E82e3B9836eaaeFdc4283E99Dd7562` -- `CompatibilityFallbackHandler` at `0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99` +- `TokenCallbackHandler` at `0x45a03a27D4BA1B0CC9784E3961C5f6C16aCBd381` +- `CompatibilityFallbackHandler` at `0x4c95c836D31d329d80d696cb679f3dEa028Ad4e5` ### Lib contracts -- `MultiSend` at `0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526` -- `MultiSendCallOnly` at `0x9641d764fc13c8B624c04430C7356C1C7C8102e2` -- `CreateCall` at `0x9b35Af71d77eaf8d7e40252370304687390A1A52` -- `SignMessageLib` at `0xd53cd0aB83D845Ac265BE939c57F53AD838012c9` +- `MultiSend` at `0x228a04A59BEF23106Bcb2b4158422baAC60646Ce` +- `MultiSendCallOnly` at `0x50cafDD5E439994509202CfCd569DcA7E1fd9659` +- `CreateCall` at `0xB22D635D552eC95142E2Abe3FfB859eA7d7C0316` +- `SignMessageLib` at `0xA4C2E2a419517d25aFa13e15d051f8c17b4d11Fe` ### Storage reader contracts -- `SimulateTxAccessor` at `0x3d4BA2E0884aa488718476ca2FB8Efc291A46199` +- `SimulateTxAccessor` at `0x38710E559A67ef07bcF8EeA70B076ac8e756DE08` ## Changes ### General +### Generalized migration contract + +Issue [#787](https://github.com/safe-global/safe-smart-account/issues/787) + +`SafeMigration` contract is a generalized contract that will facilitate Safe migrations. The contract takes target singleton and fallback handler addresses as constructor argument. + #### Use updated EIP-1271 function signature in the signature validation process Issue: [#391](https://github.com/safe-global/safe-smart-account/issues/391) @@ -66,11 +72,11 @@ Issue: [#544](https://github.com/safe-global/safe-smart-account/issues/544) The contracts couldn't be compiled with the solidity compiler versions 0.8.19+ because of the compiler optimizations that copy stack variables to memory to prevent stack-too-deep errors. In some assembly blocks, the scratch space was used, and that's not considered safe, so all the assembly blocks were adjusted to use safe memory allocation. -#### Add `checkModuleTransaction` method to the guard +#### Add module guard interface -Issue: [#335](https://github.com/safe-global/safe-smart-account/issues/335) +Issue: [#758](https://github.com/safe-global/safe-smart-account/issues/758) -The `checkModuleTransaction` method was added to the guard to allow checking the module transactions before execution. The method is called before the `checkAfterExecution` method. While migrating, it should be checked if a Safe has an existing guard and if it implements the `checkModuleTransaction` method. If it doesn't, module transactions will be blocked. +The `IModuleGuard` interface was added to allow checking the module transactions before and after execution. #### Add overloaded `checkNSignatures` method From ed9dae56ae17b6be38cb0ea12f584dafb069258d Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 28 Aug 2024 12:15:44 +0200 Subject: [PATCH 2/8] [#790] Update CHANGELOG.md --- CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e56188d1..5cbfeefb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,11 +47,15 @@ Solidity optimizer: `disabled` ### General -### Generalized migration contract +### New contracts -Issue [#787](https://github.com/safe-global/safe-smart-account/issues/787) +Issue: [#787](https://github.com/safe-global/safe-smart-account/issues/787) -`SafeMigration` contract is a generalized contract that will facilitate Safe migrations. The contract takes target singleton and fallback handler addresses as constructor argument. +`SafeMigration` contract is a generalized migration contract that will facilitate Safe migrations. The contract takes target singleton and fallback handler addresses as constructor argument. + +PR: [#759](https://github.com/safe-global/safe-smart-account/pull/759) + +`SafeToL2Setup` contract facilitates the deployment of a Safe to the same address on all networks by automatically changing the singleton to the L2 version when not on chain ID 1. #### Use updated EIP-1271 function signature in the signature validation process From b67fcd81637e30d55ec044e11d4a0918933aef6d Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 29 Aug 2024 11:57:31 +0200 Subject: [PATCH 3/8] [#790] Update CHANGELOG.md --- CHANGELOG.md | 23 +++++++++++++---------- src/deploy/deploy_libraries.ts | 7 +++++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cbfeefb2..717c6cb48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,16 +47,6 @@ Solidity optimizer: `disabled` ### General -### New contracts - -Issue: [#787](https://github.com/safe-global/safe-smart-account/issues/787) - -`SafeMigration` contract is a generalized migration contract that will facilitate Safe migrations. The contract takes target singleton and fallback handler addresses as constructor argument. - -PR: [#759](https://github.com/safe-global/safe-smart-account/pull/759) - -`SafeToL2Setup` contract facilitates the deployment of a Safe to the same address on all networks by automatically changing the singleton to the L2 version when not on chain ID 1. - #### Use updated EIP-1271 function signature in the signature validation process Issue: [#391](https://github.com/safe-global/safe-smart-account/issues/391) @@ -124,6 +114,7 @@ Solidity optimizer: `disabled` - `MultiSendCallOnly` at `0x9641d764fc13c8B624c04430C7356C1C7C8102e2` - `CreateCall` at `0x9b35Af71d77eaf8d7e40252370304687390A1A52` - `SignMessageLib` at `0xd53cd0aB83D845Ac265BE939c57F53AD838012c9` +- `SafeToL2Setup` at `0x80E0d1577aD3d982BF2F49aAB00BfA161AA763c4` ### Storage reader contracts @@ -131,6 +122,18 @@ Solidity optimizer: `disabled` ## Changes +### General + +#### New contracts + +Issue: [#787](https://github.com/safe-global/safe-smart-account/issues/787) + +`SafeMigration` contract is a generalized migration contract that will facilitate Safe migrations. The contract takes target singleton and fallback handler addresses as constructor argument. + +PR: [#759](https://github.com/safe-global/safe-smart-account/pull/759) + +`SafeToL2Setup` contract facilitates the deployment of a Safe to the same address on all networks by automatically changing the singleton to the L2 version when not on chain ID 1. + ### Bugfixes #### Remove `gasleft()` usage in `setupModules` diff --git a/src/deploy/deploy_libraries.ts b/src/deploy/deploy_libraries.ts index 28035c3f7..bb89ae766 100644 --- a/src/deploy/deploy_libraries.ts +++ b/src/deploy/deploy_libraries.ts @@ -33,6 +33,13 @@ const deploy: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { log: true, deterministicDeployment: true, }); + + await deploy("SafeToL2Setup", { + from: deployer, + args: [], + log: true, + deterministicDeployment: true, + }); }; deploy.tags = ["libraries", "l2-suite", "main-suite"]; From cec61326970dd49b91e1d1c27967aa9123353da5 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 29 Aug 2024 14:20:54 +0200 Subject: [PATCH 4/8] [#790] Add SafeToL2Migration to CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 717c6cb48..70caf7fb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -134,6 +134,10 @@ PR: [#759](https://github.com/safe-global/safe-smart-account/pull/759) `SafeToL2Setup` contract facilitates the deployment of a Safe to the same address on all networks by automatically changing the singleton to the L2 version when not on chain ID 1. +PR: [#685](https://github.com/safe-global/safe-smart-account/pull/685) + +`SafeToL2Migration` contract facilitates updating a Safe from 1.1.1/1.3.0/1.4.1 versions to a L2 version. This is useful when replaying a Safe from a non L2 network in a L2 network. + ### Bugfixes #### Remove `gasleft()` usage in `setupModules` From 1082306005d81eabc690964e6508fe39349fd482 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 29 Aug 2024 15:32:33 +0200 Subject: [PATCH 5/8] [#790] Add SafeMigration and SafeToL2Migration contracts in CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70caf7fb2..ab62a46f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -115,6 +115,8 @@ Solidity optimizer: `disabled` - `CreateCall` at `0x9b35Af71d77eaf8d7e40252370304687390A1A52` - `SignMessageLib` at `0xd53cd0aB83D845Ac265BE939c57F53AD838012c9` - `SafeToL2Setup` at `0x80E0d1577aD3d982BF2F49aAB00BfA161AA763c4` +- `SafeToL2Migration` at `0x7Baec386CAF8e02B0BB4AFc98b4F9381EEeE283C` +- `SafeMigration` at `0x6881104d40E00942B216c63BccbaF3D1064b3970` (Target Safe version: v1.4.1) ### Storage reader contracts From 51433bf1b55d56f8d2c876bc4f15b6a7f1581ec6 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 30 Aug 2024 11:52:35 +0200 Subject: [PATCH 6/8] Rename 1.5.0 to current version --- CHANGELOG.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab62a46f2..46ed362d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ This changelog only contains changes starting from version 1.3.0 -# Version 1.5.0 +# Current version ## Rename repository @@ -20,28 +20,30 @@ Solidity optimizer: `disabled` ### Core contracts -- `Safe` at `0xCDaf5D62B2bA00C9A5D7e85983055B4168db16B3` -- `SafeL2` at `0xAF6c08332c2a45E49216464274156bFEC79bA28b` +- `Safe` - TBD +- `SafeL2` - TBD ### Factory contracts -- `SafeProxyFactory` at `0x9bc5E71d9E5cC5E0cd6fd96DA22b9a4b417dBAC6` +- `SafeProxyFactory` - TBD ### Handler contracts -- `TokenCallbackHandler` at `0x45a03a27D4BA1B0CC9784E3961C5f6C16aCBd381` -- `CompatibilityFallbackHandler` at `0x4c95c836D31d329d80d696cb679f3dEa028Ad4e5` +- `TokenCallbackHandler` - TBD +- `CompatibilityFallbackHandler` - TBD ### Lib contracts -- `MultiSend` at `0x228a04A59BEF23106Bcb2b4158422baAC60646Ce` -- `MultiSendCallOnly` at `0x50cafDD5E439994509202CfCd569DcA7E1fd9659` -- `CreateCall` at `0xB22D635D552eC95142E2Abe3FfB859eA7d7C0316` -- `SignMessageLib` at `0xA4C2E2a419517d25aFa13e15d051f8c17b4d11Fe` +- `MultiSend` - TBD +- `MultiSendCallOnly` - TBD +- `CreateCall` - TBD +- `SignMessageLib` - TBD +- `SafeToL2Migration` - TBD +- `SafeMigration` - TBD (Target Safe version: v1.5.0) ### Storage reader contracts -- `SimulateTxAccessor` at `0x38710E559A67ef07bcF8EeA70B076ac8e756DE08` +- `SimulateTxAccessor` - TBD ## Changes From 45d552fcc0c32e840d5fc0f3d4e6192b271f3318 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 30 Aug 2024 11:53:04 +0200 Subject: [PATCH 7/8] Update CHANGELOG.md Co-authored-by: Nicholas Rodrigues Lordello --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46ed362d7..443f84fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -118,7 +118,7 @@ Solidity optimizer: `disabled` - `SignMessageLib` at `0xd53cd0aB83D845Ac265BE939c57F53AD838012c9` - `SafeToL2Setup` at `0x80E0d1577aD3d982BF2F49aAB00BfA161AA763c4` - `SafeToL2Migration` at `0x7Baec386CAF8e02B0BB4AFc98b4F9381EEeE283C` -- `SafeMigration` at `0x6881104d40E00942B216c63BccbaF3D1064b3970` (Target Safe version: v1.4.1) +- `SafeMigration` at `0x6881104d40E00942B216c63BccbaF3D1064b3970` (target Safe version: v1.4.1) ### Storage reader contracts From 5327788516ef5c2acb71715adbe5fe7e6dfc78d8 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 30 Aug 2024 11:53:22 +0200 Subject: [PATCH 8/8] Update CHANGELOG.md Co-authored-by: Nicholas Rodrigues Lordello --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 443f84fc7..f8ebe10e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,8 +65,7 @@ Calls to `transfer` and `send` were removed to make the contract not depend on a Issue: [#544](https://github.com/safe-global/safe-smart-account/issues/544) -The contracts couldn't be compiled with the solidity compiler versions 0.8.19+ because of the compiler optimizations that copy stack variables to memory to prevent stack-too-deep errors. In some assembly blocks, the scratch space was used, and that's not -considered safe, so all the assembly blocks were adjusted to use safe memory allocation. +The contracts couldn't be compiled with the solidity compiler versions 0.8.19+ because of the compiler optimizations that copy stack variables to memory to prevent stack-too-deep errors. In some assembly blocks, the scratch space was used, and that's not considered safe, so all the assembly blocks were adjusted to use safe memory allocation. #### Add module guard interface