code: func DeployChaincode(n *Network, channel string, orderer *Orderer, chaincode Chaincode, peers ...*Peer) {
  	if len(peers) == 0 {
  		peers = n.PeersWithChannel(channel)
  	}
  	if len(peers) == 0 {
  		return
  	}
  
  	// create temp file for chaincode package if not provided
  	if chaincode.PackageFile == "" {
  		tempFile, err := ioutil.TempFile("", "chaincode-package")
  		Expect(err).NotTo(HaveOccurred())
  		tempFile.Close()
  		defer os.Remove(tempFile.Name())
  		chaincode.PackageFile = tempFile.Name()
  	}
  
  	// package using the first peer
  	PackageChaincode(n, chaincode, peers[0])
  
  	// install on all peers
  	InstallChaincode(n, chaincode, peers...)
  
  	// instantiate on the first peer
  	InstantiateChaincode(n, channel, orderer, chaincode, peers[0], peers...)
  }
docs: // DeployChaincode is a helper that will install chaincode to all peers that
  // are connected to the specified channel, instantiate the chaincode on one of
  // the peers, and wait for the instantiation to complete on all of the peers.
  //
  // NOTE: This helper should not be used to deploy the same chaincode on
  // multiple channels as the install will fail on subsequent calls. Instead,
  // simply use InstantiateChaincode().