Add Prettier for linting and fix Solhint config (#2697)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -10,7 +10,6 @@ import "../../access/Ownable.sol";
|
||||
* explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.
|
||||
*/
|
||||
contract ProxyAdmin is Ownable {
|
||||
|
||||
/**
|
||||
* @dev Returns the current implementation of `proxy`.
|
||||
*
|
||||
@ -71,7 +70,11 @@ contract ProxyAdmin is Ownable {
|
||||
*
|
||||
* - This contract must be the admin of `proxy`.
|
||||
*/
|
||||
function upgradeAndCall(TransparentUpgradeableProxy proxy, address implementation, bytes memory data) public payable virtual onlyOwner {
|
||||
function upgradeAndCall(
|
||||
TransparentUpgradeableProxy proxy,
|
||||
address implementation,
|
||||
bytes memory data
|
||||
) public payable virtual onlyOwner {
|
||||
proxy.upgradeToAndCall{value: msg.value}(implementation, data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,11 @@ contract TransparentUpgradeableProxy is ERC1967Proxy {
|
||||
* @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
|
||||
* optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.
|
||||
*/
|
||||
constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {
|
||||
constructor(
|
||||
address _logic,
|
||||
address admin_,
|
||||
bytes memory _data
|
||||
) payable ERC1967Proxy(_logic, _data) {
|
||||
assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));
|
||||
_changeAdmin(admin_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user