跨链账户模块包含以下链上参数,并按各个独立子模块进行逻辑划分:

控制器子模块参数

名称类型默认值
ControllerEnabledbooltrue

ControllerEnabled

ControllerEnabled 参数控制一条链是否能够处理 ICS-27 控制器相关逻辑。这包括发送 Interchain Accounts 数据包,以及以下 ICS-26 回调处理函数:
  • OnChanOpenInit
  • OnChanOpenAck
  • OnChanCloseConfirm
  • OnAcknowledgementPacket
  • OnTimeoutPacket

主机子模块参数

名称类型默认值
HostEnabledbooltrue
AllowMessages[]string["*"]

HostEnabled

HostEnabled 参数控制一条链是否能够处理 ICS-27 主机相关逻辑。这包括以下 ICS-26 回调处理函数:
  • OnChanOpenTry
  • OnChanOpenConfirm
  • OnChanCloseConfirm
  • OnRecvPacket

AllowMessages

AllowMessages 参数允许一条链通过使用 Protobuf 消息类型 URL 格式定义允许列表,从而限制托管的跨链账户被授权执行的消息或交易类型。 例如,某条基于 Cosmos SDK 的链如果选择为托管的 Interchain Accounts 提供治理投票和质押委托能力,其参数定义如下:
"params": {
  "host_enabled": true,
  "allow_messages": ["/cosmos.staking.v1beta1.MsgDelegate",
  "/cosmos.gov.v1beta1.MsgVote"]
}
此外,还有一个特殊的通配符值 "*",它允许跨链账户执行任意类型的消息。该值必须是 allow_messages 数组中的唯一值。
"params": {
  "host_enabled": true,
  "allow_messages": ["*"]
}

The Interchain Accounts module contains the following on-chain parameters, logically separated for each distinct submodule:

Controller Submodule Parameters

NameTypeDefault Value
ControllerEnabledbooltrue

ControllerEnabled

The ControllerEnabled 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:
  • OnChanOpenInit
  • OnChanOpenAck
  • OnChanCloseConfirm
  • OnAcknowledgementPacket
  • OnTimeoutPacket

Host Submodule Parameters

NameTypeDefault Value
HostEnabledbooltrue
AllowMessages[]string["*"]

HostEnabled

The HostEnabled parameter controls a chains ability to service ICS-27 host specific logic. This includes the following ICS-26 callback handlers:
  • OnChanOpenTry
  • OnChanOpenConfirm
  • OnChanCloseConfirm
  • OnRecvPacket

AllowMessages

The AllowMessages 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:
"params": {
  "host_enabled": true,
  "allow_messages": ["/cosmos.staking.v1beta1.MsgDelegate",
  "/cosmos.gov.v1beta1.MsgVote"]
}
There is also a special wildcard "*" 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.
"params": {
  "host_enabled": true,
  "allow_messages": ["*"]
}