Skip to content

Instantly share code, notes, and snippets.

@vitiko

vitiko/block8.go Secret

Created July 23, 2019 07:45
Show Gist options
  • Save vitiko/b67f3b0731c5e971d9ba559ba1f5e90e to your computer and use it in GitHub Desktop.
Save vitiko/b67f3b0731c5e971d9ba559ba1f5e90e to your computer and use it in GitHub Desktop.
func NewCC() (*router.Chaincode, error) {
r, err := CCRouter(`CommercialPaper`)
if err != nil {
return nil, err
}
return router.NewChaincode(r), nil
}
func CCRouter(name string) (*router.Group, error) {
r := router.New(name)
// Store on the ledger the information about chaincode instantiation
r.Init(owner.InvokeSetFromCreator)
if err := service.RegisterCPaperChaincode(r, &CPaperImpl{}); err != nil {
return nil, err
}
return r, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment