samples icon indicating copy to clipboard operation
samples copied to clipboard

Timesheet-example has multiple mistakes

Open adelrustum opened this issue 4 years ago • 0 comments

InvoiceContract:

  1. Important: I believe that the oracle signature should be enforced by the contract (only participants are, see here), otherwise there is no real enforcement that the rate should be provided by an oracle, a contractor can write a different version of the IssueInvoiceFlow where they provide any rate that they like.
    In addition to that, what's the point of supplying the oracle as an attribute in the state (see here), and what's the point of using an oracle in this example if the contract is not taking advantage of that?

  2. Typo here (probably copied from IOU example).

IssueInvoiceFlow:

  1. The flow shouldn't collect the signature of the oracle using CollectSignaturesFlow (see here), it already did that here.
  2. The oracle shouldn't receive the finalized transaction (see here); it's not a participant in the state (see here), and at the end of the day, it's just an oracle.

adelrustum avatar Apr 29 '20 17:04 adelrustum