Skip to content

Instantly share code, notes, and snippets.

View Reecepbcups's full-sized avatar

Reece Williams Reecepbcups

View GitHub Profile
//! ```cargo
//! [dependencies]
//! bech32 = "0.9"
//! bip32 = "0.5"
//! dialoguer = "0.10"
//! hex = "0.4"
//! k256 = "0.13"
//! ripemd = "0.1"
//! thiserror = "1"
//! ```
@Reecepbcups
Reecepbcups / get_community_pool_value.py
Last active March 16, 2023 19:34
Gets the value of the community pool in FIAT
# https://docs.junonetwork.io/developer-guides/miscellaneous/get-token-prices
#
# pip install pycoingecko
# python3 main.py
#
# https://pypi.org/project/pycoingecko/
from pycoingecko import CoinGeckoAPI
from requests import get
@Reecepbcups
Reecepbcups / tendermint_python_subscribe.py
Last active May 17, 2023 06:10
Subscribes to a Tendermint RPC in python for new Blocks
# pip install rel
import rel
# pip install websocket-client
import websocket
# https://docs.tendermint.com/v0.34/rpc/
RPC_URL = "15.204.143.232:26657"
RPC_URL = f"ws://{RPC_URL}/websocket"
# For 443 / https connections, use wss
@blockpane
blockpane / authz.md
Created January 27, 2023 20:04
AuthZ Cheatsheet

Claims:

Setup:

simd tx distribution set-withdraw-addr <claim_address> -y --from validator
simd tx authz grant <claim_address> generic --msg-type=/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission --from validator
simd tx authz grant <claim_address> generic --msg-type=/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward --from validator
@blockpane
blockpane / bashrc.sh
Created August 18, 2022 00:03
tendermint cli autocompletions
# add this to your .bashrc (and edit the list of chains to your liking
# it will enable tab completion on the command line for each :)
while read autocomplete; do
hash $autocomplete 2>/dev/null && . <($autocomplete completion)
done << EOF
junod
kava
osmosisd
secretcli
@faddat
faddat / pebble-with-mev.bash
Last active March 8, 2023 02:40
use pebbledb and mev-tendermint on any cosmos chain
go mod edit -replace github.com/tendermint/tm-db=github.com/baabeetaa/tm-db@pebble
go mod tidy
go mod edit -replace github.com/tendermint/tendermint=github.com/notional-labs/mev-tendermint@0db69e64a2e87bb29b4417780da30630df97cadd
go mod tidy
go install -ldflags '-w -s -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb -X github.com/tendermint/tm-db.ForceSync=1' -tags pebbledb ./...