Skip to content

Commit

Permalink
feat: add AdditionalStartArgs and Env to localic cfg (#1295)
Browse files Browse the repository at this point in the history
  • Loading branch information
akremstudy authored Nov 5, 2024
1 parent f20ce5a commit 510c60a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion local-interchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A simple way to config and run IBC local chain testing environments with any lan
## Installing Locally

**Install on Mac / Linux**

```bash
git clone https://github.com/strangelove-ventures/interchaintest.git

Expand All @@ -22,6 +23,7 @@ cd interchaintest/local-interchain
# If you rename the folder or move it, you need to `make install` the binary again.
make install
```

**Install on Windows**

Follow [this guide](./docs/WINDOWS.md) to setup the Windows OS environment for installing Local Interchain.
Expand All @@ -39,6 +41,7 @@ Follow [this guide](./docs/WINDOWS.md) to setup the Windows OS environment for i
*(Ending the config file with `_ignored.json` or `_ignore.json` will ignore it from git)*

### Optional Start Flags

--api-address string override the default API address (default "127.0.0.1")
--api-port uint16 override the default API port (default 8080)
--auth-key string require an auth key to use the internal API
Expand Down Expand Up @@ -129,6 +132,12 @@ Here is a base chain template with every feature the configuration accepts. Acco
"1317": "1317",
"9090": "9090"
},
"additional_start_args": [
"--keyring-backend","test"
],
"env": [
"ETH_RPC_URL=https://sepolia.infura.io/v3/key"
],
"config_file_overrides": [
{
"file": "config/config.toml",
Expand Down Expand Up @@ -166,4 +175,4 @@ Here is a base chain template with every feature the configuration accepts. Acco
},
```

**NOTE** The `host_port_override` section maps internal ports to the external host. If no ports are overridden, random host ports are assigned as usual.
**NOTE** The `host_port_override` section maps internal ports to the external host. If no ports are overridden, random host ports are assigned as usual.
2 changes: 2 additions & 0 deletions local-interchain/interchain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ func CreateChainConfigs(cfg types.Chain) (ibc.ChainConfig, *interchaintest.Chain
EncodingConfig: nil,

InterchainSecurityConfig: cfg.ICSVersionOverride,
AdditionalStartArgs: cfg.AdditionalStartArgs,
Env: cfg.Env,
}

if cfg.DockerImage.Version == "" {
Expand Down
2 changes: 2 additions & 0 deletions local-interchain/interchain/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ type Chain struct {
HostPortOverride map[string]string `json:"host_port_override,omitempty" yaml:"host_port_override,omitempty"`
ICSConsumerLink string `json:"ics_consumer_link,omitempty" yaml:"ics_consumer_link,omitempty"`
ICSVersionOverride ibc.ICSConfig `json:"ics_version_override,omitempty" yaml:"ics_version_override,omitempty"`
AdditionalStartArgs []string `json:"additional_start_args,omitempty" yaml:"additional_start_args,omitempty"`
Env []string `json:"env,omitempty" yaml:"env,omitempty"`
}

func (chain *Chain) Validate() error {
Expand Down

0 comments on commit 510c60a

Please sign in to comment.