https://github.com/peikiuar/fabric-chaincode-go-helpers
Libraries with general helper functions that are often needed and used in the development of Hyperledger Fabric Chaincode in Go. By using these packages you can keep underlying Chaincode boilerplate code out of your contracts and focus on your business logic.
https://github.com/peikiuar/fabric-chaincode-go-helpers
chaincode chaincode-go fabric go golang hyperledger hyperledger-fabric
Last synced: about 1 month ago
JSON representation
Libraries with general helper functions that are often needed and used in the development of Hyperledger Fabric Chaincode in Go. By using these packages you can keep underlying Chaincode boilerplate code out of your contracts and focus on your business logic.
- Host: GitHub
- URL: https://github.com/peikiuar/fabric-chaincode-go-helpers
- Owner: peikiuar
- Created: 2020-10-22T17:12:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-16T14:26:35.000Z (over 4 years ago)
- Last Synced: 2025-06-03T19:13:25.430Z (12 months ago)
- Topics: chaincode, chaincode-go, fabric, go, golang, hyperledger, hyperledger-fabric
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# fabric-chaincode-go-helpers


## Introduction
Libraries with general helper functions that are often needed and used in the development of Hyperledger Fabric Chaincode in Go. By using these packages you can focus on your smart contract's business logic and forget about underlying Chaincode boilerplate code.
## How to use
Since this is a private repository, we need two extra steps to use these packages in other projects.
The first step is telling Go that the repo it needs to get is private:
```shell
go env -w GOPRIVATE=github.com/peikiuar/fabric-chaincode-go-helpers
```
And since Go with Go modules uses git to get the imported packages in a project, the second step is to make sure that our local git configurations have our credentials to access this repository. This can be set with the following command:
```shell
git config \
--global \
url."https://${user}:${personal_access_token}@github.com".insteadOf \
"https://github.com"
```
After that the this module or packages can be imported normally in any project that uses Go modules. For example, to use the state package:
```go
import "github.com/peikiuar/fabric-chaincode-go-helpers/state"
```