Skip to content

Instantly share code, notes, and snippets.

View contract1.sol
contract TimeLockedDeposit
{
State public state;
uint public creationTime;
uint public value;
address public seller;
address public buyer;
address public arbitrator;
enum State {
CREATED, CONFIRMED, INDISPUTE, DISABLED
View contract2.sol
contract TimeLockedDeposit
{
State public state;
uint public creationTime;
uint public value;
address public seller;
address public buyer;
address public arbitrator;
enum State {
CREATED, CONFIRMED, INDISPUTE, DISABLED
View memory
q[1] pl;
struct q
{
int16 t;
uint80 m;
string s;
string st;
}
View runMist
https://github.com/ethereum/mist
View customChain
eth allows to create custom/private blockchain by using several options:
--private defines the name of the custom chain (optional).
--config <filename>
<filename> contains a JSON description of the network:
- sealEngine (engine use to mine block)
- params (general network information like minGasLimit, minimumDifficulty, blockReward, networkID)
- genesis (genesis block description)
- accounts (setup an original state that contains accounts/contracts)
View genesis.json
{
"nonce": "0x0000000000000042",
"difficulty": "0x131415",
"alloc": {
"5fa096458cac206b8b5a5f6f6b0ee1449c839ebd": {
"balance": "9337000000000000000000"
}
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
@yann300
yann300 / runGeth.txt
Last active Mar 13, 2016
Geth install
View runGeth.txt
geth install: https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum
________________________________________________________
create network:
______________
geth --datadir="/home/yann/gethprivate/datadir" -verbosity 1 --port 30301 --networkid "25" --rpc --rpcport 8101 --genesis /home/yann/gethprivate/genesis/testgenesis.json --ipcpath <IPCPATH> console
genesis.json: https://gist.githubusercontent.com/yann300/7fdcabbb39c07b718e83/raw/6bcfedeccbd587e3f43fac6d5ae86a4a2fd3b272/genesis.json
_____________
<IPCPATH>:
OSX: <HOME>/Library/Ethereum/geth.ipc
Linux: <HOME>/.ethereum/geth.ipc
View webGetCode
1e6281f871ec414e4fbf66b4f2697a7a096f54f6
0x606060405236156100775760e060020a600035046310196bf781146100795780631808eeb8146100b657806341c0e1b5146100e7578063664b33501461011d5780637853c945146102f65780637fabe1a51461030857806399418a2114610370578063c3f9409f146103ab578063f5d36a5714610451575b005b61045a60043560038054829081101561000257506000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b015481565b61046c600435600260208190526000918252604090912080546001820154600160a060020a03919091169290910183565b610077600154600160a060020a031660001480610113575060015433600160a060020a03908116911614155b15610b0957610002565b604080516020604435600481810135601f810184900484028501840190955284845261045a948135946024803595939460649492939101918190840183828082843750949650505050505050600060006060604051908101604052806000815260200160008152602001602060405190810160405280600081526020015081526020015043428787876040518086815260200185815260200184600160a060020a03166c01000000000000000000000000028152601401838152602001828051906020019080838382906000
View fromEVM
1e6281f871ec414e4fbf66b4f2697a7a096f54f6
0x6060604081815280610d08833960a090525160805160008054600160a060020a0319908116841790915560018054909116821790555050610cc4806100446000396000f3606060405236156100775760e060020a600035046310196bf781146100795780631808eeb8146100b657806341c0e1b5146100e7578063664b33501461011d5780637853c945146102f65780637fabe1a51461030857806399418a2114610370578063c3f9409f146103ab578063f5d36a5714610451575b005b61045a60043560038054829081101561000257506000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b015481565b61046c600435600260208190526000918252604090912080546001820154600160a060020a03919091169290910183565b610077600154600160a060020a031660001480610113575060015433600160a060020a03908116911614155b15610b0957610002565b604080516020604435600481810135601f810184900484028501840190955284845261045a948135946024803595939460649492939101918190840183828082843750949650505050505050600060006060604051908101604052806000815260200160008152602001602060405190810160405280600081526020015081526020015043428787
View remix - source code debugging
remix next steps:
__________________________________________________________________________________
- Source code debugging against a node running rpc server
- source code debugging
- local / global variable watcher
- call stack (by function/contract name) (requires also function location)
the source code could be retrieved either by copy/paste, by using an external service (ether camp for example),
or by other decentralized means (? ipfs/swarm ...)