Skip to content

Hyperledger Fabric Token implementation following Ethereum- ERC-20 standard

License

Notifications You must be signed in to change notification settings

nmarcetic/fabric-token

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum-style token ERC-20 standard smart contract for Hyperledger Fabric v1.x

How to use it:

  1. Clone the repository to $GOPATH/src/github.com
  2. Fetch the vendor packages cd $GOPATH/src/github.com/token/chaincode && govendor fetch github.com/hyperledger/fabric/protos/msp
  3. Run tests: cd $GOPATH/src/github.com/token/chaincode && go test
  4. Install on peers:
peer chaincode install -n token -v 1.0 -p github.com/token/chaincode
  1. Instantiate on peers:
peer chaincode instantiate -o orderer_address:7050  -C mychannel -n token -v 1.0 -p github.com/token/chaincode -c '{"Args":["init","{\"name\": \"Fabric Demo Token\", \"symbol\": \"FTD\", \"decimals\": 2, \"totalSupply\": 1000}"]}'
  1. Query balance:
peer chaincode query -C mychannel -n token -c '{"Args":["balance","{\"user\": \"myuser\"}"]}'
  1. Invoke transfer:
peer chaincode invoke -o orderer_address:7050 -C mychannel -n token -c '{"Args":["transfer","{\"to\": \"otherUser\", \"value\": 200}"]}'

About

Hyperledger Fabric Token implementation following Ethereum- ERC-20 standard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%