contract WrappedFashionCoin is ERC20, Ownable, ERC20Burnable {

    mapping(uint256 => bool) usedNonces;

    constructor()  ERC20("WrappedFashionCoin", "WFSHN") {
        _setupDecimals(3);
    }

    function mint(uint256 amount, uint256 nonce, uint8 v, bytes32 r, bytes32 s) public {
        require(!usedNonces[nonce]);
        usedNonces[nonce] = true;

        bytes32 message = prefixed(keccak256(abi.encodePacked(msg.sender, amount, nonce, this)));

        require(ecrecover(message, v, r, s) == owner());
        _mint(msg.sender, amount);
    }


    /// builds a prefixed hash to mimic the behavior of eth_sign.
    function prefixed(bytes32 hash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}
function prefixed(bytes32 hash) internal pure returns (bytes32) {
    return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}

/// builds a prefixed hash to mimic the behavior of eth_sign.