Commit graph

29 commits

Author SHA1 Message Date
Mark S. Lewis
8538e32437
Update Gradle version and shadow plugin (#1278)
The shadow plugin is now maintained by the GradleUp organization. Change
to use the current plugin ID and latest version.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-12-11 08:04:56 -05:00
Mark S. Lewis
c077dae79c Update TypeScript implementations
- Dependency updates
- ESLint flat configuration format, replacing deprecated configuration
- Minor fixes to compile and lint issues
- Consistent TypeScript formatting with .editorconfig

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-18 06:51:58 -04:00
Mark S. Lewis
29e695187a Use more specific chaincode package versions
This demonstrates good practice in restricting the chaincode package
versions to those applicable for the specific Fabric (major/minor)
version targeted for deployment.

Also some corrections to the repository README. Particularly referring
to other branches for samples targeted at earlier Fabric versions, since
samples in the main branch may exploit features not available in older
Fabric releases, which can cause confusion for end users.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-14 00:24:08 -04:00
Mark S. Lewis
0ed34585e1 Update Node chaincode for v2.5.5 release
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-06-03 15:27:51 -04:00
David Enyeart
bf61094231 Remove double quotes for env variables
Double quotes have caused issues in some environments,
e.g. see https://github.com/hyperledger/fabric/issues/4358

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2024-05-07 01:06:09 +09:00
Mark S. Lewis
d4ce4cfadc Update asset-transfer-sbe/chaincode-java
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-04-11 22:57:57 -04:00
Mark S. Lewis
db86460086 Use latest v2.5 fabric-chaincode-java
- Update Gradle wrappers
- Update shadow plugin

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2024-02-25 22:13:26 -05:00
Mark S. Lewis
6e71f634e2 Fixes for build breakages
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2023-09-19 13:08:40 -04:00
Dave Enyeart
75b8419113
Sample apps should exit code 1 upon failure (#1003)
Ensure that all sample applications return exit code 1 upon failure
so that github actions can report the failure.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2023-03-17 13:18:18 +00:00
Mark S. Lewis
10e9377555 Avoid explicit import of grpc-js or fabric-protos in TypeScript apps
Rely on the dependencies of @hyperledger/fabric-gateway making these packages transitively available. Having explicit dependency versions in the application can cause type conflicts due to private member changes in the gRPC Client class across versions.

Also fix some missing or incorrect Node types and engines version contraints.

Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
2023-02-10 11:36:41 -05:00
jkneubuh
c986c8d227
Run FSAT tests with 2.5 images, binaries, and trigger on all builds for regression coverage (#919)
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2023-01-27 09:49:52 -05:00
jkneubuh
124adb43f9
run test suites with 2.5 binaries and images (#906)
* run test suites with 2.5 binaries and images

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Swap to use the Helper Function to create policies (#907)

The old way used the direct protobuf functions, there is a helper function
in the chaincode does exactly that.

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
Co-authored-by: Matthew B White <whitemat@uk.ibm.com>
2023-01-18 16:05:40 +00:00
Matthew B White
e7d3b41287
Swap to use the Helper Function to create policies (#908)
The old way used the direct protobuf functions, there is a helper function
in the chaincode does exactly that.

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
2023-01-18 07:25:07 -05:00
ali
05c06f4931
Fixed comment consistency problem (#844)
* fixed comment consistency problem with erc20 chaincode

Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>

* added more comment consistancy fix

Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>

* added more comment consistancy fix

Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>

* added more comment consistancy fix

Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>

* added more comment consistancy fix

Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>

Signed-off-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
Co-authored-by: Ali Shahverdi <ali@Alis-MacBook-Pro.local>
2022-12-14 09:18:21 +01:00
Mark S. Lewis
0f877fad4d
Remove JCenter as a Gradle package repository (#589)
JCenter is deprecated, can no longer be published to, and is scheduled for removal. It is now causing build failures. Replace with Maven Central.

Also remove mavenLocal() as this is not recommended practice:

- https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local

Note that Jitpack still needs to be included as a package repository for Java chaincode since it has dependencies on an old version of com.github.everit-org.json-schema:org.everit.json.schema that is only published there.

Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
2022-01-26 16:29:09 -05:00
sapthasurendran
56a1bf3e19
* Made consistent lint command (#495)
* Removed global install of lint modules
* Fixed Lint Issues

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added lint script forapplication javascript

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

updated lint command  for chaincode javascript

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

updated lint script

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

remove installing dependencies

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added lint script to js projects

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added more lint scripts

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added more lint scripts

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added missing npm lint command

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added missing eslint npm module

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

Fix missing npm lint command

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added missing eslint npm module to auction-simple javascctipt app

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint npm module

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint dependency

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint dependency

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

added eslint dependency

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

Single command for ts js lint

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>

Fix or condition in lint.sh

Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>
2021-10-06 13:33:29 +01:00
fraVlaca
da65e20f7d
Updated dependencies for Json and fabric-chaincode-shim:2.+ in java samples (#481)
* fixed json dependencies for java

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* updated dependency for asset-tranfer-sbe: now declaing also org.hyperledger.fabric.protos.common

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* "corrected typo of last commit and added testImplementation 'org.hyperledger.fabric.protos.common'"

Signed-off-by: fraVlaca <ocsenarf@outlook.com>

* included correct dependecy for fabric-protos and added com.google.protobuf as well

Signed-off-by: fraVlaca <ocsenarf@outlook.com>
2021-09-01 20:19:15 +02:00
Kestutis Gudynas
3acff50554
Java chaincode samples fixed (#432)
Signed-off-by: Kestutis Gudynas <44440041+kemi04@users.noreply.github.com>
2021-03-24 12:43:54 +00:00
Waleed Mortaja
14dc7e1316
Fix creating channel when ${PWD} contains space. (#402)
* Fix creating channel when ${PWD} contains space.

If the path of the project contains spaces, the "test-network/scripts/envVar.sh" script sets the value of "$ORDERER_CA" to a value containg "${PWD}" which, in turn, contains space(s).

When the variable used in "test-network/scripts/createChannel.sh", The first part of the value (before the first space) is handled as the whole value for "--cafile". Other parts are considered to be part of the command!

I tried putting (escaped) quotes in the "test-network/scripts/envVar.sh" definition for the variable "$ORDERER_CA" to make the fix more general, but the quotation marks were sometime interpreted to be part of the path that consisted of concatenated parts somewhere and it did not work.

While this edit will fix this issue, I belive this is just a work around. I expect that there is a better way to solve the root cause of the problem instead of just fixing it in one place. Moreover, All variables/paths that may include spaces should be properly handled as well.

Thanks

Signed-off-by: Waleed Mortaja <waleedmortaja@protonmail.com>

* Double quote variables evaluations that depends on $PWD

I tried to handle most (if not all) of the variables evaluations in the project that depends on $PWD by wrapping them in double-quotations to avoid values that contains white spaces.

Some lines I was not sure if they are Okay or not but I left them as they are. Samples (not all lines) as follows:
- commercial-paper/network-clean.sh:15:DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- commercial-paper/network-starter.sh:15:DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- asset-transfer-basic/chaincode-javascript/node_modules/fabric-shim/coverage/fabric-shim/lib/chaincode.js.html:997: optsCpy.pem = fs.readFileSync(process.env.CORE_PEER_TLS_ROOTCERT_FILE).toString();
- commercial-paper/organization/digibank/digibank.sh:29:export PEER_PARMS="${PEER_CONN_PARMS##*( )}"

The next sample I was not really sure, but still edited it:
- test-network/addOrg3/fabric-ca/registerEnroll.sh:68:  cp ${PWD}/../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/tlscacerts/* ${PWD}/../organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt

I deliberately ignored some lines because I think they are not problem. These lines include:
- `export` sentences
- assignment sentences like: test-network/scripts/createChannel.sh:48:  FABRIC_CFG_PATH=$PWD/../config/
- gradlew files: the line SAVED="`pwd`"
- gradlew files: the line APP_HOME="`pwd -P`"
- gradlew files: the line CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

Signed-off-by: Waleed Mortaja <waleedmortaja@protonmail.com>

* remove unnecessary leading space trimming

Signed-off-by: Waleed Mortaja <waleedmortaja@protonmail.com>

* resolved conflict with master

Co-authored-by: Arnaud J Le Hors <lehors@us.ibm.com>
2021-01-20 16:32:38 +01:00
Brett Logan
08aaaf0313
Update Javascript and Typescript Deps (#403)
Update all of the Node deps to 2.2.<latest>
and regenerate existing package-lock.json files

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>

Co-authored-by: Brett Logan <brett.t.logan@ibm.com>
2021-01-13 12:19:31 -05:00
Julian Castrence
d6773d502c Remove Short Names and Replace With Full Path in Samples
Signed-off-by: Julian Castrence <juliancastrence@ibm.com>
2020-12-02 23:59:42 -05:00
Gaurav Giri
a432e7d70c
add setStateBasedEndorsementNOutOf for typescript chaincode (#330)
Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-10-12 16:07:15 +02:00
Bret Harrison
0bc6f89cf2 Add SBE javascript application
Add in a javascript application to show the state-based-endorsement
specific type of operations

Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2020-09-10 11:26:21 -04:00
Gaurav Giri
f9679ed9c9
Demonstrate NoutOf policies may be set for SBE (#316)
Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-09-02 14:08:07 -04:00
Gaurav Giri
67811efc92
Smart Contract using SBE implemented in Java (#302)
* asset smart contract using sbe implemented in java

Signed-off-by: Gaurav Giri <girigaurav@gmail.com>

* add sbe chaincode to ci

Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-08-25 10:03:28 -04:00
nikhil550
fdebe1f2e6
Update sbe transfer sample readme (#304)
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>

Co-authored-by: NIKHIL E GUPTA <negupta@us.ibm.com>
2020-08-19 12:50:33 -04:00
Brett Logan
11c05fa612 Add missing apps and chaincodes to CI
Adds the apps and chaincodes to linting and testing
CI that weren't added before.

Linting issues were corrected where necessary to make CI pass.

The Basic-Go application and Private-Javascript application
are currently disabled pending fixes currently being worked on.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-08-16 23:11:24 -04:00
Gaurav Giri
02368e99b0 SBE Improvements and Referencing SBE in fabric-samples readme and test-network
Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-08-09 14:58:18 -04:00
Gaurav Giri
6e965ec55f fabric samples for state-based endorsement for chaincode typescript
Signed-off-by: Gaurav Giri <girigaurav@gmail.com>
2020-08-07 18:20:57 -04:00