struct Meetup {
// The timestamp from the block when the meetup event is created.
uint64 birthTime;
// The timestamp from the block when the meetup event is scheduled to start.
uint64 startTime;
// Capacity of the meeting.
uint8 maxCapacity;
// Address of the presenters.
address[] presenters;
// Address of people who register for the event.
// Only the top maxCapacity people will be able to enter.
// The rest will be on the waiting list.
address[] registrationList;
}
I tried to console.log an individual instance of Meetup:
it('allows people to join the meetup event', async () => {
// setup an event in 1 week's time
beforeCount = await meetupBaseInstance.getMeetupCount();
await meetupBaseInstance.createMeetup(60*60*24*7, 3, [organiser, presenter1], {from: organiser});
afterCount = await meetupBaseInstance.getMeetupCount();
assert.equal(beforeCount.toNumber(), afterCount.toNumber()-1);
// return the meetup struct
console.log(await meetupBaseInstance.meetups.call(0));
});
Meetup struct is defined as:
I tried to console.log an individual instance of Meetup:
However I only get:
[ BigNumber { s: 1, e: 9, c: [ 1521458584 ] }, BigNumber { s: 1, e: 9, c: [ 1522063384 ] }, BigNumber { s: 1, e: 0, c: [ 3 ] } ] ✓ allows people to join the meetup event (318ms)
Question 1: Where did presenters array go?
Question 2: How do I access birthTime? I tried
meetupBaseInstance.meetups.call(0).birthTime.toNumber()
and the log says it's not defined.For reference, here's the createMeetup function: