From cee34b639a588c9b9af427b5deaf40b2478393d9 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Fri, 29 Nov 2024 11:59:26 +0300 Subject: [PATCH] remove bytes to address --- examples/router/contracts/ConnectedRouter.sol | 9 --------- 1 file changed, 9 deletions(-) diff --git a/examples/router/contracts/ConnectedRouter.sol b/examples/router/contracts/ConnectedRouter.sol index 81594ed..66e9592 100644 --- a/examples/router/contracts/ConnectedRouter.sol +++ b/examples/router/contracts/ConnectedRouter.sol @@ -83,13 +83,4 @@ contract ConnectedRouter is Ownable { receive() external payable {} fallback() external payable {} - - function bytesToAddress( - bytes memory b - ) internal pure returns (address addr) { - require(b.length == 20, "Invalid bytes length for address"); - assembly { - addr := mload(add(b, 20)) - } - } }