Skip to content

Instantly share code, notes, and snippets.

View arnabghose997's full-sized avatar
🎯
Focusing

Arnab Ghose arnabghose997

🎯
Focusing
View GitHub Profile
@arnabghose997
arnabghose997 / publicKeyToAddress.go
Last active November 10, 2023 23:56
Convert a secp256k1 compressed public key to Tendermint/Cosmos based blockchain address (Golang)
package main
import (
"fmt"
"crypto/sha256"
"golang.org/x/crypto/ripemd160"
"encoding/base64"
"github.com/cosmos/btcutil/bech32"
@arnabghose997
arnabghose997 / upgrade_check.py
Last active November 7, 2022 04:54
Check the time until upgrade height is reached in Tedermint
import datetime
BLOCK_TIME = 5 # Estimated
def figure_out_expected_time(current_height, upgrade_height):
difference_in_seconds = (upgrade_height - current_height) * BLOCK_TIME
return str(datetime.timedelta(seconds=difference_in_seconds))
if __name__=='__main__':