Mix
IDE Mix is designed as a developer to help you create, debug and deploy contracts and to centrally apply (back-end and front-end contracts)
Warning – There are many Crash-at-boot event reports on the mix on OS X. This event is heisenbug, we have been tracking for two months. The best workaround we have available is to use the wrong configuration, like this:
1
|
Cmake-dcmake_build_type=debug. |
Warning – a mix replacement is being researched, called remix. If you have experienced events in mix, you'd better look for alternatives before remix is more mature.
Starting with creating a new project, it includes the contract HTML file JavaScript file Style file image file Project editor
You can use projects to manage the creation and testing of centralized applications. The project will include data related to the backend and front ends and data related to your scene (blockchain interaction) for troubleshooting and testing. The relevant files are created and automatically saved to the project directory. Create a new project
The development of a de-centralized application begins with the creation of a new project. Create a new project on the Edit menu. Enter the project name, such as "rank", and select the project file path. Edit back-end contract files
A new project contains a contract by default, "contract" is used to develop in the blockchain backend using the solidity language, and "index.html" is used for the front-end. View solidity tutorials or references. Edit the empty default contract "contract", such as
1
2
3
4
5
6
|
Contract Rating {
function setrating (bytes32 _key, uint256 _value) {
Ratings[_key] = _value;
Mapping (BYTES32 = uint256) public ratings;
}
} |
See the solidity tutorial for help starting with the solidity programming language.
Save changes
Edit the front-end HTML file Select the default index.html file and enter the following code
1 2 3 4 5 6 7 8 9-Each of the ten, the |
.... <script> function getrating () {var param = document.getElementById ("Query"). Value;
var res = contracts["Rating"].contract.ratings (param);
document.getElementById ("Queryres"). InnerText = res; } function Setrating () { |