Skip to content

Instantly share code, notes, and snippets.

@adityak74
Created November 1, 2021 02:39
Show Gist options
  • Select an option

  • Save adityak74/722b9a7de697962c3d3c25fa94e5463c to your computer and use it in GitHub Desktop.

Select an option

Save adityak74/722b9a7de697962c3d3c25fa94e5463c to your computer and use it in GitHub Desktop.

Revisions

  1. adityak74 created this gist Nov 1, 2021.
    10 changes: 10 additions & 0 deletions helloworld.fe
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # 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()