Skip to content

Instantly share code, notes, and snippets.

@kunal365roy
kunal365roy / gist:3c37ac9d1c3aaf31140f7c5faa083932
Created March 30, 2020 20:46
Parity vs. Geth Error Code responses
PARITY_SUBSCRIPTION_INVALID_TRANSPORT = -32090
eth_subscribe
{"id":4,"jsonrpc":"2.0","method":"eth_subscribe","params":["newHeads",{}]}
PARITY: {"jsonrpc": "2.0", "id": 4, "error": {"code": -32090, "message": "Subscriptions are not available on this transport."}}
GETH: {"jsonrpc":"2.0","id":4,"error":{"code":-32000,"message":"notifications not supported"}}
PARITY_EXCEPTION_ERROR = -32016
eth_estimateGas
{"id": 1, "jsonrpc": "2.0", "params": [{"to": "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", "data": "0xa6c3bf33000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000", "value": "0x3ff2e795f5000", "gasPrice": "0x1bf08eb00", "from": "0x6f67fedc36664c4d954cb4487c0377c9050bd1a0"}], "method": "eth_estimateGas"}
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@spalladino
spalladino / falsehoods-that-ethereum-programmers-believe.md
Last active February 9, 2026 03:46
Falsehoods that Ethereum programmers believe

Falsehoods that Ethereum programmers believe

I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.

About Gas

Calling estimateGas will return the gas required by my transaction

Calling estimateGas will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i

@miguelmota
miguelmota / README.md
Last active February 28, 2023 02:10
Deploy custom Optimism rollup instructions

Instructions

Unofficial guide on deploying a custom Optimism rollup on Kovan

⚠️ Notice: Guide updated April 2021. Check out the Optimism discord for additional help and support.

Clone optimism contracts:

git clone git@github.com:ethereum-optimism/optimism.git