interface IPolicy {
    // The caller MUST ensure that the value "action" is also part of the input
    // for the given hash value, or there will be no binding between the action
    // and the action parameters.
    function tryAuthorize(string calldata action,
                       bytes32 hash,
                       address sender,
                       bytes calldata sig)
        external
        returns (bool);

    // Asserting version of tryAuthorize
    function authorize(string calldata action,
                       bytes32 hash,
                       address sender,
                       bytes calldata sig)
        external;
}
// For policy contracts, it is important that there is some check on msg.sender
// so as to avoid race windows where an attacker can replay a signature
// against the contract directly, thereby potentially producing a denial of service
function authorize(string calldata action,
                   bytes32 hash,
                   address sender,
                   bytes calldata sig)
    external;

// Asserting version of tryAuthorize