Skip to content

Commit 003508e

Browse files
committed
chore: please solve my issue
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
1 parent dc46d5d commit 003508e

File tree

1 file changed

+7
-4
lines changed
  • voyager/modules/state/sui/src

1 file changed

+7
-4
lines changed

voyager/modules/state/sui/src/main.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ pub struct Module {
6161

6262
pub ibc_store: ObjectID,
6363

64-
pub ibc_contract: ObjectID,
64+
pub initial_ibc_contract: ObjectID,
65+
66+
pub latest_ibc_contract: ObjectID,
6567

6668
pub ibc_store_initial_seq: SequenceNumber,
6769
}
@@ -174,7 +176,7 @@ impl Module {
174176
.expect("there must be some events exist")
175177
.into_iter()
176178
.find_map(|e| {
177-
if e.type_.address == self.ibc_contract.into()
179+
if e.type_.address == self.initial_ibc_contract.into()
178180
&& e.type_.module.as_str() == "events"
179181
&& e.type_.name.as_str() == "PacketSend"
180182
{
@@ -255,7 +257,8 @@ impl StateModule<IbcUnion> for Module {
255257
sui_client,
256258
rpc_url: config.rpc_url,
257259
ibc_store: config.ibc_store,
258-
ibc_contract,
260+
initial_ibc_contract: config.ibc_contract,
261+
latest_ibc_contract: ibc_contract,
259262
ibc_store_initial_seq,
260263
})
261264
}
@@ -306,7 +309,7 @@ impl StateModuleServer<IbcUnion> for Module {
306309
) -> RpcResult<Value> {
307310
let query = SuiQuery::new_with_store(
308311
&self.sui_client,
309-
self.ibc_contract,
312+
self.latest_ibc_contract,
310313
self.ibc_store,
311314
self.ibc_store_initial_seq,
312315
)

0 commit comments

Comments
 (0)