Skip to main content

Interface

Storage#

variable issuer     : address = @tz1bfVgcJC4ukaQSHUe1EbrUd5SekXeP9CWk
variable subscriber : address = @tz1MZrh8CvYkp7BfLQMcm6mg5FvL5HRZfACw
variable facevalue : tez = 10tz
variable discount : rational = 14%
variable maturityduration : duration = 1m
variable paybackduration  : duration = 1m
variable issuersigned     : bool = false
variable subscribersigned : bool = false
variable signaturedate    : option<date> = none
states =  | Created initial  | Signed  | Terminated  | Disputed

Entry points#

To signed#

transition toSigned() {  called by selfaddress  from Created to Signed with effect {    signaturedate := some(now)  }}

Sign#

entry sign () {  ...}

Terminate#

transition terminate () { ...}

Dispute#

transition dispute () {  ...}