Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add AdditionalStartArgs and Env to localic cfg #1295

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading