@@ -131,6 +131,7 @@ mod Distributor {
131131 amount : u256 ,
132132 recipients : Array <ContractAddress >,
133133 token : ContractAddress ,
134+ unique_ref : felt252 ,
134135 ) {
135136 // Validate inputs
136137 assert (! recipients . is_empty (), EMPTY_RECIPIENTS );
@@ -160,7 +161,7 @@ mod Distributor {
160161 let recipients_list = recipients . span ();
161162 for recipient in recipients {
162163 token_dispatcher . transfer_from (caller , recipient , amount );
163- self . emit (WeightedDistribution { caller , token , recipient , amount });
164+ self . emit (WeightedDistribution { caller , token , recipient , amount , unique_ref });
164165 }
165166
166167 // Update global statistics
@@ -176,6 +177,7 @@ mod Distributor {
176177 token ,
177178 amount : amount_to_distribute ,
178179 recipients_count : recipients_list . len (),
180+ unique_ref ,
179181 timestamp ,
180182 },
181183 );
@@ -189,6 +191,7 @@ mod Distributor {
189191 token ,
190192 amount : amount_to_distribute ,
191193 recipients_count : recipients_list . len (),
194+ unique_ref ,
192195 },
193196 ),
194197 );
@@ -199,6 +202,7 @@ mod Distributor {
199202 amounts : Array <u256 >,
200203 recipients : Array <ContractAddress >,
201204 token : ContractAddress ,
205+ unique_ref : felt252 ,
202206 ) {
203207 // Validate inputs
204208 assert (! recipients . is_empty (), EMPTY_RECIPIENTS );
@@ -241,7 +245,7 @@ mod Distributor {
241245 token_dispatcher . transfer_from (caller , recipient , amount );
242246
243247 // Emit event for each distribution
244- self . emit (WeightedDistribution { caller , token , recipient , amount });
248+ self . emit (WeightedDistribution { caller , token , recipient , amount , unique_ref });
245249
246250 i += 1 ;
247251 }
@@ -259,6 +263,7 @@ mod Distributor {
259263 token ,
260264 amount : amount_to_distribute ,
261265 recipients_count : recipients . len (),
266+ unique_ref ,
262267 timestamp ,
263268 },
264269 );
@@ -272,6 +277,7 @@ mod Distributor {
272277 token ,
273278 amount : amount_to_distribute ,
274279 recipients_count : recipients . len (),
280+ unique_ref ,
275281 },
276282 ),
277283 );
0 commit comments