Skip to content

CorDapp that shows how Corda manages negotiation between nodes.

License

Notifications You must be signed in to change notification settings

rajkbess/negotiation-cordapp

Repository files navigation

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

About

CorDapp that shows how Corda manages negotiation between nodes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages