From 23beff7162cf67ae1edcdf319ca267d2a4edfc95 Mon Sep 17 00:00:00 2001 From: Mike-CZ Date: Fri, 31 Jan 2025 14:55:41 +0100 Subject: [PATCH] [OZ][N-04] Unnecessary Casts (#115) --- contracts/sfc/NodeDriverAuth.sol | 2 +- contracts/sfc/SFC.sol | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/sfc/NodeDriverAuth.sol b/contracts/sfc/NodeDriverAuth.sol index 834c47e..8a28a94 100644 --- a/contracts/sfc/NodeDriverAuth.sol +++ b/contracts/sfc/NodeDriverAuth.sol @@ -87,7 +87,7 @@ contract NodeDriverAuth is OwnableUpgradeable, UUPSUpgradeable { /// Mint native token. To be used by SFC for minting validators rewards. function incBalance(address acc, uint256 diff) external onlySFC { - driver.setBalance(acc, address(acc).balance + diff); + driver.setBalance(acc, acc.balance + diff); } /// Upgrade code of given contract by copying it from other deployed contract. diff --git a/contracts/sfc/SFC.sol b/contracts/sfc/SFC.sol index e177561..c22020b 100644 --- a/contracts/sfc/SFC.sol +++ b/contracts/sfc/SFC.sol @@ -853,9 +853,9 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version { function _receiverOf(address addr) internal view returns (address payable) { address to = getRedirection[addr]; if (to == address(0)) { - return payable(address(uint160(addr))); + return payable(addr); } - return payable(address(uint160(to))); + return payable(to); } /// Seal epoch - sync validators.