Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return adoptionInstance.adopt(petId, {from: account, value: 1000000000000000000});
- function adopt(uint petId) public payable returns (uint) {
- require(petId >= 0 && petId <= 15);
- adopters[petId] = msg.sender; // msg.sender is the address of the person or smart contract instantiation it.
- return petId;
- // return as a confirmation that the petId x has been adopted and its adopter is stored in an array
- }
Add Comment
Please, Sign In to add comment