控制器子模块参数
| 名称 | 类型 | 默认值 |
|---|---|---|
ControllerEnabled | bool | true |
ControllerEnabled
ControllerEnabled 参数控制一条链是否能够处理 ICS-27 控制器相关逻辑。这包括发送 Interchain Accounts 数据包,以及以下 ICS-26 回调处理函数:
OnChanOpenInitOnChanOpenAckOnChanCloseConfirmOnAcknowledgementPacketOnTimeoutPacket
主机子模块参数
| 名称 | 类型 | 默认值 |
|---|---|---|
HostEnabled | bool | true |
AllowMessages | []string | ["*"] |
HostEnabled
HostEnabled 参数控制一条链是否能够处理 ICS-27 主机相关逻辑。这包括以下 ICS-26 回调处理函数:
OnChanOpenTryOnChanOpenConfirmOnChanCloseConfirmOnRecvPacket
AllowMessages
AllowMessages 参数允许一条链通过使用 Protobuf 消息类型 URL 格式定义允许列表,从而限制托管的跨链账户被授权执行的消息或交易类型。
例如,某条基于 Cosmos SDK 的链如果选择为托管的 Interchain Accounts 提供治理投票和质押委托能力,其参数定义如下:
"*",它允许跨链账户执行任意类型的消息。该值必须是 allow_messages 数组中的唯一值。
The Interchain Accounts module contains the following on-chain parameters, logically separated for each distinct submodule:
Controller Submodule Parameters
| Name | Type | Default Value |
|---|---|---|
ControllerEnabled | bool | true |
ControllerEnabled
TheControllerEnabled parameter controls a chains ability to service ICS-27 controller specific logic. This includes the sending of Interchain Accounts packet data as well as the following ICS-26 callback handlers:
OnChanOpenInitOnChanOpenAckOnChanCloseConfirmOnAcknowledgementPacketOnTimeoutPacket
Host Submodule Parameters
| Name | Type | Default Value |
|---|---|---|
HostEnabled | bool | true |
AllowMessages | []string | ["*"] |
HostEnabled
TheHostEnabled parameter controls a chains ability to service ICS-27 host specific logic. This includes the following ICS-26 callback handlers:
OnChanOpenTryOnChanOpenConfirmOnChanCloseConfirmOnRecvPacket
AllowMessages
TheAllowMessages parameter provides the ability for a chain to limit the types of messages or transactions that hosted interchain accounts are authorized to execute by defining an allowlist using the Protobuf message type URL format.
For example, a Cosmos SDK-based chain that elects to provide hosted Interchain Accounts with the ability of governance voting and staking delegations will define its parameters as follows:
"*" value which allows any type of message to be executed by the interchain account. This must be the only value in the allow_messages array.