Advertisement
Guest User

plotFactory

a guest
Mar 20th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pragma solidity ^0.4.25;
  2.  
  3. contract PlotFactory {
  4.     uint plotDigits = 64;
  5.     uint plotModulus = 10 ** plotDigits;
  6.     event plotCreated(string name, uint price, string owner);
  7.    
  8.     struct Plot {
  9.         string name;
  10.         string postCode;
  11.         string owner;
  12.         string size;
  13.         uint price;
  14.         string description;
  15.     }
  16.  
  17.     Plot[] public plots;
  18.  
  19.     function _createPlot(string _name, string _postcode, string _owner, string _size, uint _price, string _desc) private {
  20.  
  21.     plots.push(Plot(_name, _postcode, _owner, _size, _price, _desc));
  22.     emit plotCreated(_name, _price, _owner);
  23.    
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement