Skip to content

Latest commit

 

History

History
41 lines (24 loc) · 1.33 KB

README.md

File metadata and controls

41 lines (24 loc) · 1.33 KB

Corda

Negotiation CorDapp

This CorDapp shows how multi-party negotiation is handled on the Corda ledger, in the absence of an API for user interaction.

A flow is provided that allows a node to propose a trade to a counterparty. The counterparty has two options:

  • Accepting the proposal, converting the ProposalState into a TradeState with identical attributes
  • Modifying the proposal, consuming the existing ProposalState and replacing it with a new ProposalState for a new amount

Only the recipient of the proposal has the ability to accept it or modify it. If the sender of the proposal tries to accept or modify the proposal, this attempt will be rejected automatically at the flow level.

Pre-requisites:

See https://docs.corda.net/getting-set-up.html.

Usage

This CorDapp does not have a front-end. However, you can see it working by running the flow and contract tests.

Running the flow tests:

Use the IntelliJ run configurations provided:

  • Run Proposal Flow Tests
  • Run Acceptance Flow Tests
  • Run Modification Flow Tests

Running the contract tests:

Use the IntelliJ run configuration provided:

  • Run Proposal Contract Tests

To-Do

  • Write the contract logic and contract tests for the acceptance and modification of proposals