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

Function readHome

11_app_dev/chaincode_example05.go:209–215  ·  view source on GitHub ↗
(ctx contractapi.TransactionContextInterface, address string)

Source from the content-addressed store, hash-verified

207}
208
209func readHome(ctx contractapi.TransactionContextInterface, address string) (*Home, error) {
210 var home Home
211 if err := readJSON(ctx, homeKey(address), &home); err != nil {
212 return nil, err
213 }
214 return &home, nil
215}
216
217func readHomeByID(ctx contractapi.TransactionContextInterface, id int) (*Home, error) {
218 addressBytes, err := ctx.GetStub().GetState(homeIDKey(id))

Callers 4

BuyByAddressMethod · 0.85
ChangeStatusMethod · 0.85
GetHomeByAddressMethod · 0.85
readHomeByIDFunction · 0.85

Calls 2

homeKeyFunction · 0.85
readJSONFunction · 0.70

Tested by

no test coverage detected