Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MCLDG committed Nov 27, 2018
1 parent 81a08cc commit 1f70a59
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# AWS Managed Blockchain Workshop
# Amazon Managed Blockchain Workshop

![Amazon Managed Blockchain](images/AmazonManagedBlockchain.png "Amazon Managed Blockchain")

## Building a network to track spending by non-profit organizations

This workshop builds an AWS Managed Blockchain Hyperledger Fabric network, a RESTful API and a
This workshop builds an Amazon Managed Blockchain Hyperledger Fabric network, a RESTful API and a
User Interface application that tracks donations and spend for non-profit organizations. Donors
are able to track the donations they make and how how their donations are being spent. Donations
and spending are tracked on a Hyperledger Fabric blockchain network with both donors and non-profits
Expand All @@ -13,11 +15,11 @@ and spending are tracked on a Hyperledger Fabric blockchain network with both do
and invoke chaincode
* Fabric Chaincode, written in Node.js, deployed to a Hyperledger Fabric network

This workshop will build an AWS Managed Blockchain Hyperledger Fabric network, deploy the chaincode,
This workshop will build an Amazon Managed Blockchain Hyperledger Fabric network, deploy the chaincode,
start the REST API server and finally run a UI application that uses the REST API to interact with the Fabric
network. The workshop is divided into four parts:

1. Building an AWS Managed Blockchain Hyperledger Fabric network. Instructions can be found in the folder: [ngo-fabric](ngo-fabric)
1. Building an Amazon Managed Blockchain Hyperledger Fabric network. Instructions can be found in the folder: [ngo-fabric](ngo-fabric)
2. Deploying the chaincode, or smart contract, that provides the donation and spend tracking functionality. Instructions can be found in the folder: [ngo-chaincode](ngo-chaincode)
3. Starting the RESTful API server that exposes the chaincode functions to client applications. Instructions can be found in the folder: [ngo-rest-api](ngo-rest-api)
4. Running the User Interface application. Instructions can be found in the folder: [ngo-ui](ngo-ui)
Expand All @@ -26,7 +28,7 @@ network. The workshop is divided into four parts:
To build the network, deploy the chaincode, start the RESTful API server and run the application, follow the
README instructions in parts 1-4, in this order:

* [Part 1:](ngo-fabric/README.md) Start the workshop by building the AWS Managed Blockchain Hyperledger Fabric network.
* [Part 1:](ngo-fabric/README.md) Start the workshop by building the Amazon Managed Blockchain Hyperledger Fabric network.
* [Part 2:](ngo-chaincode/README.md) Deploy the NGO chaincode.
* [Part 3:](ngo-rest-api/README.md) Run the REST API.
* [Part 4:](ngo-ui/README.md) Run the Application.
Expand Down
Binary file added images/AmazonManagedBlockchain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions ngo-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ will call the Fabric CA and enroll a new user. This user will then be used to in
execute queries against the Fabric network. You can register a new user in the UI application. The link
is on the login page. You can then login as that user and explore the application.

All of the information you see in the application is stored in the AWS Managed Blockchain Fabric network.
All of the information you see in the application is stored in the Amazon Managed Blockchain Fabric network.
You can check this by querying the REST API directly. You can cURL the REST API from the Fabric client
node. Examples of the cURL commands used with the REST API can be found in the files that load test data
into the network, such as [this one](../ngo-rest-api/ngo-load-workshop.sh)
Expand All @@ -113,13 +113,13 @@ You could also query the chaincode directly and see the same information. You qu
the Fabric client node. An example of how to query the chaincode can be found in [this script](../ngo-chaincode/test-chaincode-aws.sh)

## Step 6 - Pat yourself on the back, you've completed the workshop
You have successfully built a Hyperledger Fabric network using the AWS Managed Blockchain service, deployed
You have successfully built a Hyperledger Fabric network using the Amazon Managed Blockchain service, deployed
chaincode to the service, connected a RESTful API to the service and deployed an Angular application that
communicates with the RESTful API.

The workshop instructions can be found in the README files in parts 1-4:

* [Part 1:](../ngo-fabric/README.md) Start the workshop by building the AWS Managed Blockchain Hyperledger Fabric network.
* [Part 1:](../ngo-fabric/README.md) Start the workshop by building the Amazon Managed Blockchain Hyperledger Fabric network.
* [Part 2:](../ngo-chaincode/README.md) Deploy the NGO chaincode.
* [Part 3:](../ngo-rest-api/README.md) Run the REST API.
* [Part 4:](../ngo-ui/README.md) Run the Application.
2 changes: 1 addition & 1 deletion ngo-ui/src/app/services/shared/utils.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class UtilsService {
try {
const decimalIndex = floatStr.indexOf('.');
if (decimalIndex > 0 && floatStr.length > decimalIndex + offset) {
return parseFloat(floatStr.substring(floatStr.indexOf('.'), floatStr.indexOf('.') + offset));
return parseFloat(floatStr.substring(0, decimalIndex + offset));
}
return parseFloat(floatStr);
} catch (e) {
Expand Down

0 comments on commit 1f70a59

Please sign in to comment.