Open ashhadali10 opened 2 years ago
@ashhadali10 Did you find any alternative?
@nikhildsahu please help in above problem, for the var wa = wallets[msg.sender];, it says, expected primary expression. i am not able to resolve it, please help
@nikhildsahu please help in above problem, for the var wa = wallets[msg.sender];, it says, expected primary expression. i am not able to resolve it, please help
instead of var wa = wallets[msg.sender] use Multisig storage wa = wallets[msg.sender]
function createNewMultiSigbyUser(address instituteaddress) public {
Multisig storage wa = wallets[msg.sender];
wa.inst=instituteaddress;
wa.stud=msg.sender;
}
function uploadAadhar(string a) {
var wa=wallets[msg.sender]; //im getting error right here someone help me
} }
Hey @ashhadali10 , @Tabinda788 and @Stranger-18, refer this code it's working:
pragma solidity >=0.4.24;
contract Ballot {
struct Documents {
string aadhar;
}
struct MultiSig
{
address inst;
address stud;
Documents documents;
}
mapping(address=>MultiSig) public wallets ;
function createNewMultiSigbyUser(address instituteaddress) public {
MultiSig storage wa = wallets[msg.sender];
wa.inst=instituteaddress;
wa.stud=msg.sender;
}
function uploadAadhar(string memory a) public{
MultiSig storage wa=wallets[msg.sender];
}
}
@nikhildsahu now you can close this issue.
Hey @ashhadali10 , @Tabinda788 and @Stranger-18, refer this code it's working:
pragma solidity >=0.4.24; contract Ballot { struct Documents { string aadhar; } struct MultiSig { address inst; address stud; Documents documents; } mapping(address=>MultiSig) public wallets ; function createNewMultiSigbyUser(address instituteaddress) public { MultiSig storage wa = wallets[msg.sender]; wa.inst=instituteaddress; wa.stud=msg.sender; } function uploadAadhar(string memory a) public{ MultiSig storage wa=wallets[msg.sender]; } }
@nikhildsahu now you can close this issue.
there is still issue in the migration.sol file. the same version problem. do you have a fix for that as well?
please change var and other method in code i use 0.5.16 truffle version and it give error when i compile simplestorage.sol contract. function createNewMultiSigbyUser(address instituteaddress) public {
}
function uploadAadhar(string memory a) public{
// var wa=wallets[msg.sender];
change in both function