code: func (tx *Tx) GenerateReceipt() *Receipt {
  	receipt := &Receipt{
  		TxType: tx.Type(),
  		TxHash: tx.Hash(),
  	}
  	if callTx, ok := tx.Payload.(*payload.CallTx); ok {
  		receipt.CreatesContract = callTx.Address == nil
  		if receipt.CreatesContract {
  			receipt.ContractAddress = crypto.NewContractAddress(callTx.Input.Address, tx.Hash())
  		} else {
  			receipt.ContractAddress = *callTx.Address
  		}
  	}
  	return receipt
  }
docs: // Generate a transaction Receipt containing the Tx hash and other information if the Tx is call.
  // Returned by ABCI methods.