@@ -192,9 +192,6 @@ impl SubmitTask {
192
192
resp : & SignResponse ,
193
193
block : & BuiltBlock ,
194
194
) -> Result < TransactionRequest , eyre:: Error > {
195
- // TODO: ENG-1082 Implement fills
196
- let fills = vec ! [ ] ;
197
-
198
195
// manually retrieve nonce
199
196
let nonce =
200
197
self . provider ( ) . get_transaction_count ( self . provider ( ) . default_signer_address ( ) ) . await ?;
@@ -222,6 +219,10 @@ impl SubmitTask {
222
219
} ;
223
220
debug ! ( ?header, "built block header" ) ;
224
221
222
+ // Extract fills from the built block
223
+ let fills = self . extract_fills ( block) ;
224
+ debug ! ( ?fills, "extracted fills" ) ;
225
+
225
226
// Create a blob transaction with the blob header and signature values and return it
226
227
let tx = self
227
228
. build_blob_tx ( fills, header, v, r, s, block) ?
@@ -394,6 +395,15 @@ impl SubmitTask {
394
395
Ok ( block_num + 1 )
395
396
}
396
397
398
+ // This function converts &[SignedFill] --> [FillPermit2]
399
+ fn extract_fills ( & self , block : & BuiltBlock ) -> Vec < FillPermit2 > {
400
+ let mut fills = vec ! [ ] ;
401
+ for signed_fill in block. host_fills ( ) {
402
+ fills. push ( FillPermit2 :: from ( signed_fill) )
403
+ }
404
+ fills
405
+ }
406
+
397
407
/// Task future for the submit task
398
408
/// NB: This task assumes that the simulator will only send it blocks for
399
409
/// slots that it's assigned.
0 commit comments