Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
put back the original readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwhite committed Sep 18, 2017
1 parent eb9a47f commit 40437dd
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions packages/trade-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,59 @@
This business network defines:

**Participant**
`Trader`, `Regulator`
`Trader`

**Asset**
`Commodity`

**Transaction(s)**
`Trade`, `BulkTrade`, `RemoveHighQuantityCommodities`

For test purposes `_demoSetup`
`Transaction`

**Event**
`TradeNotification `

To test this Business Network Definition in the **Test** tab:

Clck on **SubmitTransaction** and select the transaction to submit as `_demoSetup`
This will create two Traders, and a selection of assets.

Create two `Trader` participants:

```
{
"$class": "org.acme.trading.Trader",
"tradeId": "TRACY",
"firstName": "Tracy",
"lastName": "Trader"
"tradeId": "TRADER1",
"firstName": "Jenny",
"lastName": "Jones"
}
```

```
{
"$class": "org.acme.trading.Trader",
"tradeId": "TOM",
"firstName": "Tom",
"lastName": "Trader"
"tradeId": "TRADER2",
"firstName": "Amy",
"lastName": "Williams"
}
```

Create a `Commodity` asset:


```
{
"$class": "org.acme.trading.Commodity",
"tradingSymbol": "ABC",
"description": "Test commodity",
"mainExchange": "Euronext",
"quantity": 72.297,
"owner": "resource:org.acme.trading.Trader#TRADER1"
}
```

Submit a `Trade` transaction:

```
{
"$class": "org.acme.trading.Trade",
"commodity": "resource:org.acme.trading.Commodity#Ag",
"newOwner": "resource:org.acme.trading.Trader#TOM"
"commodity": "resource:org.acme.trading.Commodity#ABC",
"newOwner": "resource:org.acme.trading.Trader#TRADER2"
}
```

Expand Down

0 comments on commit 40437dd

Please sign in to comment.