Index
returns with name
pragma solidity >=0.4.22 <0.7.0;
pragma experimental ABIEncoderV2;
contract Avrit {
struct Dispute {
uint number;
bool ruled;
}
Dispute[] public disputes;
function createDisputes(uint number, bool ruled) public {
Dispute memory newdispute = Dispute({ruled: ruled, number: number});
disputes.push(newdispute);
}
// This is the code
function DisplayDisputes() public view returns (Dispute[] memory mydispute) {
mydispute = disputes;
}
}
pragma experimental ABIEncoderV2;
contract Avrit {
struct Dispute {
uint number;
bool ruled;
}
Dispute[] public disputes;
function createDisputes(uint number, bool ruled) public {
Dispute memory newdispute = Dispute({ruled: ruled, number: number});
disputes.push(newdispute);
}
// This is the code
function DisplayDisputes() public view returns (Dispute[] memory mydispute) {
mydispute = disputes;
}
}