MoonSHRD / MS-Factory

deprecated
MIT License
0 stars 0 forks source link

Get TicketInfo struct from mapping #46

Closed JackBekket closed 4 years ago

JackBekket commented 4 years ago

Added mapping from event_id to event_JID in Ticket721 Event JID now setting in Ticket721 contract during reserve id function

Full flow:

  1. createTicketSale(address payable organizer, uint price, string memory event_JID, uint sale_limit) at TicketFactory. This function create new TicketSale
  2. TicketSale721 got parameters from Factory (during start new TicketSale), and call _token.reserveEventId(_wallet,jid); -- this function call reserveEventId(address orginizer, string memory jid) from Ticket721
  3. Ticket721 got parameters from TicketSale721 during reserving new ticketSale and create a record in mapping JIDs (event_id -> event_jid)

Now Ticket721 have info about JID event, entangled to event id

High level execution from Web3Wallet has not been modifed. You should use createTicketSale() as usual.