Last active
January 18, 2019 18:40
-
-
Save kimagure44/3ad5b97bb33c3f12994f9c420519df35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Versión | |
pragma solidity ^0.4.0; | |
// Definición de contrato | |
contract HolaMundoProtectProfesional { | |
string saludo = "Hola mundo"; | |
address propietario; | |
function HolaMundoProtectProfesional() { | |
propietario = msg.sender; | |
} | |
modifier propietarioContrato { | |
if (propietario != msg.sender) { | |
throw; | |
} else { | |
_; | |
} | |
} | |
function getSaludo() constant returns(string) { | |
return saludo; | |
} | |
function setSaludo(string nuevoSaludo) propietarioContrato returns(string){ | |
saludo = nuevoSaludo; | |
return "Se ha cambiado el contenido correctamente"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment