hyperledger / fabric-chaincode-go

Hyperledger Fabric Packages for Go Chaincode
https://pkg.go.dev/github.com/hyperledger/fabric-chaincode-go
Apache License 2.0
141 stars 132 forks source link

However chain codes can also take structs as the arguments instead for using just a list of variables. #101

Closed SamYuan1990 closed 8 months ago

SamYuan1990 commented 8 months ago

ref to https://github.com/Hyperledger-TWGC/tape/issues/377 it seems chaincode now supports structs, does it implemented with golang?

However chain codes can also take structs as the arguments instead for using just a list of variables.

denyeart commented 8 months ago

Chaincodes written with Go contract api can take struct arguments. Client would pass as JSON and the contract serializer will convert to the struct. See doc at https://github.com/hyperledger/fabric-contract-api-go/blob/main/tutorials/managing-objects.md