News for hackers. Stuff that matters.
Re:Obsidian: A safer blockchain programming language by jupp0r on Friday May 31, 2019 @10:25PM (#20066783)
Agreed, they should have put the code from the paper on the front page:

  main contract Policy {
    state Offered {
      int cost ;
      int expirationTime ;
    }
    state Active {}
    state Expired {}
    Policy@Offered ( int c , int expTime ) {
      -> Offered ( cost = c , expirationTime = expTime );
    }
    transaction activate ( Policy@Offered >> Active this ) {
      -> Active ;
    }
    transaction expire ( Policy@Offered >> Expired this ) {
      -> Expired ;
    }
  }

There are no comments on this comment yet.