You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.
ABIEncoderV2 allows structs to be passed as function params or return values. This is currently breaking solmd. For example, the follow contract fails to produce any markdown because the sig param in the validateSignature function is a struct.
pragma experimental ABIEncoderV2;
pragma solidity ^0.4.24;
contract Verifier
{
// Represents the output of an ECDSA signature
struct Signature {
uint8 v;
bytes32 r;
bytes32 s;
}
/**
@notice validates an address signed a message hash
@param _addr public address of the private key that signed the message hash
@param messageHash a keccak256 hash of the message being signed
@param sig the signer's ECDSA signature of type Signature struct
@return {
"done": "true if the public address signed the message hash"
}
*/
function validateSignature(address _addr, bytes32 messageHash, Signature sig)
public pure
returns (bool done) {
return ecrecover(messageHash, sig.v, sig.r, sig.s) == _addr;
}
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ABIEncoderV2 allows structs to be passed as function params or return values. This is currently breaking solmd. For example, the follow contract fails to produce any markdown because the
sig
param in thevalidateSignature
function is a struct.The text was updated successfully, but these errors were encountered: