Hello World Smart Contract – Deploy with 0 Ethers on Mist

mistmyetherwallettokens

pragma solidity ^0.4.11;

contract raman {
    address owner;
    /* Constructor */
    function raman() { owner = msg.sender; }
    function kill() { if (msg.sender == owner) selfdestruct(owner);}
}

contract greeter is raman {
    /* Define variable greeting of the type string */
    string greeting;

    /* This runs when the contract is executed */
    function greeter(string _greeting) public { greeting = _greeting; }

    /* Main function */
    function greet() constant returns (string) { return greeting; }
}

// The above code is working fine, but what to do next and how to deploy it in the blockchain.

I want to just implement a simple smart contract right now in the blockchain I will kill it afterwards.

I have created a wallet with 0 ethers, in mist itself, is it possible to deploy this smart contract with 0 ethers??

enter image description here

Best Answer

You must pay gas (Ether) to send any transaction on the Ethereum blockchain, even if it doesn't involve deploying or interacting with a smart contract.

You can however deploy the smart contract and test it on a testnet or a private network for free (You will have to acquire some testnet Ether or solo mine on a private network).

You can find more info about these options for learning and testing here:

Testnets - http://ethdocs.org/en/latest/network/test-networks.html

Private Network - https://github.com/ethereum/go-ethereum/wiki/Setting-up-private-network-or-local-cluster

Related Topic