getting an error when I am trying to add an asset through transaction in hyperledger composer

getting an error when I am trying to add an asset through transaction in hyperledger composer

<strong>sample.cto file</strong>

sample.cto file

namespace org.example.basic
 asset Supplier identified by suppliername
      o String suppliername
    asset product identified by productname{
    o String productname
    -->Supplier supplier
    o Integer amount
transaction SampleTransaction {
      -->product productasset
      o String productname
      o String supplier
      o Integer amount

logic.js file

/* Sample transaction processor function. * @param {org.example.basic.SampleTransaction} tx The sample transaction instance. * @transaction */

async function createPost(tx) {

var factory = getFactory();
      return getAssetRegistry("org.example.basic.product")
      .then(function(postAssetRegistry) {
       var productname=tx.productname
       newPost = factory.newResource("org.example.basic", "product", productname);
       newPost.productname = tx.productname;
       newPost.supplier = tx.supplier;

   return postAssetRegistry.add(newPost);



click here to view error image

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

how tampering of data (already added block's data) in blockchain or worldstate is detected in blockchain and hyperledger fabric?

I have a couple of question regarding the tamper proof mechanism of the blockchain.

Blockchain (Hyperledger sawtooth) data management

When you think about designing a blockchain network using Hyperledger sawtooth, It’s important to consider how your data will grow and amplify as your business. Being familiar with on-chain and off-chain data there are certain questions that popped up in terms of data management.

Deploy and expose chaincode as REST api on amazon managed blockchain hyperledger fabric 1.2

I have configured amazon managed blockchain setup with Hyperledger 1.2. The network is prepared with a single member and a single peer node. Hyperledger Fabric Client setup is with Golang 1.10.3. I have installed, Instantiated, Queried and Invoked mycc chaincode example given in AWS tutorial