Skip to content

Instantly share code, notes, and snippets.

@andreafspeziale
Last active July 3, 2019 22:36
Show Gist options
  • Save andreafspeziale/f641d117de18e93c79446ccb104dde29 to your computer and use it in GitHub Desktop.
Save andreafspeziale/f641d117de18e93c79446ccb104dde29 to your computer and use it in GitHub Desktop.
function getHash(
    address _signer,
    address _recipient,
    uint _transactionObjectValueField,
    bytes memory _transactionObjectDataField,
    address _rewardTokenAddress,
    uint _rewardAmount
)
    public
    view
    returns (bytes32)
{
    return keccak256(
      abi.encodePacked(
        address(this),
        _signer,
        _recipient,
        _transactionObjectValueField,
        _transactionObjectDataField,
        _rewardTokenAddress,
        _rewardAmount,
        nonce[_signer]
      )
    );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment