Replace some uses of abi.encodePacked with more explicit alternatives (#4296)

Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
Hadrien Croubois
2023-06-14 21:11:12 +02:00
committed by GitHub
parent 5cc1ea0a39
commit ef103f37e4
8 changed files with 15 additions and 11 deletions

View File

@ -5,8 +5,8 @@ pragma solidity ^0.8.19;
import "../utils/Context.sol";
contract ReentrancyAttack is Context {
function callSender(bytes4 data) public {
(bool success, ) = _msgSender().call(abi.encodeWithSelector(data));
function callSender(bytes calldata data) public {
(bool success, ) = _msgSender().call(data);
require(success, "ReentrancyAttack: failed call");
}
}