contract Log {
    //Object representing each log:
    struct Message {
        address sender; //who did it
        uint amount; //how much eth
        uint time; //timestamp
        string operation; //"Deposit" or "Withdraw"
    }
    
    Message[] public history; //list of logs
    Message lastMsg; //the last registered log
    
    //saves a log on the blockchain:
    function register(address sender, uint amount, string memory operation) public {
        history.push(Message(sender, amount, now, operation));
    }
}
//These contracts were made as a study on the new Solidity 0.6.x way of making transfers.
//Makes sure we have all the transactions stored on the blockchain for easy and public auditing:
function register(address sender, uint amount, string memory operation) public {
    history.push(Message(sender, amount, now, operation));
}

//the last registered log
//saves a log on the blockchain: