pragma solidity >=0.5.6 <0.6.0; contract Posting { address forumContractAddress; function setForumContractAddress() public{ require(forumContractAddress==address(0)); forumContractAddress = msg.sender; } struct Topic { uint topicID; address author; uint timestamp; uint[] postIDs; } struct Post { uint postID; address author; uint timestamp; uint topicID; } uint numTopics; // Total number of topics uint numPosts; // Total number of posts mapping (uint => Topic) topics; mapping (uint => Post) posts; event TopicCreated(uint topicID, uint postID); event PostCreated(uint postID, uint topicID); function createTopic(address author) public returns (uint, uint) { require(msg.sender==forumContractAddress); //Creates topic uint topicID = numTopics++; topics[topicID] = Topic(topicID, author, block.timestamp, new uint[](0)); //Adds first post to topic uint postID = numPosts++; posts[postID] = Post(postID, author, block.timestamp, topicID); topics[topicID].postIDs.push(postID); emit TopicCreated(topicID, postID); return (topicID, postID); } function createPost(uint topicID, address author) public returns (uint) { require(msg.sender==forumContractAddress); require(topicID