Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. pragma solidity >=0.5.0 <0.5.13;
  2. contract olymp_human{
  3. string name;
  4. bool have_a_passport;
  5. address contract_owner;
  6. constructor () public{
  7. have_a_passport = false;
  8. contract_owner = msg.sender;
  9. }
  10. function check_owner() public view returns (string memory){
  11. require(contract_owner == msg.sender);
  12. return "It's a owner";
  13. }
  14. function check_passport() public view returns (string memory){
  15. //Есть ли паспорт или нет
  16. require(have_a_passport == true);
  17. return "Have ID";
  18. }
  19. function setPassport(bool status) public{
  20. have_a_passport = status;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement