Have the Ethereum scheduler create Batches as necessary

Also introduces the fee logic, despite it being stubbed.
This commit is contained in:
Luke Parker
2024-09-20 00:12:54 -04:00
parent 8ea5acbacb
commit 4292660eda
4 changed files with 132 additions and 45 deletions

View File

@@ -89,8 +89,8 @@ impl<D: Db> signers::TransactionPublisher<Transaction> for TransactionPublisher<
// Convert from an Action (an internal representation of a signable event) to a TxLegacy
let tx = match tx.0 {
Action::SetKey { chain_id: _, nonce: _, key } => router.update_serai_key(&key, &tx.1),
Action::Batch { chain_id: _, nonce: _, outs } => {
router.execute(OutInstructions::from(outs.as_ref()), &tx.1)
Action::Batch { chain_id: _, nonce: _, coin, fee_per_gas, outs } => {
router.execute(coin, fee_per_gas, OutInstructions::from(outs.as_ref()), &tx.1)
}
};