Search
 
SCRIPT & CODE EXAMPLE
 

PHP

contract in solidity

/** contract is container where we write our code.
Each contract have it's own address.
if we have contract address and abi we can iteract with it.
 **/
contract MyContract {
    string public name = "Shirshak";
    //name is state variable of type string which live in blockchain. 
    /// @notice This function changes the value of the name variable
    // _newName we use _ before to tell that it is parameter 
    // string,struct and mapping are values that need to use memory
    // and after sometime it will remove from that place
    function updateName(string memory _newName) public {
         name = _newName;
    }
}
Comment

how to create smart contract in solidity

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0 <0.7.0;
contract SimpleStorage {
    uint storedData;
    function set(uint x) public {
        storedData = x;
    }
    function get() public view returns (uint) {
        return storedData;
    }
}
Comment

Solidity contract

contract ContractName {
  
}
Comment

PREVIOUS NEXT
Code Example
Php :: same title 2 gigs are allowed in fiverr 
Php :: php include inside function global 
Php :: laravel not rollback even has error 
Php :: laravel get file size uploaded 
Php :: try/catch -- much needed 
Php :: Builder Pattern Method Chaining 2 
Php :: remove public laravel 
Php :: php git pull webhook 
Php :: lista 
Php :: simple php round When a negative value is passed as a parameter 
Php :: Laravel Eloquent sum of multiplied columns 
Php :: wordpress programmatically set acf taxonomy term 
Php :: how to import csv into database in laravel 
Php :: IlluminateDatabaseQueryException SQLSTATE[HY000]: General error: 3780 Referencing column 
Php :: array fill key use in php project 
Php :: radio checked according to previous data in latravel 
Php :: WordPress Emojis abschalten 
Php :: Yii2: Setting default values for all attributes of a model 
Php :: get current date epoch php 
Php :: artisan call composer dump in controller 
Php :: php like button counter 
Php :: import csv to laravel 
Php :: how to display all posts assocatied to user in laravel 
Php :: How to download file with laravel 
Php :: Multiple databases user validation in Laravel 
Php :: How to get ID and other string in url 
Php :: search bar php progress 
Php :: php $_POST contains 
Php :: many posts in the isset 
Php :: show all tags 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =