Home

Awesome

Local Interchain

This program now lives upstream in the Strangelove org here and is bundled with their interchain suite of products. This includes more programming languages such as bash, rust, and python drivers for TTD and easy local enviroments.


A simple way to config and run IBC local chain testing environments using Strangelove's InterchainTest

This will eventually get phased out and brought into the ICTest repo directly. Just doing it here for ease of creation & for a future simple public archive.

Installing

Install on Mac / Linux

git clone https://github.com/Reecepbcups/local-interchain.git 

cd local-interchain

# NOTE: your binary will link back to this location of where you install.
# If you rename the folder or move it, you need to `make install` the binary again.
make install

Install on Windows

Follow this guide to setup the Windows OS environment for installing Local Interchain.

Running

(Default: make install links to the cloned directory. go install . will use your home directory /local-interchain)

(Ending the config file with _ignored.json or _ignore.json will ignore it from git)


REST API

A rest API can be found at curl localhost:8080/ by default. Other actions can take place here such as file uploads, actions, querying chain config information, and more!

Read more about the API here

Helpful Tips

// ./configs/logs.json
[
  {
    "chain_id": "exampleid-1",
    "chain_name": "example",
    "rpc_address": "http://localhost:38829",
    "grpc_address": "localhost:34917",
    "ibc_paths": []
  }
]
{
    "name": "juno",            
    "chain_id": "localjuno-2",
    "denom": "ujuno",
    "docker_image": {        
        "version": "v14.1.0"
    },    
    "gas_prices": "0%DENOM%",
    "gas_adjustment": 2.0,           
}

Base Chain Template

Here is a base chain template with every feature the configuration accepts. Accounts have extra data to make it simpler for scripting and read from the file directly.

{
    "name": "juno",            
    "chain_id": "localjuno-1",
    "denom": "ujuno",
    "binary": "junod",
    "bech32_prefix": "juno",
    "docker_image": {
        "repository": "ghcr.io/cosmoscontracts/juno-e2e",
        "version": "v14.1.0",
        "uid_gid": "1000:1000"
    },
    "chain_type": "cosmos",
    "coin_type": 118,
    "trusting_period": "112h",
    "gas_prices": "0%DENOM%",
    "gas_adjustment": 2.0,
    "number_vals": 1,
    "number_node": 0,
    "blocks_ttl": -1,
    "use_new_genesis_command": false,
    "ibc_paths": ["juno-ibc-1"],
    "debugging": true,
    "block_time": "500ms",
    "encoding-options": ["juno"],
    "genesis": {
        "modify": [
            {
                "key": "app_state.gov.voting_params.voting_period",
                "value": "15s"
            },
            {
                "key": "app_state.gov.deposit_params.max_deposit_period",
                "value": "15s"
            },
            {
                "key": "app_state.gov.deposit_params.min_deposit.0.denom",
                "value": "ujuno"
            }
        ],     
        "accounts": [
            {
                "name": "acc0",
                "address": "juno1efd63aw40lxf3n4mhf7dzhjkr453axurv2zdzk",
                "amount": "10000000%DENOM%",
                "mnemonic": "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry"
            }
        ]                
    }
},