i'm building a smart contract. how to create the instance of the contract in the app variable? so that when i entering the "app" in truffle console, i can display my smart contract instance. the contract is at down below
function generateVehicle(
string memory _id,
string memory _owner_name,
string memory _owner_id,
uint256 _vehicle_registration_no) public {
bytes32 byte_id = stringToBytes32(_id);
require(vehicles[byte_id].vehicle_registration_no == 0, " Vehicle registration no with given id already exists");
vehicles[byte_id] = Vehicle(_owner_name, _owner_id, _vehicle_registration_no);
emit vehicleGenerated(byte_id);
}
Jun 26, 2020, 7:12 PM