Ethereum and dApp development workshop
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hello_my_name_is.sol 373B

1234567891011121314151617181920
  1. pragma solidity ^0.5.11;
  2. contract HelloMyNameIs {
  3. string name;
  4. address issuer;
  5. constructor() public {
  6. issuer = msg.sender;
  7. }
  8. function getName() public view returns(string memory) {
  9. return name;
  10. }
  11. function setName(string memory newName) public returns(string memory) {
  12. require(issuer == msg.sender) ;
  13. name = newName;
  14. return name;
  15. }
  16. }