I have written an asset transfer contract wherein a function createAsset returns a uint256 assetNo and emit an event (event NewAssetNo(string _message, uint256 _assetno);
I am not able to display the function return values and event emit data in drizzle . My MyComponents.js code is as follows
import React from "react";
import { newContextComponents } from "@drizzle/react-components";
import logo from "./logo.png";
const { AccountData, ContractData, ContractForm } = newContextComponents;
export default ({ drizzle, drizzleState }) => {
// destructure drizzle and drizzleState from props
return (
<div className="App">
<div>
<img src={logo} alt="drizzle-logo" />
<h1>VATZCAR SMART CONTRACT</h1>
<p>
DEMONSTRATION OF ASSET TRANSFER
</p>
</div>
<div className="section">
<h2>Your Present Active Account & its Balance is :</h2>
<AccountData
drizzle={drizzle}
drizzleState={drizzleState}
accountIndex={0}
units="ether"
precision={0}
/>
</div>
<div className="section">
<h2>Vatzcar Asset transfer</h2>
<p>
A blockchain contract for storing and sharing data and other parameter of an asset.
</p>
<p>
<strong>Lets create an asset! </strong>
</p>
<ContractForm
drizzle={drizzle}
contract="Asset"
method="createAsset"
labels={["Name of Car.", "ETH Address of Owner" , "Other Details" , "Year of Manufacture"]}
/>
Now herein , I need to display the function return values and event emit data.
Please suggest
Complete project on github at https://github.com/ashishk74/Vatzcar
Thanks