@@ -32,9 +32,9 @@ import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
32
32
* these events, as it isn't required by the specification.
33
33
*/
34
34
abstract contract ERC20 is Context , IERC20 , IERC20Metadata , IERC20Errors {
35
- mapping (address account = > uint256 ) private _balances;
35
+ mapping (address => uint256 ) private _balances;
36
36
37
- mapping (address account = > mapping (address spender = > uint256 )) private _allowances;
37
+ mapping (address => mapping (address => uint256 )) private _allowances;
38
38
39
39
uint256 private _totalSupply;
40
40
@@ -151,7 +151,11 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
151
151
* - the caller must have allowance for ``from``'s tokens of at least
152
152
* `value`.
153
153
*/
154
- function transferFrom (address from , address to , uint256 value ) public virtual returns (bool ) {
154
+ function transferFrom (
155
+ address from ,
156
+ address to ,
157
+ uint256 value
158
+ ) public virtual returns (bool ) {
155
159
address spender = _msgSender ();
156
160
_spendAllowance (from, spender, value);
157
161
_transfer (from, to, value);
@@ -168,7 +172,11 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
168
172
*
169
173
* NOTE: This function is not virtual, {_update} should be overridden instead.
170
174
*/
171
- function _transfer (address from , address to , uint256 value ) internal {
175
+ function _transfer (
176
+ address from ,
177
+ address to ,
178
+ uint256 value
179
+ ) internal {
172
180
if (from == address (0 )) {
173
181
revert ERC20InvalidSender (address (0 ));
174
182
}
@@ -185,7 +193,11 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
185
193
*
186
194
* Emits a {Transfer} event.
187
195
*/
188
- function _update (address from , address to , uint256 value ) internal virtual {
196
+ function _update (
197
+ address from ,
198
+ address to ,
199
+ uint256 value
200
+ ) internal virtual {
189
201
if (from == address (0 )) {
190
202
// Overflow check required: The rest of the code assumes that totalSupply never overflows
191
203
_totalSupply += value;
@@ -260,7 +272,11 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
260
272
*
261
273
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
262
274
*/
263
- function _approve (address owner , address spender , uint256 value ) internal {
275
+ function _approve (
276
+ address owner ,
277
+ address spender ,
278
+ uint256 value
279
+ ) internal {
264
280
_approve (owner, spender, value, true );
265
281
}
266
282
@@ -281,7 +297,12 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
281
297
*
282
298
* Requirements are the same as {_approve}.
283
299
*/
284
- function _approve (address owner , address spender , uint256 value , bool emitEvent ) internal virtual {
300
+ function _approve (
301
+ address owner ,
302
+ address spender ,
303
+ uint256 value ,
304
+ bool emitEvent
305
+ ) internal virtual {
285
306
if (owner == address (0 )) {
286
307
revert ERC20InvalidApprover (address (0 ));
287
308
}
@@ -302,7 +323,11 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
302
323
*
303
324
* Does not emit an {Approval} event.
304
325
*/
305
- function _spendAllowance (address owner , address spender , uint256 value ) internal virtual {
326
+ function _spendAllowance (
327
+ address owner ,
328
+ address spender ,
329
+ uint256 value
330
+ ) internal virtual {
306
331
uint256 currentAllowance = allowance (owner, spender);
307
332
if (currentAllowance != type (uint256 ).max) {
308
333
if (currentAllowance < value) {
0 commit comments