Skip to content

Instantly share code, notes, and snippets.

@ayinot
Created May 8, 2018 09:29
Show Gist options
  • Save ayinot/8545768e93df96da8693a55caa84398d to your computer and use it in GitHub Desktop.
Save ayinot/8545768e93df96da8693a55caa84398d to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.23;
contract Test {
bytes public result;
function saveArgs(uint arg1,bool arg2, string arg3, address arg4) public returns(bytes4){
return this.saveArgs.selector;
}
function encodeMe(bytes4 selector, uint arg1,bool arg2, string arg3, address arg4) returns(bytes){
result = abi.encodeWithSelector(selector,arg1,arg2,arg3,arg4);
return result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment