命令行接口(CLI)
用户可以使用 CLI 查询并与transfer 模块交互。使用 --help 标志可查看可用命令:
查询
query 命令允许用户查询 transfer 状态。
交易
tx 命令允许用户与 controller 子模块交互。
transfer
transfer 命令允许用户通过发送链上的源端口 ID 和通道 ID 执行跨链代币转账。
coins 参数接受要转账代币的数量和面额(例如 100uatom)。
可与该命令一起使用的附加标志包括:
--packet-timeout-height:用于以{revision}-{height}格式指定超时区块高度。默认值为0-0,这实际上会禁用该超时。超时高度只能是绝对值,因此此选项必须与设置为 true 的--absolute-timeouts一起使用。在 IBC v1 协议中,必须设置--packet-timeout-height或--packet-timeout-timestamp之一。在 IBC v2 协议中,必须设置--packet-timeout-timestamp。--packet-timeout-timestamp:用于以纳秒指定超时时间戳。该超时既可以是相对值(相对于当前 UTC 时间),也可以是绝对值。默认值为 10 分钟(因此为相对值)。在 IBC v1 协议中,必须设置--packet-timeout-height或--packet-timeout-timestamp之一。在 IBC v2 协议中,必须设置--packet-timeout-timestamp。--absolute-timeouts:用于将超时时间戳解释为绝对值(设置为 true 时生效)。默认值为 false(因此超时会被视为相对于当前 UTC 时间的相对值)。--memo:用于指定随转账数据包一同发送的 memo 字符串。如果使用了转发,则该 memo 字符串会通过中间链传递到最终目标。
total-escrow
total-escrow 命令允许用户查询某个特定代币面额的总托管数量,而不受代币是从哪个转账通道发出的影响。
gRPC
用户可以通过 gRPC 端点查询transfer 模块。
TotalEscrowForDenom
TotalEscrowForDenom 端点允许用户查询某个特定代币面额的总托管数量,而不受代币是从哪个转账通道发出的影响。
CLI
A user can query and interact with thetransfer module using the CLI. Use the --help flag to discover the available commands:
Query
Thequery commands allow users to query transfer state.
Transactions
Thetx commands allow users to interact with the controller submodule.
transfer
The transfer command allows users to execute cross-chain token transfers from the source port ID and channel ID on the sending chain.
coins parameter accepts the amount and denomination (e.g. 100uatom) of the tokens to be transferred.
The additional flags that can be used with the command are:
--packet-timeout-heightto specify the timeout block height in the format{revision}-{height}. The default value is0-0, which effectively disables the timeout. Timeout height can only be absolute, therefore this option must be used in combination with--absolute-timeoutsset to true. On IBC v1 protocol, either--packet-timeout-heightor--packet-timeout-timestampmust be set. On IBC v2 protocol--packet-timeout-timestampmust be set.--packet-timeout-timestampto specify the timeout timestamp in nanoseconds. The timeout can be either relative (from the current UTC time) or absolute. The default value is 10 minutes (and thus relative). On IBC v1 protocol, either--packet-timeout-heightor--packet-timeout-timestampmust be set. On IBC v2 protocol--packet-timeout-timestampmust be set.--absolute-timeoutsto interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout is considered relative to current UTC time).--memoto specify the memo string to be sent along with the transfer packet. If forwarding is used, then the memo string will be carried through the intermediary chains to the final destination.
total-escrow
The total-escrow command allows users to query the total amount in escrow for a particular coin denomination regardless of the transfer channel from where the coins were sent out.
gRPC
A user can query thetransfer module using gRPC endpoints.
TotalEscrowForDenom
The TotalEscrowForDenom endpoint allows users to query the total amount in escrow for a particular coin denomination regardless of the transfer channel from where the coins were sent out.