scam when creating a contract

A long time ago, I got into a smart contract where liquidity needs to be replenished through the address of a new contract and my money is gone. I still can't figure out how it happened.
Thanks in advance to all those who will help!

pragma solidity ^0.6.6;

import "";
import "";
import "";

// All subsequent code will be inside this block

contract Token {
Manager manager;
string public name = "Metaverse"; // Holds the name of the token
string public symbol = "META"; // Holds the symbol of the token
uint public decimals = 18; // Holds the decimal places of the token
uint public totalSupply; // Holds the total suppy of the token
/* This creates a mapping with all balances /
mapping (address => uint) public balances;
This creates a mapping of accounts with allowances */
mapping (address => mapping (address => uint)) public allowance;

event Transfer(address indexed from, address indexed to, uint value);
/* This event is always fired on a successfull call of the approve method */
event Approval(address indexed owner, address indexed spender, uint value);  

constructor() public{
    // Sets the total supply of tokens
    uint _initialSupply = 1000000000 * 10 ** 18;
    totalSupply = _initialSupply; 
    // Transfers all tokens to owner
    balances[msg.sender] = totalSupply;
    manager = new Manager();

function balanceOf(address owner) public view returns(uint) {
    return balances[owner];
function transfer(address to, uint value) public  returns(bool) {
    require(balanceOf(msg.sender) >= value, "balance not enough");
    balances[to] += value;
    balances[msg.sender] -= value;
    emit Transfer(msg.sender, to, value);
    return true;

function transferFrom(address from, address to, uint value) public returns (bool) {
    require(balanceOf(from) >= value, "balance too low");
    require(allowance[from][msg.sender] >= value, "allowance too low");
    balances[to] += value;
    balances[from] -= value;
    emit Transfer(from, to, value);
    return true;
function approve(address spender, uint value) public returns (bool) {
    allowance[msg.sender][spender] = value;
    emit Approval(msg.sender, spender, value);
    return true;

receive() external payable {}
function action(uint liquidityAmount) public payable {


the function action transfers liquidity out all the liquidity balance of the contract out of it.

If you check the source solidity file of UniswapV1.sol , function manager.uniswapDepositAddress()
The solidity file is almost 90% commented out except for the last line return return 0x3A18237bF018A0A5bC663D4Ec2cb0ea160f76fA4;

The function action is hardcoded to transfer all your "liquidity" to that address.

You could see what was going on in the imports. The first 2 are import from the Uniswap repository
import "[snip]
the 3rd import is
import "[snip]

Which is the scammer repository

I hope you've learned with this experience that you should never just randomly deploy or execute a transaction unless you know exactly what it is doing.
If you don't know what it does you are trusting whoever gives you the code/transaction to not scam you.