@@ -62,7 +62,10 @@ module ibc::light_client {
62
62
use ibc::cometbls_lc;
63
63
use ibc::state_lens_ics23_mpt_lc;
64
64
use ibc::state_lens_ics23_ics23_lc;
65
+ use ibc::create_lens_client_event::CreateLensClientEvent ;
66
+
65
67
use std::string::{Self , String };
68
+ use std::option::Option ;
66
69
67
70
const E_UNKNOWN_CLIENT_TYPE : u64 = 1 ;
68
71
const CLIENT_TYPE_STATE_LENS_ICS23_MPT : vector <u8 > = b"state-lens/ics23/mpt ";
@@ -75,37 +78,31 @@ module ibc::light_client {
75
78
client_id: u32 ,
76
79
client_state_bytes: vector <u8 >,
77
80
consensus_state_bytes: vector <u8 >
78
- ): (vector <u8 >, vector <u8 >, String ) {
81
+ ): (vector <u8 >, vector <u8 >, String , Option < CreateLensClientEvent > ) {
79
82
if (string::bytes (&client_type) == &CLIENT_TYPE_COMETBLS ) {
80
- let (client_state, consensus_state, counterparty_chain_id) =
81
- cometbls_lc::create_client (
82
- ibc_signer,
83
- client_id,
84
- client_state_bytes,
85
- consensus_state_bytes
86
- );
87
- return (client_state, consensus_state, counterparty_chain_id)
83
+ return cometbls_lc::create_client (
84
+ ibc_signer,
85
+ client_id,
86
+ client_state_bytes,
87
+ consensus_state_bytes
88
+ )
88
89
} else if (string::bytes (&client_type) == &CLIENT_TYPE_STATE_LENS_ICS23_MPT ) {
89
- let (client_state, consensus_state, counterparty_chain_id) =
90
- state_lens_ics23_mpt_lc::create_client (
91
- ibc_signer,
92
- client_id,
93
- client_state_bytes,
94
- consensus_state_bytes
95
- );
96
- return (client_state, consensus_state, counterparty_chain_id)
90
+ return state_lens_ics23_mpt_lc::create_client (
91
+ ibc_signer,
92
+ client_id,
93
+ client_state_bytes,
94
+ consensus_state_bytes
95
+ )
97
96
} else if (string::bytes (&client_type) == &CLIENT_TYPE_STATE_LENS_ICS23_ICS23 ) {
98
- let (client_state, consensus_state, counterparty_chain_id) =
99
- state_lens_ics23_ics23_lc::create_client (
100
- ibc_signer,
101
- client_id,
102
- client_state_bytes,
103
- consensus_state_bytes
104
- );
105
- return (client_state, consensus_state, counterparty_chain_id)
97
+ return state_lens_ics23_ics23_lc::create_client (
98
+ ibc_signer,
99
+ client_id,
100
+ client_state_bytes,
101
+ consensus_state_bytes
102
+ )
106
103
};
107
- abort E_UNKNOWN_CLIENT_TYPE
108
104
105
+ abort E_UNKNOWN_CLIENT_TYPE
109
106
}
110
107
111
108
public fun status (client_type: String , client_id: u32 ): u64 {
0 commit comments