Add Prettier for linting and fix Solhint config (#2697)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Hadrien Croubois
2021-06-07 17:33:03 +02:00
committed by GitHub
parent e3661abe84
commit b0cf6fbb7a
134 changed files with 1816 additions and 1526 deletions

View File

@ -19,7 +19,6 @@ abstract contract Proxy {
* This function does not return to its internall call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
// solhint-disable-next-line no-inline-assembly
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
@ -35,8 +34,12 @@ abstract contract Proxy {
switch result
// delegatecall returns 0 on error.
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
@ -60,7 +63,7 @@ abstract contract Proxy {
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
* function in the contract matches the call data.
*/
fallback () external payable virtual {
fallback() external payable virtual {
_fallback();
}
@ -68,7 +71,7 @@ abstract contract Proxy {
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
* is empty.
*/
receive () external payable virtual {
receive() external payable virtual {
_fallback();
}
@ -78,6 +81,5 @@ abstract contract Proxy {
*
* If overriden should call `super._beforeFallback()`.
*/
function _beforeFallback() internal virtual {
}
function _beforeFallback() internal virtual {}
}