contract StarDoge is ERC20, Ownable {
    
    address public creator = msg.sender;
    uint256 public burnFee = 400; 
    uint256 public charityFee = 20; 
    address public charityWallet = 0x49c4efDa8794E86FAAE0d1dB8FEcbDCCCD046199; 
    address public developerWallet = 0xA8E01767A346490F1b0647EE5d027F589d5855df;
    
    constructor() public ERC20("StarDoge", "StarDoge") {
        _mint(msg.sender, 420000000000000000000000000000); // 420000000000
    }

    // Transfer recipient recives amount - fee
    function transfer(address recipient, uint256 amount) public override returns (bool) {
        uint256 burnAmount = burnFee.mul(amount).div(10000);
        uint256 charityAmount = charityFee.mul(amount).div(10000);
        uint256 taxAmount = burnAmount.add(charityAmount);
        uint256 transferAmount = amount.sub(taxAmount);
        
        // Burn and Charity cut
        _burn(msg.sender, burnAmount);
        _transfer(msg.sender, charityWallet, charityAmount);
        
        // Transfer
        _transfer(msg.sender, recipient, transferAmount);
        return true;
    }

    // TransferFrom recipient recives amount, sender's account is debited amount + fee
    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {

        uint256 burnAmount = burnFee.mul(amount).div(10000);
        uint256 charityAmount = charityFee.mul(amount).div(10000);
        uint256 taxAmount = burnAmount.add(charityAmount);
        uint256 transferAmount = amount.sub(taxAmount);
        
        // Burn and Charity cut
        _burn(sender, burnAmount);
        _transfer(sender, charityWallet, charityAmount);
        
        // Transfer
        _transfer(sender, recipient, transferAmount);
        
        _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }
    
    // Set Transfers
    function burnTransfer(uint256 amount) public returns (bool) {
        _splitPayment(amount, 10000, 0, 0);
        return true;
    }
    function charityTransfer(uint256 amount) public returns (bool) {
        _splitPayment(amount, 0, 10000, 0);
        return true;
    }
    function devTransfer(uint256 amount) public returns (bool) {
        _splitPayment(amount, 0, 0, 10000);
        return true;
    }
    function nfTransfer(uint256 amount) public returns (bool) {
        _splitPayment(amount, 4000, 4000, 2000);
        return true;
    }

  
    // Multi transfer function
    function _multiTransfer(address[] calldata wallets, uint256 amount) public returns (bool) {
        require(msg.sender == creator, 'Must be contract owner');
        for (uint256 i = 0; i < wallets.length; i++) {
            _transfer(msg.sender, wallets[i], amount);
        }
        
        return true;
    }
    
    // Function for split proportions 
    function _splitPayment(uint256 amount, uint256 burnProp, uint256 charityProp, uint256 devProp) public returns (bool) {
        require(burnProp.add(charityProp).add(devProp) == 10000, 'Proportions must sum to 10000');
        uint256 burnAmount = burnProp.mul(amount).div(10000);
        uint256 charityAmount = charityProp.mul(amount).div(10000);
        uint256 developerAmount = devProp.mul(amount).div(10000);

        // Burn. Charity and Developer cut
        _burn(msg.sender, burnAmount);
        _transfer(msg.sender, charityWallet, charityAmount);
        _transfer(msg.sender, developerWallet, developerAmount);
        
        return true;
    }

}
// ╔╦╗─╔╦╗─╔╦╗─╔╦╦╦╦╦╦╗─╔╦╦╦╦╦╦╗─╔╦╦╦╦╦╗───╔╦╗─╔╦╗─╔╦╗─╔╦╦╦╦╦╦╗─╔╦╦╦╦╦╦╗─╔╦╦╦╦╦╗───╔╦╗─╔╦╗─╔╦╗─╔╦╦╦╦╦╦╗─╔╦╦╦╦╦╦╗─╔╦╦╦╦╦╗─
// ╠╬╣─╠╬╣─╠╬╣─╠╬╬╩╩╩╩╝─╠╬╬╩╩╩╩╝─╠╬╬╩╩╬╬╗──╠╬╣─╠╬╣─╠╬╣─╠╬╬╩╩╩╩╝─╠╬╬╩╩╩╩╝─╠╬╬╩╩╬╬╗──╠╬╣─╠╬╣─╠╬╣─╠╬╬╩╩╩╩╝─╠╬╬╩╩╩╩╝─╠╬╬╩╩╬╬╗
// ╠╬╣─╠╬╣─╠╬╣─╠╬╬╦╦╦╦╗─╠╬╬╦╦╦╦╗─╠╬╣──╠╬╣──╠╬╣─╠╬╣─╠╬╣─╠╬╬╦╦╦╦╗─╠╬╬╦╦╦╦╗─╠╬╣──╠╬╣──╠╬╣─╠╬╣─╠╬╣─╠╬╬╦╦╦╦╗─╠╬╬╦╦╦╦╗─╠╬╣──╠╬╣
// ╠╬╣─╠╬╣─╠╬╣─╠╬╬╩╩╩╩╝─╠╬╬╩╩╩╩╝─╠╬╣──╠╬╣──╠╬╣─╠╬╣─╠╬╣─╠╬╬╩╩╩╩╝─╠╬╬╩╩╩╩╝─╠╬╣──╠╬╣──╠╬╣─╠╬╣─╠╬╣─╠╬╬╩╩╩╩╝─╠╬╬╩╩╩╩╝─╠╬╣──╠╬╣
// ╚╬╣─╠╬╣─╠╬╝─╠╬╣──────╠╬╣──────╠╬╣──╠╬╣──╚╬╣─╠╬╣─╠╬╝─╠╬╣──────╠╬╣──────╠╬╣──╠╬╣──╚╬╣─╠╬╣─╠╬╝─╠╬╣──────╠╬╣──────╠╬╣──╠╬╣
// ─╚╬╦╬╩╬╦╬╝──╠╬╬╦╦╦╦╗─╠╬╬╦╦╦╦╗─╠╬╬╦╦╬╬╝───╚╬╦╬╩╬╦╬╝──╠╬╬╦╦╦╦╗─╠╬╬╦╦╦╦╗─╠╬╬╦╦╬╬╝───╚╬╦╬╩╬╦╬╝──╠╬╬╦╦╦╦╗─╠╬╬╦╦╦╦╗─╠╬╬╦╦╬╬╝
// ──╚╩╝─╚╩╝───╚╩╩╩╩╩╩╝─╚╩╩╩╩╩╩╝─╚╩╩╩╩╩╝─────╚╩╝─╚╩╝───╚╩╩╩╩╩╩╝─╚╩╩╩╩╩╩╝─╚╩╩╩╩╩╝─────╚╩╝─╚╩╝───╚╩╩╩╩╩╩╝─╚╩╩╩╩╩╩╝─╚╩╩╩╩╩╝─
//  StarDoge Contract
function transfer(address recipient, uint256 amount) public override returns (bool) {
    uint256 burnAmount = burnFee.mul(amount).div(10000);
    uint256 charityAmount = charityFee.mul(amount).div(10000);
    uint256 taxAmount = burnAmount.add(charityAmount);
    uint256 transferAmount = amount.sub(taxAmount);
        
    // Burn and Charity cut
    _burn(msg.sender, burnAmount);
    _transfer(msg.sender, charityWallet, charityAmount);
        
    // Transfer
    _transfer(msg.sender, recipient, transferAmount);
    return true;
}

// Transfer recipient recives amount - fee