MCPcopy
hub / github.com/yeasy/blockchain_guide / readCenterBank

Function readCenterBank

11_app_dev/chaincode_example03.go:334–340  ·  view source on GitHub ↗
(ctx contractapi.TransactionContextInterface)

Source from the content-addressed store, hash-verified

332}
333
334func readCenterBank(ctx contractapi.TransactionContextInterface) (*CenterBank, error) {
335 var centerBank CenterBank
336 if err := readJSON(ctx, centerBankKey, &centerBank); err != nil {
337 return nil, err
338 }
339 return &centerBank, nil
340}
341
342func readBank(ctx contractapi.TransactionContextInterface, id int) (*Bank, error) {
343 var bank Bank

Callers 3

IssueCoinMethod · 0.85
IssueCoinToBankMethod · 0.85
GetCenterBankMethod · 0.85

Calls 1

readJSONFunction · 0.70

Tested by

no test coverage detected