pragma solidity ^0.4.0;
contract SignatureStatus
{
string documentIDhash;
struct Signature {
string documentID; //ID of the document
string studyID; // ID of the study the document is associated with
string timeStamp; // Timestamp of the signature
bool consented; // boolean of the consent status
}
//sets the consent status of the contract
function consentBuild(documentIDhash,studyIDhash,timeStamphash,consentedhash) public returns (Signature)
{
string documentID = documentIDhash;
string studyID = studyIDhash;
string timeStamp = timeStamphash;
bool consented = consentedhash;
}
//checks the status of the contract
function Status() returns (bool status)
{
//bool consented = true;
if (consented == true) {status = true;} else {status = false;}
}
This is my current contract, I'm trying to create a public function that receives a tx call from web3 js and stores the parameters in a struc. I'm getting this error however whenever I try to name my parameters in the function. I've tried defining the parameters beforehand and that isn't working either. What exactly am I not seeing/missing to simply set my function parameter names?
browser/Untitled.sol:15:27: TypeError: Name has to refer to a struct, enum or contract.
function consentBuild(documentIDhash,studyIDhash,timeStamphash,consentedhash) public returns (Signature)
^------------^