Skip to content

Instantly share code, notes, and snippets.

View jgrizzled's full-sized avatar

Justin Greene jgrizzled

View GitHub Profile
{"source":"contract bloater { bytes32[] public shit; uint public pilesOfShit; function bloat(bytes32 newshit, uint loops) { for(uint i = 0; i \u003c loops; i++) { shit.length++; shit[shit.length-1] = newshit; pilesOfShit++; } } }","language":"Solidity","languageVersion":"0","compilerVersion":"0.9.23","abiDefinition":[{"constant":true,"inputs":[],"name":"pilesOfShit","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"newshit","type":"bytes32"},{"name":"loops","type":"uint256"}],"name":"bloat","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"shit","outputs":[{"name":"","type":"bytes32"}],"type":"function"}],"userDoc":{"methods":{}},"developerDoc":{"methods":{}}}
{"source":"contract testShit2 { bytes32 public tester; function test() { tester = \"it werks\"; } }","language":"Solidity","languageVersion":"0","compilerVersion":"0.9.23","abiDefinition":[{"constant":true,"inputs":[],"name":"tester","outputs":[{"name":"","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[],"name":"test","outputs":[],"type":"function"}],"userDoc":{"methods":{}},"developerDoc":{"methods":{}}}
//exportEthBlocks.js
//Node.js script that gets block header data from geth via web3 RPC calls and exports to a CSV file
//Warning: it could take a few days to process the entire blockchain
//Automatically picks up were it left off
//CSV file format is:
//number,timestamp,difficulty,totalDifficulty,gasLimit,gasUsed,size,num tx
var fs = require('fs'),
web3 = require('web3'),
file = 'ethBlocks.csv',
notifyInterval = 30, //seconds
//bloatSpam.js
//Spams contract storage transactions to bloater
//Usage: bloatSpam(numTx, numLoops, useFaucet=true, fromAccount=eth.accounts[0])
//numTx: number of transactions per batch
//numLoops: number of transaction batches
//fromAccount (optional): local account to send from
//useFaucet (optional): use decentralized faucet to replenish funds
//reddit.com/u/BroughtToUByCarlsJr
//Function that pauses script until pending transactions are cleared
I0625 18:17:31.996740 4192 chain_manager.go:249] Last block (#707591) 29785cb4a9ebdef018510d5114186f901d3460eef3943727b2096ca4326d9950 TD=5584509137695146
I0625 18:17:34.625010 4192 server.go:294] Starting Server
I0625 18:17:34.630017 4192 server.go:531] Listening on [::]:30303
I0625 18:17:54.206485 4192 chain_manager.go:757] Fork detected @ b888ec7b. Reorganising chain from #707591 29785cb4 to a620249d
I0625 18:17:54.385723 4192 chain_manager.go:702] imported 3 block(s) (0 queued 0 ignored) including 367 txs in 1.8212764s. #707593 [5a953c2c / 07d05802]
I0625 18:18:01.354516 4192 chain_manager.go:702] imported 5 block(s) (0 queued 0 ignored) including 431 txs in 773.9448ms. #707598 [41e76866 / 59d7be5b]
I0625 18:18:03.662402 4192 chain_manager.go:702] imported 15 block(s) (0 queued 0 ignored) including 1393 txs in 2.3078858s. #707613 [893eac94 / 410e4917]
I0625 18:18:03.669409 4192 chain_manager.go:702] imported 0 block(s) (0 queued 2 ignored) including 0 txs in 7.0071ms. #707610 [be8d
I0710 20:25:41.978132 2776 mergedapi.go:61] eth_getFilterChanges ["0x0"]
I0710 20:25:41.979109 2776 types.go:105] Generated response: *shared.SuccessResponse &{%!s(float64=69568) 2.0 []}
I0710 20:25:41.979109 2776 mergedapi.go:61] eth_getFilterChanges ["0x1"]
I0710 20:25:41.979109 2776 types.go:105] Generated response: *shared.SuccessResponse &{%!s(float64=69569) 2.0 []}
I0710 20:25:41.979109 2776 http_net.go:123] Sending payload: [
{
"id": 69568,
"jsonrpc": "2.0",
"result": []
},
I0803 08:38:31.515204 6312 backend.go:289] Protocol Versions: [61 60], Network Id: 1
I0803 08:38:31.942752 6312 genesis.go:88] Genesis block already in chain. Writing canonical number
I0803 08:38:31.942752 6312 backend.go:301] Successfully wrote genesis block. New genesis hash = d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
I0803 08:38:31.942752 6312 backend.go:318] Blockchain DB Version: 3
I0803 08:38:31.943762 6312 chain_manager.go:251] Last block (#27175) 7753b012a462be947a5cad9730cd6021110ecd2eca819f454cac60a6d6df1c65 TD=18213501769182993
I0803 08:38:31.958781 6312 cmd.go:122] Starting Geth/v1.0.0/windows/go1.4.2
I0803 08:38:31.958781 6312 server.go:311] Starting Server
I0803 08:38:31.958781 6312 nat.go:111] mapped network port udp:30303 -> 30303 (ethereum discovery) using ExtIP(71.225.210.78)
I0803 08:38:31.978780 6312 udp.go:205] Listening, enode://1d7edf8592503af69d63cd0d14e7e3e824c8e8b4221648b41d0821fc91effd7647642e30508a2221ae8c1cc7a02244a6ba9eef84cf9d5ce
@jgrizzled
jgrizzled / kovan eth
Created July 19, 2017 00:10
kovan eth address
0x2C26AA15Bd6df2ea32d08a0E0D92ab3E32980d40
0412950368a3efad3941bc584832c6e7c590befbefbd43f4ad565aae91f1694e5faf02718b8df4e63f75224bc5eb438af64ece2b27ddf5e74ed805a982e72f2c60
@jgrizzled
jgrizzled / augur_crash.log
Created July 10, 2018 17:24
Augur on OSX 10.13.5 crash
[10:14:45.794] [info] network name Local
[10:14:47.560] [info] Starting Augur UI Server
[10:14:47.560] [info] Looking for certificate files in /Users/jgreene/Library/Application Support/augur
[10:14:47.561] [info] Found localhost certificate and key
[10:14:47.580] [info] SSL is enabled: true
[10:14:48.730] [info] network name Mainnet
[10:14:48.730] [info]
[10:14:49.551] [info] Connecting...
connecting to augur-node: undefined
connecting to ethereum-node: {"http":"https://mainnet.infura.io/augur","ws":"wss://mainnet.infura.io/ws"}