“kontrak dalam soliditas” Kode Jawaban

kontrak dalam soliditas

/** 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;
    }
}
Shirshak kandel

Kontrak Soliditas

contract Contract {

}
Hungry Horse

Jawaban yang mirip dengan “kontrak dalam soliditas”

Pertanyaan yang mirip dengan “kontrak dalam soliditas”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya