feat: Add Go implementation of full-stack-asset-transfer-guide smart contract (#1376)#1391
Open
nXtCyberNet wants to merge 4 commits intohyperledger:mainfrom
Open
feat: Add Go implementation of full-stack-asset-transfer-guide smart contract (#1376)#1391nXtCyberNet wants to merge 4 commits intohyperledger:mainfrom
nXtCyberNet wants to merge 4 commits intohyperledger:mainfrom
Conversation
60894c9 to
2d376f1
Compare
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
…-transfer-go Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
f4133c1 to
b17085b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: feat: add Go smart contract for full-stack-asset-transfer-guide
Closes: #1376
Summary
This PR adds a Go implementation of the full-stack-asset-transfer-guide smart contract, equivalent to the existing TypeScript contract in
asset-transfer-typescript. It allows developers who prefer Go to follow the guide without switching languages.Changes
Added a new directory
asset-transfer-gocontaining the Go chaincode implementation.Implemented asset lifecycle operations:
Additional components:
main.goentry point to bootstrap the chaincodego.mod/go.sumwith required Fabric dependenciesDockerfileanddocker-entrypoint.shfor Chaincode-as-a-Service (CaaS) deploymentasset-transfer-chaincode-vars.ymlfor compatibility with workshop automationTesting
Tested locally in WSL Ubuntu against a live Microfab network.
weft chaincode package caasand the Fabric lifecycle (install → approve → commit)trader-goclient onmychannel(org1MSP)CreateAsset,UpdateAsset,TransferAsset)All 7 client commands (
getAllAssets,transact,create,read,delete,transfer,listen) executed successfully.Notes
Uses standard Fabric Go chaincode patterns via
github.com/hyperledger/fabric-contract-api-go.The asset data model mirrors the TypeScript implementation with minor adjustments for Go conventions.