Commit graph

71 commits

Author SHA1 Message Date
Tiffany Harris
0d247f06b7 Add VerifyAssetProperties to marbles_transfer example
- Add query to verifies asset properties
- Delete price records from buyer and seller private data collections
when transfer is complete
- Add 'receipt' for asset transfer

Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
2020-06-04 12:34:50 -04:00
Ry Jones
61107dbf84
FAB-17930: Update licenses (#191)
Signed-off-by: Ry Jones <ry@linux.com>
2020-05-26 21:43:33 +02:00
Tiffany Harris
df292e0e8d Implement sale, bid, and history queries
- Add marbles proposed sale and bid prices queries
- Add marbles history query
- Add verification of ownership when selling marble

Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
Signed-off-by: Dereck Luo <dereckluo@gmail.com>
2020-05-25 21:22:01 -04:00
NIKHIL E GUPTA
0c61f84af7 Fix last image in transfer sample
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-05-21 14:17:41 -04:00
nikhil550
59af212cb3
Add transfer sample to readme (#189)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-05-21 15:48:31 +02:00
NIKHIL E GUPTA
577bf20fd8 Update marbles transfer images
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-05-20 17:04:14 -04:00
NIKHIL E GUPTA
6c876534bc Add function to private data hash to sample private data chaincode
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-05-20 17:02:46 -04:00
Arnaud J Le Hors
2e3683c419
Add missing Copyright in some files (#163)
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2020-05-19 15:50:48 +01:00
NIKHIL E GUPTA
72c4bbaff0 Add asset transfer (marbles transfer) sample chaincode
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-05-15 16:28:49 -04:00
heatherlp
6f853b56a4 FABCAG-27 Update fabric-samples to use latest contract-api-go@v1.1.0
Signed-off-by: heatherlp <heatherpollard0@gmail.com>
2020-05-01 09:47:36 -04:00
nikhil550
b0d73fefe1
[FAB-17818] Update documetation in Fabric samples repo (#170)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-04-30 17:54:51 +02:00
Hongbin Mao
cedb74dea3
add miss checksum (#168)
Signed-off-by: hello2mao <hello2mao@gmail.com>
2020-04-27 12:59:24 +02:00
denyeart
11e4c23a35
Update samples to use v2.0 or later dependencies (#161)
Update application and chaincode dependendencies to use v2.0 or
later versions in package.json, build.gradle, pom.xml files.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2020-04-17 14:29:37 +02:00
Pritam Singh
381fb465be
upgraded abstore golang chaincode to use contract-api package (#154)
* upgraded abstore golang chaincode to use contract-api package

Signed-off-by: Pritam Singh <pkspritam10@gmail.com>

* resolved the issue

Signed-off-by: Pritam Singh <pkspritam10@gmail.com>
2020-04-08 15:36:13 +02:00
Stefan Obermeier
5e5d2c8e01
Update java chaincode to be compatible with doc and other implementations (#149)
* Use numbers without leading zeroes for key

Signed-off-by: Stefan Obermeier <scray@stefan-obermeier.de>

* Update chaincode to be compatible with doc.

E.g. Return key of the queried record

Signed-off-by: Stefan Obermeier <scray@stefan-obermeier.de>

* Clean up

Use always whitespaces to indent the start of the line
Remove unnecessary whitespaces

Signed-off-by: Stefan Obermeier <scray@stefan-obermeier.de>
2020-04-07 09:09:10 +02:00
James Taylor
db69c6ff19
Add fabcar external service sample (#136)
Add sample which can be used with the builder scripts described in
the "Chaincode as an external service" documentation

Signed-off-by: James Taylor <jamest@uk.ibm.com>
2020-03-20 15:06:01 +00:00
Andrew Hurt
0df5ed9269
[FAB-17477] Update fabcar to use go api v1.0.0 (#116)
Signed-off-by: Andrew Hurt <andrew.hurt1@ibm.com>
2020-02-07 10:42:47 +00:00
Matthew B White
571733f7b9 [FAB-17447] Update to 2.0.0 Libraries
NodeSDK has not been released at 2.0.0 to date

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
2020-01-29 00:26:12 -05:00
Brett Logan
4fe6a2507e [FABCI-482] Update Nexus URL's to Artifactory (#92)
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-01-20 15:33:02 +00:00
Matthew B White
94ac8b6050 Update to use beta levels of modules (#88)
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
2019-12-13 20:20:58 +00:00
Andrew Hurt
429f087c5a
update fabcar go to new programming model
Signed-off-by: Andrew Hurt <andrew.hurt1@ibm.com>
2019-11-25 16:57:20 +00:00
Simon Stone
890f9eab9f [FAB-16713] Fix npm audit warnings
Also add .gitignore files for abstore/marbles02, as these are
currently missing.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I9f9da3e5289a275dd26c1021ea8de80def605e36
2019-10-07 04:16:39 -04:00
SteveKIM
670d446139 [FAB-16668] fabcar chaincode modify console output
Signed-off-by: SteveKIM <khktoto@gmail.com>
Change-Id: I6f549c9ed6e3142b2476d1cd8674d2a6d453668f
2019-09-24 13:08:20 +00:00
Simon Stone
3d19014bd7 [FAB-6415] Java 11 support for FabCar sample
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I97cd3ab48f6f2fe828c3328adfaf706be5124387
2019-09-24 09:41:02 +01:00
Simon Stone
e2b7cb7464 [FAB-6415] Java 11 support for abstore sample
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: Ie66fc453cba72dee4ad84b5d1e77feb64a37f678
2019-09-24 09:41:02 +01:00
Matthew White
7010c503ac Merge "[FAB-16607] Update FabCar to reflect CC updates" 2019-09-19 13:01:35 +00:00
Simon Stone
521a7ffc4a [FAB-16607] Update FabCar to reflect CC updates
Node.js CC:
As a result of using the new protobufjs library, certain
external APIs have changed in the Node.js chaincode. The
samples need to be updated to use these new APIs.

Java CC:
As a result of moving to Java 11, we hit this issue:
https://github.com/gradle/gradle/issues/8286
The sample needs to be updated to specify the absolute
path to checkstyle's suppression.xml.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I4db886b3feff46d165e05a7eda624230b65f9cbe
2019-09-19 13:26:51 +01:00
Dongming
c13a5ec8f6 [FAB-16528] marbles private chaincode sync up
This CR is part 2 of porting changes in marbles
private in fabric/integration by FAB-15894 back
to fabric-samples

Signed-off-by: Dongming <dongming@ibm.com>
Change-Id: Ic823bdf4c3c571f43b4700452c50fd4283d35262
2019-09-11 12:35:25 -04:00
Dongming
3fad853c15 [FAB-16528] marbles private chaincode sync up
This CR is to port minor changes made in marbles
private in fabric/integration by FAB-15894 back
to fabric-samples.

Signed-off-by: Dongming <dongming@ibm.com>
Change-Id: I3d729f0d692dbd24e11c1cce45233eda5ddb4831
2019-09-06 12:49:22 -04:00
Simon Stone
86ff0e6581 Merge "[FAB-16362] adding chaincode excution comments" 2019-09-06 12:11:26 +00:00
jaehyun
48082cfa95 [FAB-16362] adding chaincode excution comments
adding chaincode excution comments

Signed-off-by: jaehyun <jaehyun@lgcns.com>
Change-Id: I61ce32561f68fb8db8e0dc3f0d18b0564aaafb70
2019-08-30 10:28:39 +09:00
rthatcher
1d379f341d [FAB-16474] marbles02 chaincode error
Signed-off-by: rthatcher <robert.thatcher@uk.ibm.com>
Change-Id: I72d857b2fe905cbb75e33b76b1ac838e83e6f756
2019-08-29 16:05:50 +01:00
Matthew Sykes
1d3e267bbd Redirect samples to fabric-{chaincode,protos}-go
FAB-16401 #done

Change-Id: I9e6c3857cf1842ccf43d7fa0d25ff64dbeae12d0
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
2019-08-23 17:25:16 +00:00
Simon Stone
3996db59dc [FAB-12219] abstore node -> javascript
Rename the abstore node directory as the sample code
within is JavaScript, and we are planning to add a
TypeScript version as well.

This change also requires updates to BYFN to reflect
the renamed directory.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I1cd554c6598ac7cc71e2b0c65ab541cfaa477354
2019-08-02 11:22:56 +01:00
Simon Stone
14ac271c63 [FAB-12219] marbles02 node -> javascript
Rename the marbles02 node directory as the sample code
within is JavaScript, and we are planning to add a
TypeScript version as well.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I423c8cf78fa16be057f762316e8b3d60b73df7ba
2019-08-02 10:07:31 +01:00
Simon Stone
81be9da421 Merge "[FAB-15625] Add UT for Simple Asset Chaincode" 2019-07-30 14:11:49 +00:00
Tatsuya Sato
868f9d01ca [FAB-15625] Add UT for Simple Asset Chaincode
This patch adds unit test for chaincode/sacc.

The positive test cases are aligned with the manual testing procedures
described in `fabric/docs/source/chaincode4ade.rst`.

FAB-15625 #done

Patch-set #4: adjust to new shim Mockup location

Change-Id: Ic3625e885f6e49507859af7d5f0bfa136eb7a757
Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-07-30 12:56:06 +00:00
Simon Stone
597d1508e1 [FAB-14532] Remove LL FabCar sample
Remove the Fabric v2.0 version of the low-level FabCar sample. We
should not be advertising how to use the low-level APIs at this
point. The low-level samples are still available for Fabric v1.4
to show the difference between the low-level and high-level APIs.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I87b7edf477064b79f449f618f48902b9495e7d4a
2019-07-30 12:03:18 +01:00
James Taylor
750f937218 [FAB-15213] Add Java FabCar sample contract
Change-Id: I0ae40c2a02aea8293a348038e3e1bd02f7030509
Signed-off-by: James Taylor <jamest@uk.ibm.com>
2019-07-29 11:59:30 +00:00
kukgini
1387aa8319 [FAB-15927] Better expression for golang
Better for loop expression and veriable scope for golang

Signed-off-by: kukgini <kukgini@gmail.com>
Change-Id: I83a4ead246039b5b10334467f17c808465492725
2019-07-17 07:48:48 +00:00
Gari Singh
c57d67ce80 FAB-15782 Sample Go CC should include deps
The ccenv used to build Go chaincode is being
updated to no longer include the shim
dependency.  Go chaincode must now vendor
all of its dependencies prior to being
packaged and installed.

Go chaincodes have been updated to include
go.mod for versioned dependencies.

Change-Id: Ib971cd3f841d5c92a509450bd85f6e424cc60c6e
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-06-25 09:50:31 -04:00
Arnaud J Le Hors
ae91463639 Merge "[FAB-13769] Add UT code to ABAC sample Chaincode" 2019-06-05 12:07:13 +00:00
David Enyeart
f5278157ac [FAB-15119] Fix BYFN with Java chaincode
The issue is that BYFN passes "Init" function while the
sample Java chaincode checks for "init" function.

Within the init function, there is no need to check the function
argument that is passed in. The sample Go chaincode and Node.js
chaincode do not check the function argument. This change makes
sample Java chaincode behave the same way.

Change-Id: I802978e1276e92a3d420b3f4a391ff66a352d321
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-04-09 05:42:08 -04:00
David Enyeart
137327a009 [FAB-14162] Pin fabric-samples in master to "unstable"
Pin fabric-samples in master to "unstable" so that latest node modules get used by default.

Change-Id: I36df30cb108a350c8e59756ed0d2f03610eb1d73
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-02-12 13:08:22 -05:00
Arnaud J Le Hors
6007c0974c [FAB-13862] Rename example02 ABstore
Updated chaincode, BYFN, and all other references to example02 to use
the new name ABstore.

Change-Id: I04c177f9de68eb913f4384fd643aa69631143d58
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-01-30 09:02:23 +01:00
Yuki Kondo
b0cda61eaf [FAB-13769] Add UT code to ABAC sample Chaincode
This CR adds unit test code to the ABAC sample Chaincode to show
how to use MockStub for Chaincode that uses the `cid` package.
To test the access control in Chaincode method, Creator field in
MockStub is set by reading mspID and certificate with attributes.

FAB-13769 #done

Change-Id: Iddc5ea105b25afcc18b8ff54cf359d2b9406e829
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-01-18 21:20:48 +00:00
David Enyeart
8a458b5cdc [FAB-12056] Private marbles cc use transient data
The marbles02_private example needs to be updated to pass all
attributes as transient data instead of arguments.
This will prevent identifiable information being sent to the orderer.

Also removed transferMarblesBasedOnColor since range
queries and update is not supported in a transaction when
using private data, as different peers may have
different data in their local private state
databases.

Change-Id: I7c3cebcb49b6c59e4e8ea35f46a799ffdd1999e9
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-01-06 16:52:37 -05:00
David Enyeart
9567985d29 [FAB-13407] Align fabric-samples with 1.4.0-rc2 release
Change-Id: If784ead9b35c89b874078fe3e87e702fd3be5953
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-12-20 17:11:36 -05:00
David Enyeart
6a7472e72e [FAB-13126] Align fabric-samples with 1.4.0-rc1 release
Change-Id: I2ff248e93cbac8747c322672f7a831ece597e116
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-12-12 07:55:08 -05:00
Simon Stone
445ccbc25a [FAB-12880] Move old prog model samples for FabCar
Move the old programming model samples for FabCar,
including the "node" (JavaScript!) chaincode sample
and the JavaScript application in the top level into
new subdirectories called "javascript-low-level".

We still want to keep these samples around for comparision
purposes, but most new developers should be using the new
samples built using the new programming model.

At the same time, update the startFabric.sh script
to output correct help information on how to run
the applications built using the new programming model
after starting the Fabric network and deploying the chaincode.

Change-Id: I1e3701737f105cba67f661bf893771ac8a3a0373
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2018-12-10 21:39:30 +00:00