I will disscuss those point which is to be reminber before implementing solidity .
The syntax for this language is
pragma solidity ^0.4.0;
contract SimpleStorage {
uint storedData;
function set(uint x) {
storedData = x;
}
function get() constant returns (uint) {
return storedData;
}
}
There is a function 'set ' which is use for storeing data inside contract variable and it can be accessed by 'get' function .
Constant -> define that in this function not updation of record will we done. Hence for this function no transaction payment will be done.
You can compile this code by various Ethereum api tool (web3 , ethereumj).
Make sure you give proper gas for transaction otherwise the operation will we not successfull.
THANKS
More From Oodles
Ready to innovate? Let's get in touch
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Himanshu sharma
Himanshu has marvelous coding skills. In Free time too he loves to do coding and sometimes play Cricket.