diff --git a/ethers-core/src/types/log.rs b/ethers-core/src/types/log.rs index 934ef466..dd70fa79 100644 --- a/ethers-core/src/types/log.rs +++ b/ethers-core/src/types/log.rs @@ -65,6 +65,15 @@ pub struct Log { pub removed: Option, } +impl rlp::Encodable for Log { + fn rlp_append(&self, s: &mut rlp::RlpStream) { + s.begin_list(3); + s.append(&self.address); + s.append_list(&self.topics); + s.append(&self.data.0); + } +} + #[derive(Copy, Clone, Debug, PartialEq)] pub enum FilterBlockOption { Range { from_block: Option, to_block: Option }, diff --git a/ethers-core/src/types/transaction/response.rs b/ethers-core/src/types/transaction/response.rs index 1c4fc76c..2968dc71 100644 --- a/ethers-core/src/types/transaction/response.rs +++ b/ethers-core/src/types/transaction/response.rs @@ -414,6 +414,16 @@ pub struct TransactionReceipt { pub effective_gas_price: Option, } +impl rlp::Encodable for TransactionReceipt { + fn rlp_append(&self, s: &mut RlpStream) { + s.begin_list(4); + s.append(&self.status); + s.append(&self.cumulative_gas_used); + s.append(&self.logs_bloom); + s.append_list(&self.logs); + } +} + #[cfg(test)] #[cfg(not(feature = "celo"))] mod tests {