|
2 | 2 |
|
3 | 3 | This changelog only contains changes starting from version 1.3.0 |
4 | 4 |
|
| 5 | +# Version 1.4.0 |
| 6 | + |
| 7 | +## Compiler settings |
| 8 | + |
| 9 | +Solidity compiler: [0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6) (for more info see issue [#251](https://github.com/safe-global/safe-contracts/issues/251)) |
| 10 | + |
| 11 | +Solidity optimizer: `disabled` |
| 12 | + |
| 13 | +## Expected addresses with [Safe Singleton Factory](https://github.com/safe-global/safe-singleton-factory) |
| 14 | + |
| 15 | +### Core contracts |
| 16 | + |
| 17 | +- `Safe` at `0xc962E67D9490E154D81181879ddf4CD3b65D2132` |
| 18 | +- `SafeL2` at `0x1eb4681c549d995AbdC4aB189cAbb9f00B508cAb` |
| 19 | + |
| 20 | +### Factory contracts |
| 21 | + |
| 22 | +- `SafeProxyFactory` at `0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67` |
| 23 | + |
| 24 | +### Handler contracts |
| 25 | + |
| 26 | +- `TokenCallbackHandler` at `0xeDCF620325E82e3B9836eaaeFdc4283E99Dd7562` |
| 27 | +- `CompatibilityFallbackHandler` at `0x2a15DE4410d4c8af0A7b6c12803120f43C42B820` |
| 28 | + |
| 29 | +### Lib contracts |
| 30 | + |
| 31 | +- `MultiSend` at `0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526` |
| 32 | +- `MultiSendCallOnly` at `0x9641d764fc13c8B624c04430C7356C1C7C8102e2` |
| 33 | +- `CreateCall` at `0x9b35Af71d77eaf8d7e40252370304687390A1A52` |
| 34 | +- `SignMessageLib` at `0x58FCe385Ed16beB4BCE49c8DF34c7d6975807520` |
| 35 | + |
| 36 | +### Storage reader contracts |
| 37 | + |
| 38 | +- `SimulateTxAccessor` at `0x3d4BA2E0884aa488718476ca2FB8Efc291A46199` |
| 39 | + |
| 40 | +## Changes |
| 41 | + |
| 42 | +### General |
| 43 | + |
| 44 | +#### Drop "Gnosis" from contract names |
| 45 | + |
| 46 | +Removed the "Gnosis" prefix from all contract names. |
| 47 | + |
| 48 | +### Core contract |
| 49 | + |
| 50 | +File: [`contracts/SafeL2.sol`](https://github.com/safe-global/safe-contracts/blob/3c3fc80f7f9aef1d39aaae2b53db5f4490051b0d/contracts/SafeL2.sol) |
| 51 | + |
| 52 | +#### Remove usage of the `GAS` opcode in module execute flows |
| 53 | + |
| 54 | +Issue: [#459](https://github.com/safe-global/safe-contracts/issues/459) |
| 55 | + |
| 56 | +The following rule of usage of the `GAS` opcode in the ERC-4337 standard made it impossible to build a module to support ERC4337: |
| 57 | + |
| 58 | +> - Must not use GAS opcode (unless followed immediately by one of { CALL, DELEGATECALL, CALLCODE, STATICCALL }.) |
| 59 | +
|
| 60 | +We removed the `GAS` opcode usage in module transactions to forward all the available gas instead. |
| 61 | + |
| 62 | +#### Require the `to` address to be a contract in `setupModules` |
| 63 | + |
| 64 | +Issue: [#483](https://github.com/safe-global/safe-contracts/issues/483) |
| 65 | + |
| 66 | +The `setupModules` method was changed to require the `to` address to be a contract. If the `to` address is not a contract, the transaction will revert with a `GS002` error code. |
| 67 | + |
| 68 | +#### Enforce the `dataHash` is equal to `data` in the signature verification process for contract signatures |
| 69 | + |
| 70 | +Issue: [#497](https://github.com/safe-global/safe-contracts/issues/497) |
| 71 | + |
| 72 | +To prevent unexpected behaviour, the `dataHash` must now equal a hash of the `data` in the signature verification process for contract signatures. Otherwise, the transaction will revert with a `GS027` error code. |
| 73 | + |
| 74 | +#### Fix `getModulesPaginated` to return a correct `next` pointer |
| 75 | + |
| 76 | +Issue: [#461](https://github.com/safe-global/safe-contracts/issues/461) |
| 77 | + |
| 78 | +The `getModulesPaginated` method was fixed to return a correct `next` pointer. The `next` pointer now equals the last module in the returned array. |
| 79 | + |
| 80 | +#### Check the EIP-165 signature of the Guard before adding |
| 81 | + |
| 82 | +Issue: [#309](https://github.com/safe-global/safe-contracts/issues/309) |
| 83 | + |
| 84 | +When setting a guard, the core contract will check that the target address supports the Guard interface with an EIP-165 check. If it doesn't, the transaction will revert with the `GS300` error code. |
| 85 | + |
| 86 | +#### Index essential parameters when emitting events |
| 87 | + |
| 88 | +Issue: [#541](https://github.com/safe-global/safe-contracts/issues/541) |
| 89 | + |
| 90 | +Index essential parameters in the essential events, such as: |
| 91 | + |
| 92 | +- Owner additions and removals (Indexed parameter - owner address) |
| 93 | +- Fallback manager changes (Indexed parameter - fallback manager address) |
| 94 | +- Module additions and removals (Indexed parameter - module address) |
| 95 | +- Transaction guard changes (Indexed parameter - guard address) |
| 96 | +- Transaction execution/failure (Indexed parameter - transaction hash) |
| 97 | + |
| 98 | +### Factory |
| 99 | + |
| 100 | +Umbrella issue: [#462](https://github.com/safe-global/safe-contracts/issues/462) |
| 101 | + |
| 102 | +#### Remove the `createProxy` method |
| 103 | + |
| 104 | +This method uses the `CREATE` opcode, which is not counterfactual for a specific deployment. This caused user errors and lost/stuck funds and is now removed. |
| 105 | + |
| 106 | +#### Add a check that Singleton exists for the initializer call |
| 107 | + |
| 108 | +If the initializer data is provided, the Factory now checks that the Singleton contract exists and the success of the call to avoid a proxy being deployed uninitialized |
| 109 | + |
| 110 | +#### Add `createNetworkSpecificProxy` |
| 111 | + |
| 112 | +This method will use the chain id in the `CREATE2` salt; therefore, deploying a proxy to the same address on other networks is impossible. |
| 113 | +This method should enable the creation of proxies that should exist only on one network (e.g. specific governance or admin accounts) |
| 114 | + |
| 115 | +#### Remove the `calculateProxyAddress` method |
| 116 | + |
| 117 | +Method uses the revert approach to return data that only works well with some nodes, as they all return messages differently. Hence, we removed it, and the off-chain CREATE2 calculation is still possible. |
| 118 | + |
| 119 | +#### Remove the `proxyRuntimeCode` method |
| 120 | + |
| 121 | +The `.runtimeCode` method is not supported by the ZkSync compiler, so we removed it. |
| 122 | + |
| 123 | +### Fallback handlers |
| 124 | + |
| 125 | +Files: |
| 126 | + |
| 127 | +- [CompatibilityFallbackHandler.sol](https://github.com/safe-global/safe-contracts/blob/3c3fc80f7f9aef1d39aaae2b53db5f4490051b0d/contracts/handler/CompatibilityFallbackHandler.sol) |
| 128 | +- [TokenCallbackHandler](https://github.com/safe-global/safe-contracts/blob/3c3fc80f7f9aef1d39aaae2b53db5f4490051b0d/contracts/handler/TokenCallbackHandler.sol) |
| 129 | + |
| 130 | +#### Rename `DefaultCallbackHandler` to `TokenCallbackHandler` |
| 131 | + |
| 132 | +Since the `DefaultCallbackHandler` only handled token callbacks, it was renamed to `TokenCallbackHandler`. |
| 133 | + |
| 134 | +#### Remove `NAME` and `VERSION` constants |
| 135 | + |
| 136 | +The `NAME` and `VERSION` constants were removed from the `CompatibilityFallbackHandler` contract. |
| 137 | + |
| 138 | +#### Fix function signature mismatch for `isValidSignature` |
| 139 | + |
| 140 | +Issue: [#440](https://github.com/safe-global/safe-contracts/issues/440) |
| 141 | + |
| 142 | +Fixed mismatch between the function signature in the `isValidSignature` method and the `ISignatureValidator` interface. |
| 143 | + |
| 144 | +### Libraries |
| 145 | + |
| 146 | +#### CreateCall |
| 147 | + |
| 148 | +File: [`contracts/libraries/CreateCall.sol`](https://github.com/safe-global/safe-contracts/blob/3c3fc80f7f9aef1d39aaae2b53db5f4490051b0d/contracts/libraries/CreateCall.sol) |
| 149 | + |
| 150 | +#### Index the created contract address in the `ContractCreation` event |
| 151 | + |
| 152 | +Issue: [#541](https://github.com/safe-global/safe-contracts/issues/541) |
| 153 | + |
| 154 | +The deployed contract address in the `ContractCreation` event is now indexed. |
| 155 | + |
| 156 | +### Deployment process |
| 157 | + |
| 158 | +#### Use the Safe Singleton Factory for all deployments |
| 159 | + |
| 160 | +Issue: [#460](https://github.com/safe-global/safe-contracts/issues/460) |
| 161 | + |
| 162 | +Deployments with the [Safe Singleton Factory](https://github.com/safe-global/safe-singleton-factory) are now the default deployment process to ensure the same addresses on all chains. |
| 163 | + |
5 | 164 | # Version 1.3.0-libs.0 |
6 | 165 |
|
7 | 166 | ## Compiler settings |
|
0 commit comments