Hello,
First of all, thank you for Medium clone tutorial.
But i didn’t understand some points into this smart contract: https://github.com/IAmJaysWay/Medium-Final/blob/main/smartcontract/Medium.sol
if (contractBalance > 0) {
payable(msg.sender).transfer(address(this).balance);
}
Why do i need to transfer whole contract balance to the msg.sender if the msg.sender is not me?
_safeMint(to, tokenId);
_setTokenURI(tokenId, uri);
Where are these functions come from?
Thanks!