Compilador Solidity
Clicking the Solidity icon in the icon panel brings you to the Solidity Compiler. The default view of the Solidity Compiler shows the basic configuration. To open the Advanced Configuration panel, click the Advanced Configuration button (C. in fig. 1). For details on advanced features - see below.
Solidity compiler basics
Seleccionar un contrato para compilar
Para seleccionar un contrato para compilar, elija un archivo en el Explorador de archivos. O si hay varios archivos abiertos, asegúrese de que el que desea compilar es el archivo activo en el Editor.
If there is not an active file in the editor or a file has not already been compiled, then the Solidity Compiler will look like this:

Compilación desencadenante
La compilación se activa cuando:
pulse el botón de compilación (D. en la fig. 1 de abajo)
utilice el atajo
control + s.right click on a file in the File Explorer and select the Compile option

Compilación automática
If the auto compile checkbox (B. in fig. 1 above) is checked, compilation will occur every few seconds (when the file is auto-saved) as well as when another file is selected. If a contract has a lot of dependencies, it can take a while to compile - so you use autocompilation at your discretion.
Versiones de solidez y funcionalidad Remix
La versión del compilador se selecciona en la lista desplegable COMPILADOR (A. en la fig. 1 anterior).
Puede compilar (e implantar) contratos con versiones de Solidity anteriores a la 0.4.12. Sin embargo, los compiladores más antiguos utilizan un AST heredado, que ya no soportamos. En consecuencia, es posible que algunos plugins no funcionen y que algunas funcionalidades - por ejemplo, el resaltado de código fuente en el Editor - sólo funcionen parcialmente.
Using the Contract selectbox
Because a Solidity file can include multiple contracts and because contracts can import other contracts, multiple contracts are often compiled. However, only 1 contract’s compilation details can be retrieved at a time.
To select the desired contract, use the Contract selectbox (F. in fig. 1). Forgetting to select the right contract is a common mistake - so remember to verify that the contract you want is selected.
Detalles de la compilación y publicación
Using the publish button, you can upload your contract to IPFS or Swarm (only non abstract contracts can be published to Swarm).
Al publicar un contrato que importa otros contratos, se publicarán el contrato principal y todos sus contratos importados, cada uno a su propia dirección.
Los datos publicados contienen los metadatos del contrato y el código fuente de solidity.
After either Publish on IPFS or Publish on Swarm is clicked a modal will pop up. This modal contains the contract’s address as well as the addresses of the contracts that it imported and the address of the contract’s metadata.
Cuando se pulsa el botón «Detalles de la compilación» (G. en fig. 1), se abre un modal que muestra información detallada sobre el contrato seleccionado en ese momento.
Si sólo desea obtener el ABI o el Bytecode - pulse el botón correspondiente véase H. en la fig. 1.
Verificación pasiva de contratos
When you publish your metadata to IPFS and deploy your code to the mainnet or a public testnet, the contract verification service Sourcify, will verify your contracts without you needing to do anything.
Compilar y ejecutar el script
The Compile and Run script button (E. in fig. 1) is for compiling and then immediately running a script. It’s a time saver so that you can write some code, automatically run script that sets state of the contract - thus allowing you to quickly understand how the code is working. Learn more about Compile and Run.
Errores de compilación y advertencias
Los errores de compilación y las advertencias aparecen debajo de la sección de contratos. En cada compilación, la pestaña de análisis estático elabora un informe.
It is important to address reported issues even if the compiler doesn’t complain. (more about static analysis)
Advanced compiler configurations
Al hacer clic en Configuraciones avanzadas del compilador se abrirá este panel (M. en la fig. 2 siguiente).

There is a radio button to choose whether to configure the compiler through the interface (N. in fig 2) or to use a JSON file for the configuration (R. in fig 2).
Solidity or Yul
Desde la versión 0.5.7 de Solidity, es posible compilar archivos Yul. Por favor, lea la (documentación de Solidity sobre Yul) que contiene algunos ejemplos de código. Puede utilizar el desplegable de idioma (O. en fig 2) para cambiar de idioma. Esta lista desplegable sólo está disponible para versiones superiores o iguales a 0.5.7.
Seleccione una versión de EVM
La lista desplegable EVM (P. en fig 2) permite compilar código contra un hard fork de Ethereum específico. El compilador por defecto corresponde al hard fork por defecto utilizado por una versión específica.
To see the name of the hard fork used in the current compilation, click the «Compilation Details» button and in the Metadata section there will be a sub-section called settings. Open up the settings to see the EVM version’s name.
Activar la optimización
Según la documentación de Solidity, «el optimizador intenta simplificar las expresiones complicadas, lo que reduce tanto el tamaño del código como el coste de ejecución, es decir, puede reducir el gas necesario para la implementación del contrato, así como para las llamadas externas realizadas al contrato.»
For recent versions of Solidity, it is recommended to enable optimization.
Para obtener más información sobre la optimización, (Q. en la fig. 2) visite la Documentación de Solidity sobre el optimizador.
To the right of the Enable optimization checkbox is the box to input the number of Optimization runs. The default value is 200.
Se preguntará: «¿Cuál es el número correcto de ejecuciones para mi contrato?». Y los documentos de Solidity lo dicen:
Si desea que el despliegue inicial del contrato sea más barato y que las ejecuciones posteriores de la función sean más caras, ajústelo a –optimize-runs=1. Si espera muchas transacciones y no le importa que el coste de despliegue y el tamaño de la salida sean mayores, establezca –optimize-runs en un número alto.
Para obtener más información sobre las ejecuciones de optimización, visite Solidity docs about Optimizer options.
Archivo JSON para la configuración del compilador
Selecting the radio button next to Use configuration file will let you set the configuration using a JSON file (T. in fig 2). When you switch to compile with a config file, a sample compiler config file is created. This file can be edited with all the available options.
Clicking the config file’s name will open it up in the Editor. To change the config file click the Change button. If you update the text box with a file name of a file that does not exist, a new file will be created containing the default file’s contents.
No hay comprobación de errores cuando se utiliza el archivo .json para los ajustes de configuración, así que asegúrese de que su archivo de configuración es correcto.
Utilizar un compilador de Solidity personalizado
For those writing your own custom Solidity Compiler, you can import that by clicking the + button (X. in fig 1) to open a modal where you can input the URL of the compiler to be loaded.