contract wMBX is ERC20Burnable, AccessControl {
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Burn(address indexed from, uint256 value, string stellar_address);

    constructor() public ERC20("wMBX Token", "wMBX") {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(MINTER_ROLE, _msgSender());
    }

    // fallback - return ethereum to sender
    receive () external payable { msg.sender.transfer(msg.value); }

    function mint(address recipient, uint256 amount) public payable {
        require(hasRole(MINTER_ROLE, _msgSender()), "Unauthorized");
        _mint(recipient, amount);
    }

    function burnSwap(uint256 amount, string memory stellar_address) public virtual {
        _burn(_msgSender(), amount);
        emit Burn(_msgSender(), amount, stellar_address);
    }
}
receive () external payable { msg.sender.transfer(msg.value); }
// fallback - return ethereum to sender