@@ -118,6 +118,7 @@ This section lists changes that might cause existing contracts to not compile an
118
118
119
119
* Remove support for the ``\b ``, ``\f ``, and ``\v `` escape sequences in code.
120
120
They can still be inserted via hexadecimal escapes, e.g. ``\x08 ``, ``\x0c ``, and ``\x0b ``, respectively.
121
+
121
122
* The global variables ``tx.origin `` and ``msg.sender `` have the type ``address `` instead of
122
123
``address payable ``. One can convert them into ``address payable `` by using an explicit
123
124
conversion, i.e., ``payable(tx.origin) `` or ``payable(msg.sender) ``.
@@ -155,3 +156,18 @@ Interface Changes
155
156
Use the "compact AST" (``--ast-compact--json `` resp. ``AST ``) as replacement.
156
157
157
158
* The old error reporter (``--old-reporter ``) has been removed.
159
+
160
+
161
+ How to update your code
162
+ =======================
163
+
164
+ - If you rely on wrapping arithmetic, surround each operation with ``unchecked { ... } ``.
165
+ - Optional: If you use SafeMath or a similar library, change ``x.add(y) `` to ``x + y ``, ``x.mul(y) `` to ``x * y `` etc.
166
+ - Add ``pragma abicoder v1; `` if you want to stay with the old ABI coder.
167
+ - Optionally remove ``pragma experimental ABIEncoderV2 `` or ``pragma abicoder v2 `` since it is redundant.
168
+ - Change ``byte `` to ``bytes1 ``.
169
+ - Add intermediate explicit type conversions if required.
170
+ - Combine ``c.f{gas: 10000}{value: 1}() `` to ``c.f{gas: 10000, value: 1}() ``.
171
+ - Change ``msg.sender.transfer(x) `` to ``payable(msg.sender).transfer(x) `` or use a stored variable of ``address payable `` type.
172
+ - Change ``x**y**z `` to ``(x**y)**z ``.
173
+ - Use inline assembly as a replacement for ``log0 ``, ..., ``log4 ``.
0 commit comments