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;
}
}
大家好,这是我要执行的合同。我有一个表单(使用定义了表单的引导程序“”),我需要通过表单设置和获取数据。
问题是当我在 setKYCData 函数(在上述合同中)中传递超过 3 个参数并执行 get 函数时,不显示该值。但是当 set 被修改为采用 3 个参数并使用 3 个参数调用 get 函数时,它工作正常。
请询问您是否需要更多详细信息,是否有人可以共享代码以使用solidity,web3创建表单,这将是可观的。感谢广告