Skip to content

Instantly share code, notes, and snippets.

View Cordtus's full-sized avatar

Cordt Hanson Cordtus

View GitHub Profile
@Cordtus
Cordtus / 10.4.md
Last active October 9, 2025 16:30

Custom Address Codec for IBC Transfers

Overview

Starting in ibc-go v10.4.0, the IBC transfer module uses the application's configured address codec to parse sender and receiver addresses. This enables chains to accept multiple address formats in IBC packets—for example, both standard Cosmos bech32 addresses (cosmos1...) and Ethereum hex addresses (0x...).

The Address Codec Interface

The Cosmos SDK defines a simple interface for converting between address representations:

Keybase proof

I hereby claim:

  • I am cordtus on github.
  • I am cordtus (https://keybase.io/cordtus) on keybase.
  • I have a public key ASAaMjK7GcmiulEEo4o7_CREHdZ9IYe8tKFZoNUwW6NAMQo

To claim this, I am signing this object:

@Cordtus
Cordtus / README.md
Last active September 20, 2025 02:07
Cosmos Chain Registry endpoint health tool

Endpoint Health & Auto-Prune

This script checks all chain.json files for broken RPC, REST, and gRPC endpoints.
Endpoints that fail several runs in a row (default 3) are removed automatically in a pull request.
Directories starting with "_" are ignored.

How it works:

  • DNS resolution for each endpoint
  • RPC: check /block or /status freshness
  • REST: check /cosmos/base/tendermint/v1beta1/blocks/latest
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"hash": "2DD3DECDEDD57C59DF09AD91BAA4F892FBC8DF6CADDE95761EBC54A700E4859C",
"height": "35225530",
"index": 1,
"tx_result": {
"code": 0,
"data": "EjgKJS9uZXV0cm9uLnRyYW5zZmVyLk1zZ1RyYW5zZmVyUmVzcG9uc2USDwizhwESCWNoYW5uZWwtOA==",
{
"jsonrpc": "2.0",
"id": -1,
"error": {
"code": -32603,
"message": "Internal error",
"data": "tx (2DD3DECDEDD57C59DF09AD91BAA4F892FBC8DF6CADDE95761EBC54A700E4859C) not found"
}
}
#!/usr/bin/env node
/**
* @fileoverview Docusaurus to Mintlify Migration Script
* @description Converts Docusaurus documentation to Mintlify format with proper MDX syntax,
* code formatting, and navigation structure. Supports multi-version migration with
* content caching for identical docs across versions.
*
* @example
* // Interactive mode
This file has been truncated, but you can view the full file.
{
"txs": [
{
"body": {
"messages": [
{
"@type": "/ibc.core.client.v1.MsgUpdateClient",
"clientId": "07-tendermint-0",
"clientMessage": {
"@type": "/ibc.lightclients.tendermint.v1.Header",
This file has been truncated, but you can view the full file.
{
"txs": [
{
"body": {
"messages": [
{
"@type": "/ibc.core.client.v1.MsgUpdateClient",
"clientId": "07-tendermint-0",
"clientMessage": {
"@type": "/ibc.lightclients.tendermint.v1.Header",
@Cordtus
Cordtus / COSMOS_TX_FETCHING.md
Last active August 20, 2025 01:43
Cosmos SDK Transaction Fetcher - Universal library for fetching complete transaction history from any Cosmos SDK blockchain

Cosmos SDK Transaction Fetcher

A comprehensive JavaScript/ESM library for fetching complete transaction history from Cosmos SDK-based blockchains (Tendermint/CometBFT) using RPC and REST APIs.

Overview

This library solves a common challenge when working with Cosmos SDK chains: fetching ALL transactions where a wallet address is involved, whether as sender or receiver, across different message types (bank sends, IBC transfers, staking, governance, etc.).

Key Features

Call Data Breakdown

Complete Raw Data

d42f22345b20b0cc0400000000000000000000000000000057d4eaf1091577a6b7d121202afbd2808134f1178400000000000000c6fa7af3bedbad3a3d65f36aabc97431b1bbe4c2d2f6e0e47ca60203452f5d61000000000000000000000000cd2b55811b7e9ddaf582158b7911ca2111b5801b00000000000000000000000000000000000000000000000000000000000ef42089a19876b55393185a06c44d951d9421d56a42bfc6fe26b2ae598fa8a867be8a000000000000000000000000691cf4641d5608f085b2c1921172120bb603d074

Decoded Structure