-
-
Save vitiko/b67f3b0731c5e971d9ba559ba1f5e90e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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