Guest User

Untitled

a guest
Jun 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.  
  5. "fmt"
  6. "encoding/json"
  7. "strconv"
  8. "github.com/hyperledger/fabric/core/chaincode/shim"
  9. pb "github.com/hyperledger/fabric/protos/peer"
  10. )
  11.  
  12. // ============================================================================================================================
  13. // write() - genric write variable into ledger
  14. //
  15. // Shows Off PutState() - writting a key/value into the ledger
  16. //
  17. // Inputs - Array of strings
  18. // 0 , 1
  19. // key , value
  20. // "abc" , "test"
  21. // ============================================================================================================================
  22. func write(stub shim.ChaincodeStubInterface, args []string) pb.Response {
  23. var value,key string
  24. var err error
  25. var keys = 1
Add Comment
Please, Sign In to add comment