Skip to content

Commit

Permalink
Update docs/types/reference-types.rst
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Beregszaszi <[email protected]>
  • Loading branch information
mijovic and axic authored Apr 23, 2021
1 parent c6f77d5 commit c54ec13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/types/reference-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ Array slices are useful to ABI-decode secondary data passed in function paramete
/// after doing basic validation on the address argument.
function forward(bytes calldata _payload) external {
bytes4 sig = bytes4(_payload[:4]);
// equivalent to
// Due to truncating behaviour, bytes4(_payload) performs identically.
// bytes4 sig = bytes4(_payload);
if (sig == bytes4(keccak256("setOwner(address)"))) {
address owner = abi.decode(_payload[4:], (address));
Expand Down

0 comments on commit c54ec13

Please sign in to comment.