Skip to content

Commit

Permalink
chore: nits from self review
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed Mar 27, 2023
1 parent ca33576 commit 6bf400e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions modules/apps/27-interchain-accounts/types/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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},
}
}
```
Expand Down Expand Up @@ -111,15 +110,15 @@ 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 ""
}

// 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
}

Expand Down
4 changes: 2 additions & 2 deletions modules/apps/transfer/types/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

0 comments on commit 6bf400e

Please sign in to comment.