Skip to content

Update the use of call() with selector only.#1033

Merged
frangio merged 2 commits into
OpenZeppelin:masterfrom
axic:callAndHash
Jun 30, 2018
Merged

Update the use of call() with selector only.#1033
frangio merged 2 commits into
OpenZeppelin:masterfrom
axic:callAndHash

Conversation

@axic

@axic axic commented Jun 20, 2018

Copy link
Copy Markdown
Contributor

🚀 Description

This is a backwards compatible update for Solidity 0.5.0, see argotorg/solidity#4097

@axic axic force-pushed the callAndHash branch 2 times, most recently from a15fcd5 to 704356d Compare June 20, 2018 12:50
function callSender(bytes4 data) public {
// solium-disable-next-line security/no-low-level-calls
require(msg.sender.call(data));
require(msg.sender.call(abi.encodeWithSelector(data)));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call will enforce a single bytes argument, this way it will still work properly.

@axic axic changed the title Update the use of keccak256 and call(). Update the use of call() with selector only. Jun 20, 2018

@come-maiz come-maiz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @axic !

@frangio frangio merged commit c2ad8c3 into OpenZeppelin:master Jun 30, 2018
@axic axic deleted the callAndHash branch July 1, 2018 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants