In solidity I want to allow registering for classes on the blockchain. Just like eventbrite. A wallet should have access to an array of classes. I am not sure how to structure this data but this is what I tried.
pragma solidity ^0.4.2;
contract SimpleStorage {
mapping(address => EventClass[]) class_event;
struct EventClass {
uint start_time;
string title;
string first_name;
string last_name;
}
function registerTicket(){
class_event[msg.sender][0].first_name = "Alain";
}
}
Here I have an array of structs mapped into addresses. However, this code is broken. What is wrong with my logic.
Got it, it's more like this