MCPcopy Index your code
hub / github.com/yeasy/blockchain_guide / GetTransactionByID

Method GetTransactionByID

11_app_dev/chaincode_example03.go:233–239  ·  view source on GitHub ↗
(ctx contractapi.TransactionContextInterface, id string)

Source from the content-addressed store, hash-verified

231}
232
233func (s *SmartContract) GetTransactionByID(ctx contractapi.TransactionContextInterface, id string) (*Transaction, error) {
234 transactionID, err := strconv.Atoi(id)
235 if err != nil {
236 return nil, err
237 }
238 return readTransaction(ctx, transactionID)
239}
240
241func (s *SmartContract) GetBanks(ctx contractapi.TransactionContextInterface) ([]Bank, error) {
242 count, err := currentID(ctx, bankCounterKey)

Callers

nothing calls this directly

Calls 1

readTransactionFunction · 0.85

Tested by

no test coverage detected