Skip to content

Commit

Permalink
feat: ccapi is working
Browse files Browse the repository at this point in the history
  • Loading branch information
osamamagdy committed Sep 8, 2024
1 parent 440089b commit d16a642
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ cscope.*
common/protos
internal/protos
coverage.out
vendor
vendor
12 changes: 9 additions & 3 deletions ecc_go/chaincode/enclave_go/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ SPDX-License-Identifier: Apache-2.0
package enclave_go

import (
"fmt"

"github.com/hyperledger/fabric-chaincode-go/shim"
"github.com/hyperledger/fabric-private-chaincode/internal/utils"
pb "github.com/hyperledger/fabric-protos-go/peer"
Expand Down Expand Up @@ -178,7 +180,11 @@ func (f *FpcStubInterface) SplitCompositeKey(compositeKey string) (string, []str
}

func (f *FpcStubInterface) GetQueryResult(query string) (shim.StateQueryIteratorInterface, error) {
panic("not implemented") // TODO: Implement
it, err := f.stub.GetQueryResult(query)
if err != nil {
return it, errors.Wrap(err, "stub.GetQueryResult call error")
}
return it, nil
}

func (f *FpcStubInterface) GetQueryResultWithPagination(query string, pageSize int32, bookmark string) (shim.StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) {
Expand Down Expand Up @@ -270,7 +276,7 @@ func (f *FpcStubInterface) SetEvent(name string, payload []byte) error {
if name == "" {
return errors.New("event name can not be empty string")
}
println("Trying to set event name: ", name, "\n with payload: ", payload)
println("NO event is bieng set as function is not implemented yet")
fmt.Println("Trying to set event name: ", name, "\n with payload: ", payload)
fmt.Println("NO event is bieng set as function is not implemented yet")
return nil
}
4 changes: 2 additions & 2 deletions internal/protos/fpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/protos/key_dist.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/protos/tl_session/tl_session.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/protos/trusted_ledger.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d16a642

Please sign in to comment.