Interface
Storage
variable issuer : address = @tz1bfVgcJC4ukaQSHUe1EbrUd5SekXeP9CWk
variable subscriber : address = @tz1h4CiqWxNe4UxSpkwXy617RM6DaK6NU76P
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 () {
...
}