package Ġcom . h ml r . contracts Ċ Ċ import Ġcom . h ml r . Abstract Contracts States TestUtils Ċ import Ġcom . h ml r . model .* Ċ import Ġcom . h ml r . utils . Basic SD LT Ċ import Ġnet . cord a . core . contracts . Type Only Command Data Ċ import Ġnet . cord a . testing . node . Mock Services Ċ import Ġnet . cord a . testing . node . ledger Ċ import Ġorg . junit . Test Ċ Ċ class ĠLand Agreement S eller Sign s Tests Ġ: ĠAbstract Contracts States TestUtils () Ġ{ ĊĊĠĠĠ Ġclass ĠDummy Command Ġ: ĠType Only Command Data () ĊĠĠĠ Ġprivate Ġvar Ġledger Services Ġ= ĠMock Services ( listOf (" com . h ml r . contracts ")) ĊĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` must ĠInclude ĠS eller ĠSign ĠAgreement ĠCommand `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsell er With Signature Ġ= Ġsell er . copy ( signature Ġ= Ġsign ( agreement State . title ID , Ġsell er PrivateKey )) ĊĠĠĠĠĠĠĠ Ġledger Services . ledger Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement S eller Sign s Tests . Dummy Command ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . ver ifies () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` must ĠInclude ĠExact ly ĠOne ĠInput ĠState `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsell er With Signature Ġ= Ġsell er . copy ( signature Ġ= Ġsign ( agreement State . title ID , Ġsell er PrivateKey )) ĊĠĠĠĠĠĠĠ Ġledger Services . ledger Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . ver ifies () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` input ĠAgreement Status ĠMust ĠBe ĠApproved `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsell er With Signature Ġ= Ġsell er . copy ( signature Ġ= Ġsign ( agreement State . title ID , Ġsell er PrivateKey )) ĊĠĠĠĠĠĠĠ Ġledger Services . ledger Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . CREATED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . COMPLETED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . ver ifies () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` must ĠInclude ĠExact ly ĠOne ĠOutput ĠState `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsell er With Signature Ġ= Ġsell er . copy ( signature Ġ= Ġsign ( agreement State . title ID , Ġsell er PrivateKey )) ĊĠĠĠĠĠĠĠ Ġledger Services . ledger Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . ver ifies () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` must ĠBe ĠSigned ĠBy ĠS eller `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsell er With Signature Ġ= Ġsell er . copy ( signature Ġ= Ġsign ( agreement State . title ID , Ġsell er PrivateKey )) ĊĠĠĠĠĠĠĠ Ġval Ġsell er With Wrong Signature Ġ= Ġsell er . copy ( signature Ġ= Ġsign ( agreement State . title ID , Ġwrong S eller PrivateKey )) ĊĠĠĠĠĠĠĠ Ġledger Services . ledger Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Wrong Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . ver ifies () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` output ĠAgreement ĠStatus ĠMust ĠBe ĠSigned `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsell er With Signature Ġ= Ġsell er . copy ( signature Ġ= Ġsign ( agreement State . title ID , Ġsell er PrivateKey )) ĊĠĠĠĠĠĠĠ Ġledger Services . ledger Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . COMPLETED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . CREATED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . fails () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtransaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . APPRO VED , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoutput ( Land Agreement Contract . LAND _ AG REE MENT _ CONTRACT _ ID , Ġagreement State . copy ( status Ġ= ĠAgreement Status . SIGNED , Ġsell er Ġ= Ġsell er With Signature , Ġis M ort gage Terms Added Ġ= Ġtrue , Ġsd lt Ġ= ĠBasic SD LT (). compute SD LT ( agreement State . purchase Price ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand ( listOf ( BO B . publicKey ), ĠLand Agreement Contract . Commands . S eller Sign Agreement ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . ver ifies () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }