Skip to content

Commit

Permalink
remove bytes to address
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Nov 29, 2024
1 parent 11af7b7 commit cee34b6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions examples/router/contracts/ConnectedRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}

0 comments on commit cee34b6

Please sign in to comment.