Skip to content

Instantly share code, notes, and snippets.

@adityak74
Created November 1, 2021 02:39
Show Gist options
  • Save adityak74/722b9a7de697962c3d3c25fa94e5463c to your computer and use it in GitHub Desktop.
Save adityak74/722b9a7de697962c3d3c25fa94e5463c to your computer and use it in GitHub Desktop.
Ethereum Fe Smart Contract Hello World Message
# The `contract` keyword defines a new contract type
contract HelloWorld:
message: String<100>
pub fn __init__(self, _message: String<100>):
self.message = _message
pub fn update(self, newMessage: String<100>):
self.message = newMessage
pub fn getMessage(self) -> String<100>:
return self.message.to_mem()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment