@ -5,7 +5,7 @@ Clicking the Solidity icon in the icon panel brings you to the Solidty Compiler.
Compiling is triggered when you click the compile button ( **D. in image below**). If you want the file to be compiled each time the file is saved or when another file is selected - check the auto compile checkbox ( **E. in image below**).
Compiling is triggered when you click the compile button ( **D. in image below**). If you want the file to be compiled each time the file is saved or when another file is selected - check the auto compile checkbox ( **E. in image below**).
Since the Solidity version `0.5.7`, it is possible to compile `Yul` files. Please read the (([solidity documentation about Yul]https://solidity.readthedocs.io/en/latest/yul.html)) which contain some code examples.
Since the Solidity version `0.5.7`, it is possible to compile `Yul` files. Please read the ([solidity documentation about Yul](https://solidity.readthedocs.io/en/latest/yul.html)) which contain some code examples.
You can use the language dropdown ( **B. in image below**) to switch the language. **This dropdown list is only available for versions greater than or equal to `0.5.7`.**
You can use the language dropdown ( **B. in image below**) to switch the language. **This dropdown list is only available for versions greater than or equal to `0.5.7`.**
The fork selection dropdown list ( **C. in image below**) allows to compile code against a specific ethereum hard fork.
The fork selection dropdown list ( **C. in image below**) allows to compile code against a specific ethereum hard fork.
@ -15,15 +15,15 @@ If the contract has a lot of dependencies it can take a while to compile - so yo
![](images/a-sol-compiler.png)
![](images/a-sol-compiler.png)
After each compilation, a list is updated with all the newly compiled
After each compilation, a list is updated with all newly compiled
contracts. The contract compiled can be selected with the Contract pulldown menu ( **F. in image below**). Multiple contracts are compiled when one contract imports other contracts. Selecting a contract will show information about that one.
contracts. A compiled contract can be selected with the Contract pulldown menu ( **F. in image below**). Multiple contracts are compiled when one contract imports other contracts. Selecting a contract will show information about that one.
When the "Compilation Details" button is clicked ( **G. in image below**), a modal opens displaying detailed information about the current selected contract.
When the "Compilation Details" button is clicked ( **G. in image below**), a modal opens displaying detailed information about the current selected contract.
From this tab, you can also publish your contract to Swarm (only non
From this tab, you can also publish your contract to Swarm (only non
abstract contracts can be published).
abstract contracts can be published).
Published data notably contains the `abi` and solidity source code.
Published data notably contains the `abi` and the solidity source code.
After a contract is published, you can find its metadata information
After a contract is published, you can find its metadata information
using the bzz URL located in the details modal dialog `SWARM LOCATION`.
using the bzz URL located in the details modal dialog `SWARM LOCATION`.
In the console, you can run the commands listed below. Once you start to type a command, there is *auto completion*. These commands are using the following programs:
In the console, you can run the commands listed below. Once you start to type a command, there is *auto completion*. These commands are using the following libraries:
+ *ethers*: The [ethers.js](https://docs.ethers.io/ethers.js/html/getting-started.html) library is a compact and complete JavaScript library for Ethereum.
+ *ethers*: The [ethers.js](https://docs.ethers.io/ethers.js/html/getting-started.html) library is a compact and complete JavaScript library for Ethereum.
@ -17,8 +17,7 @@ You will see the functions in the contract. The functions buttons can have diff
- Functions that are `constant` or `pure` functions in Solidity have a blue buttons. Clicking one of this type does not create a new transaction. So clicking will not cause state changes - it will only return a value stored in the contract - so it won't cost you anything in gas fees.
- Functions that are `constant` or `pure` functions in Solidity have a blue buttons. Clicking one of this type does not create a new transaction. So clicking will not cause state changes - it will only return a value stored in the contract - so it won't cost you anything in gas fees.
- Functions that changes the state of the contract are orange, clicking this type of function will cost gas and they do change the state of the contract and so they do create a new transaction.
- Functions that change the state of the contract AND that do not accept Ether are called `non-payable` functions and have an orange button. Clicking on them will create a transaction and thus cost gas.
But this transaction does not accept Ether.
- Functions that have red buttons are `payable` functions in Solidity. Clicking one of these will create a new transaction and this transaction can accept a **value**. The **value** is put in in the Value field which is under the Gas Limit field.
- Functions that have red buttons are `payable` functions in Solidity. Clicking one of these will create a new transaction and this transaction can accept a **value**. The **value** is put in in the Value field which is under the Gas Limit field.
@ -14,7 +14,9 @@ This file contains the minimun you need for running unit testing.
Run Tests
Run Tests
---------
---------
This execute tests. The execution is run in a separate environment and the result is displayed below.
This executes all tests whose box has been checked below (by default all). The execution is run in a separate environment and the result is displayed below.
Here is a list of functions and their supported types that you can use to write your testcases: