Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. function getCarArray(uint _carId)
  2. public
  3. view
  4. returns (uint[12] memory)
  5. {
  6. CarData memory car = cars[_carId];
  7.  
  8. uint[12] memory carInfo;
  9.  
  10. carInfo[0] = car.statusEnd;
  11. carInfo[1] = car.number;
  12. carInfo[2] = car.load;
  13. carInfo[3] = car.capacity;
  14. carInfo[4] = car.region;
  15. carInfo[5] = car.status;
  16. carInfo[6] = car.abrasion;
  17. carInfo[7] = car.repairs;
  18. carInfo[8] = uint(car.currentOwner);
  19. carInfo[9] = uint(car.movingTo);
  20. carInfo[10] = car.resourceType;
  21. carInfo[11] = car.resourceAmount;
  22.  
  23. return carInfo;
  24. }
  25.  
  26. for(i=0;i<1000;i++){
  27. contractAddress.getCarArray(i)….
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement