2 ms·
Agreed, they should have put the code from the paper on the front page: main contract Policy { state Offered { int cost ; int expirationTime
by jupp0r 7y ago
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 ;
}
}