github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/core/container/dockercontroller/testdata/src/chaincodes/noop/chaincode.go (about)

     1  /*
     2  Copyright hechain. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package main
     8  
     9  import (
    10  	"fmt"
    11  
    12  	"github.com/hyperledger/fabric-chaincode-go/shim"
    13  	pb "github.com/hyperledger/fabric-protos-go/peer"
    14  )
    15  
    16  // No-op test chaincode
    17  type TestChaincode struct{}
    18  
    19  func (t *TestChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {
    20  	return shim.Success(nil)
    21  }
    22  
    23  func (t *TestChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
    24  	return shim.Success(nil)
    25  }
    26  
    27  func main() {
    28  	err := shim.Start(new(TestChaincode))
    29  	if err != nil {
    30  		fmt.Printf("Error starting Simple chaincode: %s", err)
    31  	}
    32  }