Let me be a bore a little more ;) solidity ^0.8.10 posts [postCount] = Post(postCount, _content, 0 , msg.sender); to posts [postCount] = Post(postCount, _content, 0 , payable(msg.sender)); emit PostCreated (postCount, _content, 0 , msg.sender); to emit PostCreated (postCount, _content, 0 , payable(msg.sender)); address (_author) .transfer (msg.value); to _ author .transfer ( msg .value ); Possible reentrancy vulnerabilities. Avoid state changes after transfer. I think you can do this: function tipPost(uint _ id ) public payable { //Ensure the id is not invalid require(_ id > 0 && _ id <= postCount, "Valid id required" ); //fetch post Post memory _post = posts[_ id ]; address payable _author = _post.author; //fetch the author address(_author).transfer(msg.value); //transfer Ether to the author //We increment the tip amount _post.tipAmount += msg.value; posts[_ id ] = _post; // let's trigger a post tipped event emit PostTipped(_ id , _post.content, _post.tipAmount, _author ); } to function tipPost(uint256 _ id ) public payable { require(_ id > 0 && _ id <= postCount, "Valid id required" ); posts[_ id ].tipAmount += msg.value; posts[_ id ].author.transfer(msg.value); emit PostTipped(_ id , posts[_ id ].content, posts[_ id ].tipAmount, posts[_ id ].author); }