Guest User

Untitled

a guest
Apr 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. return adoptionInstance.adopt(petId, {from: account, value: 1000000000000000000});
  2.  
  3. function adopt(uint petId) public payable returns (uint) {
  4. require(petId >= 0 && petId <= 15);
  5. adopters[petId] = msg.sender; // msg.sender is the address of the person or smart contract instantiation it.
  6. return petId;
  7. // return as a confirmation that the petId x has been adopted and its adopter is stored in an array
  8. }
Add Comment
Please, Sign In to add comment