0

I wrote the following, which compiles in truffle just fine, but will not deploy. I get the error "components found but type is not tuple; report on GitHub." Am I doing something wrong appending to a struct array?

pragma solidity ^0.5.0;

contract Sandbox {

  struct Leader {
    address host;
    uint fitness;
  }

  Leader[] public myList;

  function append(uint value) public {
    Leader memory leader = Leader(msg.sender, value);
    myList.push(leader);
  }

}
3
  • 1
    This error is most likely not related to this contract but to something else within your system. – goodvibration Jun 26 '19 at 13:11
  • @goodvibration Thanks, deleting the contract and recompiling and then creating the contract again seems to have fixed it. – Dr Lee A. Christie Jun 26 '19 at 13:20
  • sometimes, you may have to clear your build folder before migrations or testing using truffle. – Sanjay S B Jun 26 '19 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.