Using the greeter example, The original contracts is written with 4 methods: mortal(), kill(), greeter(), and greet().

Why then when I look at the mined contract does it show me an ABI of:

  address: "0xaa159b9af634c040e1853fee9dcff12bd6f58772",
  allEvents: function(),
  greet: function(),
  kill: function()

Are some of these just special built in keywords that act differently? 'mortal()' and 'kill()' seem to have the exact same semantic structure.

1 Answer 1


greeter and mortal are constructors, and like in other languages, only callable once, during instantiation.

  • Oh I see, because they have the same name as the class, so they are automatically the constructor.
    – ZMitton
    Commented Feb 18, 2016 at 3:33
  • Right. By the way it's fine to leave answers unaccepted to give them time and if you're interested in other answers and explanations, but try not to forget to accept those that you're happy with :)
    – eth
    Commented Feb 18, 2016 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.