Remove use of ethers core (#5301)

* Remove use of ethers_core::RlpStream

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove_use_of_ethers_core

* Remove old code

* Simplify keccak call

* Remove unused package

* Merge branch 'unstable' of https://github.com/ethDreamer/lighthouse into remove_use_of_ethers_core

* Merge branch 'unstable' into remove_use_of_ethers_core

* Run clippy

* Merge branch 'remove_use_of_ethers_core' of https://github.com/dospore/lighthouse into remove_use_of_ethers_core

* Check all cargo fmt

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove_use_of_ethers_core

* Revert lock

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove_use_of_ethers_core

* introduce a shim to convert between the two u256 types

* move alloy to wrokspace

* align alloy versions

* update

* update web3signer test certs

* Revert "update web3signer test certs"

This reverts commit effd5910ad.

* Consolidate alloy versions

* Delete empty file
This commit is contained in:
Dospore
2024-07-24 11:21:45 +10:00
committed by GitHub
parent d72dca5e79
commit 10445f31c6
10 changed files with 145 additions and 89 deletions

View File

@@ -1,4 +1,5 @@
use super::*;
use alloy_rlp::RlpEncodable;
use serde::{Deserialize, Serialize};
use strum::EnumString;
use superstruct::superstruct;
@@ -463,6 +464,24 @@ impl From<JsonWithdrawal> for Withdrawal {
}
}
}
#[derive(Debug, PartialEq, Clone, RlpEncodable)]
pub struct EncodableJsonWithdrawal<'a> {
pub index: u64,
pub validator_index: u64,
pub address: &'a [u8],
pub amount: u64,
}
impl<'a> From<&'a JsonWithdrawal> for EncodableJsonWithdrawal<'a> {
fn from(json_withdrawal: &'a JsonWithdrawal) -> Self {
Self {
index: json_withdrawal.index,
validator_index: json_withdrawal.validator_index,
address: json_withdrawal.address.as_bytes(),
amount: json_withdrawal.amount,
}
}
}
#[superstruct(
variants(V1, V2, V3),