Cheat Sheet: Parity Ethereum and Bitcoin Core
1 min readJan 29, 2020
Parity Ethereum
To run your own Ethereum node in one line, clone my GitHub repository: https://github.com/smd00/ethereum-node
View service status:
journalctl -f -u parity.service
Set your Parity node URL for the session:
ETH_URL=http://127.0.0.1:3000
Check block number:
#Hexadecimal format
curl --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST $ETH_URL#Decimal format
echo $((`curl --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST $ETH_URL | grep -oh "\w*0x\w*"`))
List wallet addresses:
curl --data '{"method":"parity_accountsInfo","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST $ETH_URL
Check wallet balance:
#Replace 0x36928500Bc1dCd7af6a2B4008875CC336b927D57 with your ETH address#Hexadecimal format
curl --data '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0x36928500Bc1dCd7af6a2B4008875CC336b927D57", "latest"],"id":1}' -H "Content-Type: application/json" $ETH_URL#Decimal format
echo $((`curl --data '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0x36928500Bc1dCd7af6a2B4008875CC336b927D57", "latest"],"id":1}' -H "Content-Type: application/json" $ETH_URL | grep -oh "\w*0x\w*"`))
Send ETH to another address:
#Replace 0xFROM_ADDRESS, 0xTO_ADDRESS, 0xAMOUNT, PASSPHRASEcurl --data '{"method":"personal_sendTransaction","params":[{"from":"0xFROM_ADDRESS","to":"0xTO_ADDRESS","value":"0xAMOUNT"},"PASSPHRASE"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST $ETH_URL
Bitcoin Core
To run your own Bitcoin node in one line, clone my GitHub repository: https://github.com/smd00/bitcoin-node
Check block count:
bitcoin-cli getblockcount
Check wallet balance:
bitcoin-cli getbalance
List transactions by address:
bitcoin-cli listreceivedbyaddress
List all wallet addresses and transactions (including addresses without transactions):
bitcoin-cli listreceivedbyaddress 0 true
List transactions:
bitcoin-cli listtransactions