fabric-contract-go

module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: Apache-2.0

README

Maintained by Spydra.app Go Reference

Spydra Hyperledger Fabric Base Contract

The Spydra Hyperledger Fabric Base Contract has various utility methods which provide additional functionalities out of the box to any Chaincode that is deployed in a Spydra blockchain network. Simply extend your own Chaincode Smart Contract from the Spydra Base Contract to get these additional features.

  • Query the world state using Graph QL. For more details, refer to Spydra Graph QL.

Quick Start

  1. Run go get.

    $ go get -u github.com/spydra-tech/fabric-contract-go/spydracontract
    
  2. Extend your Smart Contract from the Spydra Base Contract.

    type MyCustomContract struct {
        spydracontract.SpydraContract
    }
    
  3. Instatiate the Chaincode with the SpydraContract as one of the Smart contracts.

    myChaincode, err := contractapi.NewChaincode(&myPackage.MySmartContract{}, &spydracontract.SpydraContract{})
    
  4. Deploy the Chaincode on a Spydra Blockchain network and start querying on any attribute using Graph QL.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL