mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
docs: remove repetitive words
Signed-off-by: ChengenH <hce19970702@gmail.com>
This commit is contained in:
parent
15ab2e5da8
commit
a2400500be
8 changed files with 10 additions and 10 deletions
|
|
@ -167,7 +167,7 @@ func (s *SmartContract) CreateAsset(ctx contractapi.TransactionContextInterface)
|
|||
|
||||
// AgreeToTransfer is used by the potential buyer of the asset to agree to the
|
||||
// asset value. The agreed to appraisal value is stored in the buying orgs
|
||||
// org specifc collection, while the the buyer client ID is stored in the asset collection
|
||||
// org specifc collection, while the buyer client ID is stored in the asset collection
|
||||
// using a composite key
|
||||
func (s *SmartContract) AgreeToTransfer(ctx contractapi.TransactionContextInterface) error {
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ public final class AssetTransfer implements ContractInterface {
|
|||
/**
|
||||
* AgreeToTransfer is used by the potential buyer of the asset to agree to the
|
||||
* asset value. The agreed to appraisal value is stored in the buying orgs
|
||||
* org specifc collection, while the the buyer client ID is stored in the asset collection
|
||||
* org specifc collection, while the buyer client ID is stored in the asset collection
|
||||
* using a composite key
|
||||
* Uses transient map with key asset_value
|
||||
*
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export class AssetTransfer extends Contract {
|
|||
|
||||
// AgreeToTransfer is used by the potential buyer of the asset to agree to the
|
||||
// asset value. The agreed to appraisal value is stored in the buying orgs
|
||||
// org specifc collection, while the the buyer client ID is stored in the asset collection
|
||||
// org specifc collection, while the buyer client ID is stored in the asset collection
|
||||
// using a composite key
|
||||
@Transaction()
|
||||
public async AgreeToTransfer(ctx: Context): Promise<void> {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ We need to use the latest 2.4.1 release as this contains some improvements to ma
|
|||
- The `ccaasbuilder` applications are included in the binary tgz archive download for use in other circumstances. The `sampleconfig/core.yaml` is updated as well to refer to 'ccaasbuilder'
|
||||
- The 2.4.1 Java Chaincode release has been updated to remove the need to write a custom bootstrap main class, similar to the Node.js Chaincode. It is intended that this will be added to the go chaincode as well.
|
||||
|
||||
## End-to-end with the the test-network
|
||||
## End-to-end with the test-network
|
||||
|
||||
The `test-network` and some of the chaincodes have been updated to support running chaincode-as-a-service. The commands below assume that you've got the latest fabric-samples cloned, along with the latest Fabric docker images.
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ For Java please note:
|
|||
In the traditional approach, each peer that the chaincode is approved on will have a container running the chaincode. With the '-as-a-service' approach we need to achieve the same architecture.
|
||||
|
||||
As the `connection.json` contains the address of the running chaincode container, it can be updated to ensure that each peer connects to a different container. However the as the `connection.json` in the chaincode package, Fabric mandates that the package id is consistent amongst all peers in an organization. To achieve that
|
||||
the the external builder supports a template capability. The context from this template is taken from an environment variable set on each Peer. `CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG`
|
||||
the external builder supports a template capability. The context from this template is taken from an environment variable set on each Peer. `CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG`
|
||||
|
||||
We can define the address to be a template in the `connection.json`
|
||||
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ cp "${PWD}/organizations/peerOrganizations/org1.example.com/msp/config.yaml" "${
|
|||
|
||||
The minter intends to approve 500 tokens to be transferred by the spender, but first the spender needs to provide their own client ID as the payment address.
|
||||
|
||||
Open a 3rd terminal to represent the spender in Org1 and navigate to fabric-samples/test-network. Set the the environment variables for the Org1 spender user.
|
||||
Open a 3rd terminal to represent the spender in Org1 and navigate to fabric-samples/test-network. Set the environment variables for the Org1 spender user.
|
||||
|
||||
```
|
||||
export PATH=${PWD}/../bin:${PWD}:$PATH
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ cp ${PWD}/organizations/peerOrganizations/org1.example.com/msp/config.yaml ${PWD
|
|||
|
||||
The minter intends to approve a non-fungible token to be transferred by the operator, but first the operator needs to provide their own client ID as the payment address.
|
||||
|
||||
Open a 3rd terminal to represent the operator in Org1 and navigate to fabric-samples/test-network. Set the the environment variables for the Org1 operator user.
|
||||
Open a 3rd terminal to represent the operator in Org1 and navigate to fabric-samples/test-network. Set the environment variables for the Org1 operator user.
|
||||
|
||||
```
|
||||
export PATH=${PWD}/../bin:${PWD}:$PATH
|
||||
|
|
@ -304,7 +304,7 @@ And then request the approval for the operator to transfer the token.
|
|||
|
||||
```
|
||||
# Issue a new token
|
||||
peer chaincode invoke $TARGET_TLS_OPTIONS -C mychannel -n token_erc721 -c '{"function":"MintWithTokenURI","Args":["102", "https://example.com/nft102.json"]}' --waitForEvent
|
||||
peer chaincode invoke $TARGET_TLS_OPTIONS -C mychannel -n token_erc721 -c '{"function":"MintWithTokenURI","Args":["102", "https://example.com/nft102.json"]}' --waitForEvent
|
||||
|
||||
# The owner approves
|
||||
export OPERATOR="x509::/C=US/ST=North Carolina/O=Hyperledger/OU=client/CN=operator::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ public class ERC721TokenContract implements ContractInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the the NFT details by token id.
|
||||
* Get the NFT details by token id.
|
||||
*
|
||||
* @param ctx the transaction context
|
||||
* @param tokenId Unique ID of a non-fungible token
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ Now you are ready to call the deployed smart contract via peer CLI calls. But le
|
|||
|
||||
The smart contract supports UTXO ownership based on individual client identities from organizations that are members of the channel. In our scenario, the minter of the tokens will be a member of Org1, while the recipient will belong to Org2. To highlight the connection between the `GetClientIdentity().GetID()` API and the information within a user's certificate, we will register two new identities using the Org1 and Org2 Certificate Authorities (CA's), and then use the CA's to generate each identity's certificate and private key.
|
||||
|
||||
First, we need to set the following environment variables to use the the Fabric CA client (and subsequent commands)
|
||||
First, we need to set the following environment variables to use the Fabric CA client (and subsequent commands)
|
||||
```
|
||||
export PATH=${PWD}/../bin:${PWD}:$PATH
|
||||
export FABRIC_CFG_PATH=$PWD/../config/
|
||||
|
|
|
|||
Loading…
Reference in a new issue