INFO [08-13|11:30:57] Network syncing, will start miner afterwards
The log above indicates that you cannot start mining in Testnet until after the Ethereum node has finished syncing.
The logs below shows that a potential block has been mined
INFO [08-13|23:06:20] Successfully sealed new block number=1482775
INFO [08-13|23:06:20] 🔨 mined potential block number=1482775
And we see that new ether is in one of the wallets on the Testnet account:
Once ether has been mined, you can now create your first wallet. The Ethereum Wallet currently has a UI issue in that you can create a wallet, but the wallet will always be in ‘Creating..’ mode. In this case, you must wait until ether has been mined.
The wallet has a default JSON interface which I won’t add in this entry. The contract information is also the default provided.
I then transferred to the new wallet.
Here’s the block information about the transaction.
Personally, I am not a fan of the usage of the word ‘smart’ with anything, be it smart contracts, smart homes, smart cities.
Right now, we are getting closer and closer to rolling out some of the interesting stuff with Ethereum.
Remember that everything is being done on Testnet. Rather than deploying directly on to production (aka the Main network), you use Testnet to deploy contracts before moving on to the Main network and using real ether.
The interface allows you to specify details about the contract, which I won’t repeat here.
The ‘crux’ of it all is the contract. You specify either the Solidity contract source code, or byte code. My focus is using Solidity code.
To get started quickly, I used the Ethereum resource to create a hello world
contract mortal {
/* Define variable owner of the type address*/
address owner;
/* this function is executed at initialization and sets the owner of the contract */
function mortal() { owner = msg.sender; }
/* Function to recover the funds on the contract */
function kill() { if (msg.sender == owner) selfdestruct(owner); }
}
contract greeter is mortal {
/* 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;
}
}
After the contract is written, there are a few other settings to change and you are now ready to deploy.
There is also another check to ensure that your contract can correctly deploy. In my first try, I was out of luck for another contract attempt:
Here’s the HelloEverEtherWorld contract:
Then the kill clause or contract execution:
As noted by the Ethereum project::
Notice that every contract has to implement its own kill clause. In this particular case only the account that created the contract can kill it.
There are a number of resources out there for developing Solidity is a programming language to create contracts which run on Ethereum Virtual Machine on Blockchain.
You can use the Remix web-based IDE as a way to try out the Solidity contract but there are plugins available for other IDE.
You will need to obtain more ether on Testnet in order to test these out.
I’ll be looking into contracts even further, as well as what can be done on associated platforms.
Thanks for your time!
Your mileage may vary. This content is constantly under development and may change at any time.