From 6bf400e4e92644d12ecbac758759a9dcea8db234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 27 Mar 2023 18:04:29 +0200 Subject: [PATCH] chore: nits from self review --- modules/apps/27-interchain-accounts/types/packet.go | 11 +++++------ modules/apps/transfer/types/packet.go | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/apps/27-interchain-accounts/types/packet.go b/modules/apps/27-interchain-accounts/types/packet.go index 8e0b5aa9af0..71551671c3c 100644 --- a/modules/apps/27-interchain-accounts/types/packet.go +++ b/modules/apps/27-interchain-accounts/types/packet.go @@ -55,8 +55,9 @@ func (iapd InterchainAccountPacketData) GetBytes() []byte { ADR-8 CallbackPacketData implementation -InterchainAccountPacketData implements CallbackPacketDataI interface. This will allow middlewares targeting specific VMs -to retrieve the desired callback addresses for the ICA packet on the source and destination chains. +InterchainAccountPacketData implements CallbackPacketData interface. This will allow middlewares targeting specific VMs +to retrieve the desired callback address for the ICA packet on the source chain. Destination callback addresses are not +supported for ICS 27. The Memo is used to set the desired callback addresses. @@ -67,11 +68,9 @@ The Memo format is defined like so: // ... other memo fields we don't care about "callbacks": { "src_callback_address": {contractAddrOnSourceChain}, - "dest_callback_address": {contractAddrOnDestChain}, // optional fields "src_callback_msg": {jsonObjectForSourceChainCallback}, - "dest_callback_msg": {jsonObjectForDestChainCallback}, } } ``` @@ -111,7 +110,7 @@ func (iapd InterchainAccountPacketData) GetSourceCallbackAddress() string { } // GetDestCallbackAddress returns an empty string. Destination callback addresses -// are not supported for ICS 27 since this feature is natively supported by +// are not supported for ICS 27. This feature is natively supported by // interchain accounts host submodule transaction execution. func (iapd InterchainAccountPacketData) GetDestCallbackAddress() string { return "" @@ -119,7 +118,7 @@ func (iapd InterchainAccountPacketData) GetDestCallbackAddress() string { // UserDefinedGasLimit returns 0 (no-op). The gas limit of the executing // transaction will be used. -func (fptd InterchainAccountPacketData) UserDefinedGasLimit() uint64 { +func (iapd InterchainAccountPacketData) UserDefinedGasLimit() uint64 { return 0 } diff --git a/modules/apps/transfer/types/packet.go b/modules/apps/transfer/types/packet.go index 67790ed622b..20080e623f8 100644 --- a/modules/apps/transfer/types/packet.go +++ b/modules/apps/transfer/types/packet.go @@ -71,7 +71,7 @@ func (ftpd FungibleTokenPacketData) GetBytes() []byte { ADR-8 CallbackPacketData implementation -FungibleTokenPacketData implements CallbackPacketDataI interface. This will allow middlewares targeting specific VMs +FungibleTokenPacketData implements CallbackPacketData interface. This will allow middlewares targeting specific VMs to retrieve the desired callback addresses for the ICS20 packet on the source and destination chains. The Memo is used to ensure that the callback is desired by the user. This allows a user to send an ICS20 packet @@ -169,6 +169,6 @@ func (ftpd FungibleTokenPacketData) GetDestCallbackAddress() string { // UserDefinedGasLimit returns 0 (no-op). The gas limit of the executing // transaction will be used. -func (fptd FungibleTokenPacketData) UserDefinedGasLimit() uint64 { +func (ftpd FungibleTokenPacketData) UserDefinedGasLimit() uint64 { return 0 }