Last active
June 20, 2017 05:00
-
-
Save himani1/b6fcd3c1b968e970ab9861a2b861ff7e to your computer and use it in GitHub Desktop.
This file contains 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
func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { | |
if len(args) != 1 { | |
return nil, errors.New("Incorrect number of arguments. Expecting 1") | |
} | |
err := stub.PutState("emp_name", []byte(args[0])) | |
if err != nil { | |
return nil, err | |
} | |
return nil, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment