What is a .SOL file?
A .SOL file could refer to various formats altogether; it should be identified through context clues such as directory name/path, header bytes, readability of contents etc. The prevalent interpretation as far as today is that of Solidity language source, created by Ethereum Foundation and developers of Solidity language for smart contracts compatible with Ethereum blockchain. In the said case, it will include source-code elements such as contracts, imports, libraries, interfaces, pragma declarations and events, and these text files can be found in blockchain projects utilizing Hardhat, Foundry, Remix or other frameworks and development environment such as Truffle and Git.
The other widely used application in the past for .SOL extension were local shared objects, aka Flash cookies used by Macromedia and after that Adobe for storing Flash Player per website data, including preferences and game progress. These binary files could be located inside specific directories of particular Flash players profile.
There is another field of usage where .sol extension applies - optimization. Specifically, software from IBM ILOG (CPLEX) uses XML solution dialect, and Gurobi, SCIP or CBC solutions create their output files of text format with variable values derived from mathematical model optimization.
And for old games or Windows OSes we have the following extensions meaning: binary data associated with audio was found in some games published by Sierra On-Line and containing the said .sol files which are independent of Solidity or Flash extensions. For example, Sierra sound files used in the SCI era. The other .sol format could apply - saved game state for classic version of Solitaire made by Microsoft for earlier version of this OS.
An efficient check method is possible: Solidity code is likely to begin by pragmata/contract statements etc., whereas the Flash .SOL file should typically display header TCSO around position 6. Sierra audio file - with SOL string at beginning.
How to open a .SOL file
Open a .SOL file on Windows
- 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
- 2 Double-click your .SOL file if you have an app for .sol files on your computer. In case it does not open, move on to step three.
- 3 Right-click your .SOL file -> select .
- 4 Choose Visual Studio Code in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .sol files" and click OK.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Windows
- Visual Studio Code free
- IntelliJ IDEA freemium
- JPEXS Free Flash Decompiler open-source
- Audacity open-source
- VLC media player open-source
- IBM ILOG CPLEX Optimization Studio paid
- Gurobi Optimizer paid
- SCIP Optimization Suite open-source
Open a .SOL file on macOS
- 1 In the Finder app, locate your .SOL file.
- 2 Just double-click your .SOL file in order to automatically launch the program which is connected with it.
- 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select .
- 4 If it isn't in the list, choose and find the application manually.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for macOS
- Visual Studio Code free
- IntelliJ IDEA freemium
- JPEXS Free Flash Decompiler open-source
- Audacity open-source
- VLC media player open-source
- IBM ILOG CPLEX Optimization Studio paid
- Gurobi Optimizer paid
- SCIP Optimization Suite open-source
Open a .SOL file on Linux
- 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
- 2 Double-click the file.
- 3 Or choose another program by right-clicking the file -> .
- 4 Install Visual Studio Code (if it is not installed on your computer) from the software centre, repository or Flathub.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Linux
- Visual Studio Code free
- IntelliJ IDEA freemium
- JPEXS Free Flash Decompiler open-source
- Audacity open-source
- VLC media player open-source
- IBM ILOG CPLEX Optimization Studio paid
- Gurobi Optimizer paid
- SCIP Optimization Suite open-source
Open a .SOL file on Android
- 1 Launch Files or another file management app.
- 2 In Downloads, find the .SOL file and open it by tapping.
- 3 A list of apps capable of opening the file will be shown. Tap a suitable app and press Always to permanently connect the file type with this app.
- 4 No apps able to open this file? Download a suitable app from the Google Play Store.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Android
- VLC media player open-source
Open a .SOL file on iPhone / iPad
- 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
- 2 Tap the .SOL file you want to open.
- 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
- 4 Touch and hold the file to get the context menu -> choose -> select a suitable app from the list of apps.
- 5 If there is no such option, download the app first from the App Store and then tap the document again.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for iPhone / iPad
- VLC media player open-source
Open a .SOL file online
- 1 Move to the online viewer at the top of this page.
- 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.
Still not opening? See common problems and fixes, or view it in your browser.
Programs for Online
- Remix IDE open-source
- Visual Studio Code free
More details about opening .SOL files
Open a .sol file on Windows, macOS, and Linux platforms using any one of several software programs, for example: Visual Studio Code; IntelliJ IDEA; or any plain text editor, i.e., Notepad, TextEdit in plain-text mode; Vim or Kate. Visual Studio Code and IntelliJ IDEA would be perfect options to work on a project; solc, Hardhat and Foundry would generally get selected if compiler errors, ABI, bytecode, testing, imports resolution are needed. Visual Studio Code, Remix, solc, Hardhat and Foundry are free; IntelliJ IDEA provides its free version (named community), besides other paid editions.
On your web browser Remix IDE would be the easiest way to go when working on a solidity (.sol) file; because it helps in viewing, editing, compiling and deploying contracts without need of Node.js, solc, Hardhat or Foundry.
In a mobile device; solidity(.sol) files can be viewed in a mobile code editor. They can alternatively be viewed with a browser based remix; However full fledged local Solidity build chain would be inconvenient as compared with a desktop terminal or cloud IDE.
Opening a flash local shared object (.sol) file is quite easy by using JPEXS Free Flash Decompiler’s SOL tools or an AMF parser. It won’t open in a contemporary browser since Flash Player is discontinued; the file would normally include the marker “TCSO” for Flash binary format in byte offset 6.
A CPLEX XML solution file can be opened with CPLEX Optimization Studio; any text/XML editor; or scripts with XML parsers. While for Gurobi and SCIP/COIN-OR CBC solutions can also be opened with the relevant solver tools and editor.
SOL file format for Sierra On-Line should be worked with FFmpeg or software built on FFmpeg.
To determine a Sierra (.sol) audio file that is not working well in VLC or any other media player, convert the .sol file to WAV with FFmpeg to prove that it is in fact Sierra’s. And then you would try opening file with the relevant file program.
Technical details
Source files containing Solidity contracts are encoded in either Unicode UTF-8 format or in ASCII format; byte-order-mark not required. A Solidity file consists of the Solidity pragmas, import declarations, the contract definitions, contract functions, any custom modifiers used, any custom events, custom errors, structs/enumeration/inline assembly blocks. Solidity files have no magic header; the compiler versions may be usually constrained with source pragmas of the file, e.g. pragma solidity ^0.8.20. Import paths depend on project remapping, npm packaging structure, includes and build tools' root directory where files are resolved to. The appropriate MIME type to denote Solidity source is the text/x-solidity, which however a lot of web servers resolve into text/plain or application/octet-stream.
Flash Local Shared Objects are binary files based on the set of AMF types values but not on any source code. A common structure of the FLASH SOL would have the TCSO ASCII identifier, bytes hex 54 43 53 4F at offset 6, after which are placed serialized representations of actionscript object consisting of strings, number values, date values, typed objects etc. The FLASH SO objects would employ either the AMF0, or AMF3 serialization; this format is not a ZIP archive, does not use compression as a file entity in general, and is not associated with any registered MIME type; application/octet-stream is the usual safe label.
The files with CPLEX sol extension contain XML documents and contain metadata related with solutions as objective function's values, variable values, and, sometimes, constraints / slacks' values. Since the formatting, attributes order and document structure details do change depending on particular CPLEX version releases, these files are supposed to be parsed as pure XML. The similar text-based structure, but using different format dialect is implemented for Gurobi solver's sol files, SCIP solver or some other solvers' files, too; CBC solver SOL file format could be mentioned among the similar dialects, too.
Sol format, created by Sierra On-Line, describes the binary structure of the game audio files containing an SOL ASCII signature, hex 53 4F 4C at offset 0. The header contains the sample frequency values, flags values, number of sample values, PCM or compression variant, and possibly some other; FFmpeg has decoders to deal with sol files. These formats may contain very small size files for source and solver output or quite large files in the case of audio or extensive FLASH sol content; encoding errors might occur mostly with text-based formats.
How to convert .SOL files
Solidity requires conversion via compiling rather than through an exportation of its files to document types. ABI JSON for the application code; bytecode for deployment in deployable EVM as BIN; metadata JSON, AST JSON and source maps are typical artifacts after this step of building. The tools of the compiler provide direct options for getting needed information: solc --abi MyContract.sol -o build for the ABI JSON; solc --bin MyContract.sol -o build for the bytecode and solc --combined-json abi,bin,metadata,srcmap MyContract.sol > combined.json for all above in one output file. The projects which use Hardhat and Foundry include solc into compilation pipeline; thus they have an opportunity to implement testing and manage dependencies and artifact directories.
There is a price for all this. Compiled output does not keep comments and layout. The ABI will not include function bodies or internal/private logic because it describes just the external part of the contract.
Manual exporting is the solution here; Flash Local Shared Objects could be exported as similar files as JSON with AMF values like dates, objects references, typed ActionScript objects, typed arrays. However, the Sierra SOL audio files should convert correctly from FFmpeg to Ogg Vorbis, WAV, or raw format. Unfortunately, some loop points for in-game audio may get lost here. There exist scripts for mapping of the constraints and variables in CPLEX SOL XML into CSV, JSON. Gurobi, SCIP and CBC text .sol are readable as text files, but API of the solver should be used to work with it successfully there.
| Convert to | Tool | Command / note |
|---|---|---|
| ABI JSON | Solidity Compiler | solc --abi MyContract.sol -o build Produces Ethereum contract ABI JSON; comments, formatting, and non-ABI implementation details are not represented in the output. |
| EVM bytecode BIN | Solidity Compiler | solc --bin MyContract.sol -o build Compiles Solidity source to deployable EVM bytecode; source layout and comments are lost. |
| Combined compiler JSON | Solidity Compiler | solc --combined-json abi,bin,metadata,srcmap MyContract.sol > combined.json Convenient for build systems that need ABI, bytecode, metadata, and source maps in one JSON document. |
| WAV audio | FFmpeg | ffmpeg -i input.sol output.wav For Sierra SOL audio only; converts decoded game audio to uncompressed PCM WAV. |
| FLAC audio | FFmpeg | ffmpeg -i input.sol output.flac For Sierra SOL audio only; creates a lossless compressed audio file, not a Flash shared object or Solidity file. |
| Text/CSV report | Gurobi Optimizer | gurobi_cl ResultFile=solution.sol model.mps Solver .sol files are normally generated from an optimization model; convert to CSV by parsing variable/value lines or by exporting from solver APIs. |
| Edited Flash data / XML-like inspection | JPEXS Free Flash Decompiler | For Flash Local Shared Objects; JPEXS can inspect and edit AMF values, but there is no universal lossless interchange format for all SOL data types. |
Common problems and fixes
ParserError is an error stating that the version specified in a Solidity source file does not match the current one. For example, pragma solidity ^0.8.20; requires a 0.8.20 or newer 0.8.x compiler, but the installed solc is an older version such as 0.8.19. To fix the situation you have to update the required compiler through Hardhat, Foundry, Remix’s compiler selector or solc-select.
"Source not found," as well as, "Import callback not supported," means that solc can't resolve an import path, such as @openzeppelin/contracts/token/ERC20/ERC20.sol. In order to solve it, you have to update your project structure or install additional NPM packages as well as set project roots in Hardhat or add remapping in Foundry or provide additional paths in solc.
Binary Flash Local Shared Object opened in Notepad, TextEdit or VS Code shows just random byte sequences. Also, there are some specific markers in the files at offset 6, in our case the ASCII marker TCSO. The data is related neither to Solidity language nor source code but it represents AMF0 or AMF3 format; you have to decode it using special software as, for instance, JPEXS Free Flash Decompiler.
There are several situations when flash .sol file disappears: first of all, the browser cleanup operations, secondly - migration after Flash Player reached EOL, and thirdly - the use of various tools to delete these Local-Shared Object files from the Windows, Mac OS or Linux computer profile folder.
Solver errors such as unknown variable, infeasible solution or "Cannot read solution file" usually mean that this particular .sol file has been built by another model version or another name of variables as well as other dialect of some Solver. Most of the problems with parsing of XML in .sol files of IBM CPLEX solver are connected either with truncations of downloads or manual editing of solution files or with character sets mismatch.
When FFmpeg fails on Sierra On-Line game audio .sol files, it is usually because these files are not classic Sierra audio but some other kinds (.sol format), or the file is a partially corrupted SCI games archive files or unsupported by the used FFmpeg version.
Microsoft Windows Solitaire saves (sol files) are version dependent: in Microsoft Solitaire Collection you won't be able to use these .sols made before.
Security considerations
The Solidity .sol files are plain-text files that cannot run even when loaded into any IDE such as Visual Studio Code, Remix, or any other text editing platform. There are chances of problems during compiling, testing, deploying, or running through solc, Hardhat, and/or Foundry projects. Before building an unfamiliar repository, look for remappings, imports, npm, forge scripts, hardhat.config, and deployment keys.
Flash .sol files might store identifiers, progress details, measured values, account numbers, or preference data as personal information. Exploits are not rare in legacy Flash players or SWF. Don’t load the SWF files simply in order to check the contents inside a .sol file; use other tools or parser software to open them.
The solver .sol files may contain variables names, objective functions, capacities and/or costings, structure of a model, business choices made by the organization; in general, any information that is confidential. While opening and analyzing CPLEX XML .sol, disable external XML entities. The SOL sound from Sierra Sound Format (.SOL) audio is passive, and so there’s no harm in using up-to-date FFmpeg versions.
History and versions
Solidity emerged in the year 2014 thanks to the effort of Gavin Wood and evolved as part of the Ethereum project becoming a leading high-level programming language of smart contracts after launching the Ethereum network in 2015. It does not conform to the formal standard such as ISO or ECMA and the .sol source format follows the Solidity compiler line rather than any standard definition. Though Solidity is open source, in fact its specification consists of three elements - the compiler itself, documentation and tooling. Every series from 0.4.x to 0.8.x had new breaking semantics, and Solidity 0.8.0 made overflow checks mandatory.
In other use cases the .sol format emerged differently. The extension used to be one of those introduced by Macromedia Flash Local Shared Objects and appeared together with the sixth release of its famous product Flash Player (2002) which later came to belong to Adobe Systems that bought out Macromedia in 2005. Support of Flash Player ended up being suspended starting from December 31, 2020 which means almost all the sol files nowadays could not be found outside of the ancient profiles, obsolete diskettes and backups. Optimization solvers CPLEX, Gurobi, SCIP and CBC started using their natural extension .sol in solution files but not sharing a unique cross-solver format.
Related formats
Solidity sources (.sol) contend against Vyper source files (.vy) in the area of Ethereum smart contracts. However, Solidity 0.8.x has the advantage regarding availability of tools for compilation, editor, audits, and development frameworks, while Vyper uses a restricted, more Python-like language meant to simplify the syntax. Ethereum compilation products are usually in JSON format (.json) and have ABI, the executable bytecode as well as metadata. These are compiler outputs generated from .sol sources and are not source substitutes.
Flash Local Shared Object (.sol) is similar to Web browser cookies, HTML5 local storage and databases, but is specific to Flash only. Older computers placed them beyond normal Web cookie management boundaries. Executables for Flash movies are in .swf while the .sol files contain persistent AMF data that are accessed by SWF movies.
.lp, .mps, .sav, .rew are formats used in many mathematical optimizations, while .sol holds information of solver's output; there are .mst files containing the MIP starts and .bas files holding simplex basis information for warm start-ups but not solution files in Gurobi software. .wav, .voc, .aud, and .ogg are other game audio file types, while .sol saves the original audio used in video games. Similarly .sgm or .dat or .sav file formats of solitaire style are all binary and application-specific.
No comments yet. Be the first to share your experience with this file type.