XXX Coding Nifty Tips and Tricks You Wish Your Mom Told You About

Naz
May 7, 2021

Useful coding stuff for reference

  1. You have a gethbinary running on your DAppNode. How to use it?

geth attach http://geth.dappnode:8545

2. You are in a JavaScript console, what’s the equivalent of Python’sdir ?

Object.keys(this);

3. You are in a Javascript console, what’s the equivalent of Python’s print(func.__doc__) ?

console.log(func);

4. geth WebSocket pending transactions subscription

  • connect to your DAppNode’s running client

ws ws://geth.dappnode:8546

  • issue the following message

{"id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}

This is a wip. I will be adding stuffs.

References

https://chainstack.com/exploring-the-methods-of-looking-into-ethereums-transaction-pool/

--

--

Naz

I crave knowledge. Mathematical knowledge and then computer science.