Guest User

Untitled

a guest
May 20th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. pragma solidity ^0.4.17;
  2.  
  3. contract Adoption {
  4.  
  5. address[16] public adopters;
  6.  
  7. function adopt(uint petId) public returns (uint) {
  8. require(petId >= 0 && petId <= 15);
  9.  
  10. adopters[petId] = msg.sender;
  11.  
  12. return petId;
  13. }
  14.  
  15. // Retrieving the adopters
  16. function getAdopters() public view returns (address[16]) {
  17. return adopters;
  18. }
  19.  
  20. }
Add Comment
Please, Sign In to add comment