@@ -52,7 +52,8 @@ pub struct Module {
5252
5353#[ derive( Clone , Debug , Serialize , Deserialize ) ]
5454pub struct ZkgmConfig {
55- vault_object_id : ObjectID ,
55+ owned_vault_object_id : ObjectID ,
56+ escrow_vault_object_id : ObjectID ,
5657 /// ID of the `wrapped_token_to_t` mapping
5758 wrapped_token_to_t : ObjectID ,
5859}
@@ -108,7 +109,13 @@ impl TransactionPluginServer for Module {
108109 let mut ptb = ProgrammableTransactionBuilder :: new ( ) ;
109110
110111 let store_initial_seq = self . get_initial_seq ( module_info. stores [ 0 ] . into ( ) ) . await ;
111- let vault_store_initial_seq = self . get_initial_seq ( self . zkgm_config . vault_object_id ) . await ;
112+ let owned_vault_store_initial_seq = self
113+ . get_initial_seq ( self . zkgm_config . owned_vault_object_id )
114+ . await ;
115+
116+ let escrow_vault_store_initial_seq = self
117+ . get_initial_seq ( self . zkgm_config . escrow_vault_object_id )
118+ . await ;
112119
113120 // If the module is ZKGM, then we register the tokens if needed. Otherwise,
114121 // the registered tokens are returned.
@@ -136,8 +143,10 @@ impl TransactionPluginServer for Module {
136143 self ,
137144 & module_info,
138145 store_initial_seq,
139- self . zkgm_config . vault_object_id ,
140- vault_store_initial_seq,
146+ self . zkgm_config . owned_vault_object_id ,
147+ owned_vault_store_initial_seq,
148+ self . zkgm_config . escrow_vault_object_id ,
149+ escrow_vault_store_initial_seq,
141150 coin_t,
142151 fee_recipient,
143152 data. relayer_msgs . clone ( ) ,
@@ -163,7 +172,12 @@ impl TransactionPluginServer for Module {
163172 let mut ptb = ProgrammableTransactionBuilder :: new ( ) ;
164173
165174 let store_initial_seq = self . get_initial_seq ( module_info. stores [ 0 ] . into ( ) ) . await ;
166- let vault_store_initial_seq = self . get_initial_seq ( self . zkgm_config . vault_object_id ) . await ;
175+ let owned_vault_store_initial_seq = self
176+ . get_initial_seq ( self . zkgm_config . owned_vault_object_id )
177+ . await ;
178+ let escrow_vault_store_initial_seq = self
179+ . get_initial_seq ( self . zkgm_config . escrow_vault_object_id )
180+ . await ;
167181
168182 // If the module is ZKGM, then we register the tokens if needed. Otherwise,
169183 // the registered tokens are returned.
@@ -180,8 +194,10 @@ impl TransactionPluginServer for Module {
180194 self ,
181195 & module_info,
182196 store_initial_seq,
183- self . zkgm_config . vault_object_id ,
184- vault_store_initial_seq,
197+ self . zkgm_config . owned_vault_object_id ,
198+ owned_vault_store_initial_seq,
199+ self . zkgm_config . escrow_vault_object_id ,
200+ escrow_vault_store_initial_seq,
185201 coin_t,
186202 fee_recipient,
187203 session,
@@ -202,7 +218,9 @@ impl TransactionPluginServer for Module {
202218 let mut ptb = ProgrammableTransactionBuilder :: new ( ) ;
203219
204220 let store_initial_seq = self . get_initial_seq ( module_info. stores [ 0 ] . into ( ) ) . await ;
205- let vault_store_initial_seq = self . get_initial_seq ( self . zkgm_config . vault_object_id ) . await ;
221+ let vault_store_initial_seq = self
222+ . get_initial_seq ( self . zkgm_config . owned_vault_object_id )
223+ . await ;
206224
207225 // If the module is ZKGM, then we register the tokens if needed. Otherwise,
208226 // the registered tokens are returned.
@@ -218,7 +236,7 @@ impl TransactionPluginServer for Module {
218236 self ,
219237 & module_info,
220238 store_initial_seq,
221- self . zkgm_config . vault_object_id ,
239+ self . zkgm_config . owned_vault_object_id ,
222240 vault_store_initial_seq,
223241 coin_t,
224242 session,
0 commit comments