Skip to content

Instantly share code, notes, and snippets.

View smtalimett's full-sized avatar

Satish Talim smtalimett

View GitHub Profile
@smtalimett
smtalimett / MessageContract.sol
Last active January 20, 2023 05:20
A simple Solidity program with Getters and Setters
pragma solidity ^0.4.0;
// A simple smart contract
contract MessageContract {
string message = "Hello World";
function getMessage() public constant returns(string) {
return message;
}
@smtalimett
smtalimett / genesis.json
Last active July 23, 2017 11:53
File needed to create our private blockchain
{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x20000",
@smtalimett
smtalimett / Command.txt
Created July 22, 2017 05:09
geth command
D:\ethereum-examples\example_1>geth --datadir=./chaindata init genesis.json
WARN [07-22|10:37:13] No etherbase set and no accounts found as default
INFO [07-22|10:37:13] Allocated cache and file handles database=D:\\ethe
reum-examples\\example_1\\chaindata\\geth\\chaindata cache=16 handles=16
INFO [07-22|10:37:13] Writing custom genesis block
INFO [07-22|10:37:13] Successfully wrote genesis state database=chaindat
a hash=5e1fc7.d790e0
INFO [07-22|10:37:13] Allocated cache and file handles database=D:\\ethe
reum-examples\\example_1\\chaindata\\geth\\lightchaindata cache=16 handles=16
INFO [07-22|10:37:13] Writing custom genesis block
@smtalimett
smtalimett / geth.txt
Last active December 25, 2017 06:51
Start geth
D:\ethereum-examples\example_1>geth --datadir=./chaindata --nodiscover
WARN [07-22|10:42:22] No etherbase set and no accounts found as default
INFO [07-22|10:42:22] Starting peer-to-peer node instance=Geth/v1.
7.3-stable-ab5646c5/windows-amd64/go1.9
INFO [07-22|10:42:22] Allocated cache and file handles database=D:\\ethe
reum-examples\\example_1\\chaindata\\geth\\chaindata cache=128 handles=1024
WARN [07-22|10:42:22] Upgrading chain database to use sequential keys
INFO [07-22|10:42:22] Initialised chain configuration config="{ChainID:
15 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 M
etropolis: <nil> Engine: unknown}"
@smtalimett
smtalimett / geth2.txt
Created July 22, 2017 05:19
Attach geth to running node
D:\ethereum-examples\example_1>geth attach
Welcome to the Geth JavaScript console!
instance: Geth/v1.6.7-stable-ab5646c5/windows-amd64/go1.8.3
modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txp
ool:1.0 web3:1.0
>
@smtalimett
smtalimett / geth3,txt
Created July 22, 2017 05:51
Start mining
> miner.start(2);
null
>
@smtalimett
smtalimett / geth4.txt
Created July 22, 2017 05:54
Stop mining
> miner.stop();
true
>
0x004b176924f2074a562b80c0b2932658Fb6FDfa7
0x004b176924f2074a562b80c0b2932658Fb6FDfa7
D:\ethereum-examples\example_1>geth --help | more
NAME:
geth - the go-ethereum command line interface
Copyright 2013-2017 The go-ethereum Authors
USAGE:
geth [options] command [command options] [arguments...]
VERSION: