Using ContractData from drizzle/react-components to try and call a read function that returns multiple parameters from a struct
MyComponent.js
<div>
<h2>Get Participant Details</h2>
<ContractData
drizzle={drizzle}
drizzleState={drizzleState}
contract="supplyChain"
method="getParticipantDetails"
methodArgs={[1, "modelNumber"]}
/>
Solidity Contract
struct participant {
string userName;
string password;
string participantType;
address participantAddress;
}
function getParticipantDetails(uint32 _p_id) public view returns (string,address,string) {
return (participants[_p_id].userName, participants[_p_id].participantAddress, participants[_p_id].participantType);
}
Not sure how to exactly read a tuple with Drizzle