1
contract KYCCHECK{

function KYCCHECK(){} 
struct User{ 
    uint id; 
    bool isVerified;
    string fname;
    string mname;
    string lname;
    string genderValue;
    string maritalStat;
    string stat;
    string identity;
} 
mapping(uint => User) kyclist; 

function setKYCData(uint uid,string firstname,string middlename,string lastname,string gvalue,string maritalVal,string statusVal,string identityVal) { 
    kyclist[uid].fname = firstname;
    kyclist[uid].mname = middlename;
    kyclist[uid].lname = lastname;
    kyclist[uid].genderValue = gvalue;
    kyclist[uid].maritalStat = maritalVal;
    kyclist[uid].stat = statusVal;
    kyclist[uid].identity = identityVal;
}

function getFirstName(uint uid) constant returns (string retFNameVal) {
    retFNameVal = kyclist[uid].fname;
    return retFNameVal;
}
function getMiddleName(uint uid) constant returns (string retMNameVal) {
    retMNameVal = kyclist[uid].mname;
    return retMNameVal;
}
function getLastName(uint uid) constant returns (string retLNameVal) {
    retLNameVal = kyclist[uid].lname;
    return retLNameVal;
}
function getGender(uint uid) constant returns(string retGenderVal) {
    retGenderVal = kyclist[uid].genderValue;
    return retGenderVal;
}
function getMaritalStatus(uint uid) constant returns(string retMaritalVal){
    retMaritalVal= kyclist[uid].maritalStat;
    return retMaritalVal;
}
function getStatus(uint uid) constant returns(string retStatus){
    retStatus = kyclist[uid].stat;
    return retStatus;
}
function getIdentity(uint uid)constant returns(string retIdentity){
    retIdentity = kyclist[uid].identity;
    return retIdentity;
}   

}

Hello everyone, This the contract i am trying to implement. I have a form(using bootstrap with form defined "") and i need to set and get the data through form.

Problem is when i pass more than 3 arguments in setKYCData function (in above contracts)and execute get function, the value isn't displayed. but when set is modified to take 3 arguments and get function is called with 3 arguments it works fine.

please ask if you need any more details, if anybody can share a code to create a form using solidity, web3 that'll be appreciable. thanks in adv

Hem M
  • 326
  • 2
  • 13
  • found solution..! it's because of gas limit by adding excess gas to the function it executes well. gasEstimate = web3.eth.estimateGas({ data: code }); myContract.setKYCData(id,fname,mname,lname,genderValue,maritalValue,statusValue,strIdentityType, { from: web3.eth.coinbase, gas: gasEstimate + 10000 }); – Hem M Sep 26 '16 at 09:45
  • Feel free to answer your own question. – q9f Nov 02 '16 at 10:57

0 Answers0