Signed-off-by:Renjith KN <renjithkn@gmail.com>

Signed-off-by: renjithpta <renjithkn@gmail.com>
This commit is contained in:
renjithpta 2022-04-01 18:31:32 +05:30
parent b97d9daa1d
commit b20ad9572b

View file

@ -30,7 +30,7 @@ import org.hyperledger.fabric.shim.ledger.QueryResultsIterator;
public class ERC721TokenContract implements ContractInterface { public class ERC721TokenContract implements ContractInterface {
/** /**
* BalanceOf counts all non-fungible tokens assigned to an owner. There is a key record for every * BalanceOf counts all non-fungible tokens assigned to an owner.There is a key record for every
* non-fungible token in the format of balancePrefix.owner.tokenId. balanceOf() queries for and * non-fungible token in the format of balancePrefix.owner.tokenId. balanceOf() queries for and
* counts all records matching balancePrefix.owner.* * counts all records matching balancePrefix.owner.*
* *
@ -315,17 +315,9 @@ public class ERC721TokenContract implements ContractInterface {
final String clientMSPID = ctx.getClientIdentity().getMSPID(); final String clientMSPID = ctx.getClientIdentity().getMSPID();
final ChaincodeStub stub = ctx.getStub(); final ChaincodeStub stub = ctx.getStub();
if (!clientMSPID.equalsIgnoreCase(ContractConstants.MINTER_ORG_MSP.getValue())) { // Check
// minter // Check minter authorization this sample assumes Org1 is the issuer with privilege to mint a new token
// authorization if (!clientMSPID.equalsIgnoreCase(ContractConstants.MINTER_ORG_MSP.getValue())) {
// - this
// sample
// assumes
// Org1 is the
// issuer with
// privilege
// to mint a
// new token
throw new ChaincodeException( throw new ChaincodeException(
"Client is not authorized to set the name and symbol of the token", "Client is not authorized to set the name and symbol of the token",
ContractErrors.UNOTHERIZED_SENDER.toString()); ContractErrors.UNOTHERIZED_SENDER.toString());