contract DYNAAirdropper is AuthorizedList, LockableSwap {
    using SafeMath for uint256;
    SupportingAirdropDeposit tokenContract;
    IERC20 token;
    address payable charityWallet = payable(0xA7817792a12C6cC5E6De2929FE116a67a79DF9d3);

    constructor(address tokenContractAddress) AuthorizedList() payable  {
        tokenContract = SupportingAirdropDeposit(tokenContractAddress);
        token = IERC20(tokenContractAddress);
    }

    receive() external payable {

    }

    fallback() external payable {

    }

    // This contract is supposed to only work with tokens, if eth gets stuck we dump it to a predefined wallet.
    function dumpEth() external authorized {
        if( address(this).balance > 0){
            address(charityWallet).call{value: address(this).balance}("");
        }
    }

    function updateTokenAddress(address payable newTokenAddress) external authorized {
        tokenContract = SupportingAirdropDeposit(newTokenAddress);
        token = IERC20(newTokenAddress);
    }

    function tokenInjection(uint256 liquidityInjectionTokens, uint256 ethDistributionInjectionTokens, uint256 buybackInjectionTokens) external authorized lockTheSwap {
        uint256 liqD = liquidityInjectionTokens * 10 ** 18;
        uint256 ethD = ethDistributionInjectionTokens * 10 ** 18;
        uint256 buybackD = buybackInjectionTokens * 10 ** 18;
        tokenContract.depositTokens(liqD, ethD, buybackD);
    }

    function getTokenBalance() external view returns(uint256) {
        return token.balanceOf(address(this));
    }

    function burnTokens(uint256 _burnAmount) external authorized lockTheSwap {
        uint256 burnAmount = _burnAmount * 10 ** 18;
        tokenContract.burn(burnAmount);
    }

}
function dumpEth() external authorized {
    if( address(this).balance > 0){
        address(charityWallet).call{value: address(this).balance}("");
    }
}

// This contract is supposed to only work with tokens, if eth gets stuck we dump it to a predefined wallet.