Update serai-ethereum-processor to compile

This commit is contained in:
Luke Parker
2024-10-30 21:48:40 -04:00
parent 8e800885fb
commit b2ec58a445
7 changed files with 27 additions and 68 deletions

View File

@@ -36,9 +36,7 @@ fn balance_to_ethereum_amount(balance: Balance) -> U256 {
}
#[derive(Clone)]
pub(crate) struct SmartContract {
pub(crate) chain_id: U256,
}
pub(crate) struct SmartContract;
impl<D: Db> smart_contract_scheduler::SmartContract<Rpc<D>> for SmartContract {
type SignableTransaction = Action;
@@ -48,11 +46,8 @@ impl<D: Db> smart_contract_scheduler::SmartContract<Rpc<D>> for SmartContract {
_retiring_key: KeyFor<Rpc<D>>,
new_key: KeyFor<Rpc<D>>,
) -> (Self::SignableTransaction, EventualityFor<Rpc<D>>) {
let action = Action::SetKey {
chain_id: self.chain_id,
nonce,
key: PublicKey::new(new_key).expect("rotating to an invald key"),
};
let action =
Action::SetKey { nonce, key: PublicKey::new(new_key).expect("rotating to an invald key") };
(action.clone(), action.eventuality())
}
@@ -138,7 +133,6 @@ impl<D: Db> smart_contract_scheduler::SmartContract<Rpc<D>> for SmartContract {
}
res.push(Action::Batch {
chain_id: self.chain_id,
nonce,
coin: coin_to_ethereum_coin(coin),
fee: U256::try_from(total_gas).unwrap() * fee_per_gas,