Skip to content

Commit 9b83779

Browse files
authored
feat: IBC Eureka support on cosmwasm ibc libraries (#320)
1 parent c9797fe commit 9b83779

File tree

26 files changed

+1834
-118
lines changed

26 files changed

+1834
-118
lines changed

contracts/libraries/generic-ibc-transfer/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ struct LibraryConfig {
4848
remote_chain_info: RemoteChainInfo,
4949
// Denom map for the Packet-Forwarding Middleware, to perform a multi-hop transfer.
5050
denom_to_pfm_map: BTreeMap<String, PacketForwardMiddlewareConfig>,
51+
// Configuration used for IBC Eureka transfers
52+
eureka_config: Option<EurekaConfig>,
5153
}
5254

5355
// Defines the amount to be transferred, either a fixed amount or the whole available balance.
@@ -73,8 +75,24 @@ struct PacketForwardMiddlewareConfig {
7375
local_to_hop_chain_channel_id: String,
7476
// Channel ID from the intermediate to the destination chain
7577
hop_to_destination_chain_channel_id: String,
76-
// Temporary receiver address on the intermediate chain. Typically this is set to an invalid address so the entire transaction will revert if the forwarding fails. If not
78+
// Temporary receiver address on the intermediate chain. Typically this is set to an invalid address so the entire transaction will revert if the forwarding fails. If not
7779
// provided it's set to "pfm"
7880
hop_chain_receiver_address: Option<String>,
7981
}
82+
83+
// Configuration for IBC Eureka transfers
84+
pub struct EurekaConfig {
85+
/// The address of the contract on intermediate chain that will receive the callback.
86+
pub callback_contract: String,
87+
/// The address of the contract on intermediate chain that will trigger the actions, in this case the Eureka transfer.
88+
pub action_contract: String,
89+
/// Recover address on intermediate chain in case the transfer fails
90+
pub recover_address: String,
91+
/// Source channel on the intermediate chain (e.g. "08-wasm-1369")
92+
pub source_channel: String,
93+
/// Optional memo for the Eureka transfer triggered by the contract. Not used right now but could eventually be used.
94+
pub memo: Option<String>,
95+
/// Timeout in seconds to be used for the Eureka transfer. For reference, Skip Go uses 12 hours (43200). If not passed we will use that default value
96+
pub timeout: Option<u64>,
97+
}
8098
```

0 commit comments

Comments
 (0)