@@ -117,7 +117,8 @@ impl From<&SignedFill> for FillPermit2 {
117117/// or [`AggregateOrders`] into a [`SignedFill`] with correct permit2 semantics.
118118#[ derive( Clone , Debug , Deserialize , Serialize , PartialEq , Eq ) ]
119119pub struct UnsignedFill < ' a > {
120- /// The rollup chain id from which the Orders originated.
120+ /// The rollup chain id from which the Orders originated
121+ /// to which the Fill will be credited.
121122 ru_chain_id : Option < u64 > ,
122123 /// The set of Orders to fill. Multiple Orders can be aggregated into a single Fill,
123124 /// but they MUST all originate on the same rollup chain indicated by `ru_chain_id`.
@@ -215,18 +216,18 @@ impl<'a> UnsignedFill<'a> {
215216 }
216217
217218 /// Add the rollup chain id to the UnsignedFill.
218- /// This is the rollup chain id from which the Orders originated,
219- /// to which the Fill should be credited.
220- /// MUST call this before signing, cannot be inferred.
219+ #[ deprecated( since = "0.14.1" , note = "Use `with_chain` instead." ) ]
221220 pub fn with_ru_chain_id ( self , ru_chain_id : u64 ) -> Self {
222221 Self { ru_chain_id : Some ( ru_chain_id) , ..self }
223222 }
224223
225- /// Add the chain id and Order contract address to the UnsignedFill.
224+ /// Add the chain ids and Orders contract addresses
225+ /// used for signing the Fill.
226+ /// MUST call before `sign` or `sign_for`.
226227 pub fn with_chain ( mut self , constants : SignetSystemConstants ) -> Self {
227228 self . target_chains . insert ( constants. ru_chain_id ( ) , constants. ru_orders ( ) ) ;
228229 self . target_chains . insert ( constants. host_chain_id ( ) , constants. host_orders ( ) ) ;
229- self
230+ Self { ru_chain_id : Some ( constants . ru_chain_id ( ) ) , .. self }
230231 }
231232
232233 /// Sign the UnsignedFill, generating a SignedFill for each target chain.
0 commit comments