From 4db37cad8430fc1a4036c2e08cf0639366286c09 Mon Sep 17 00:00:00 2001 From: Luke Tchang Date: Wed, 10 Nov 2021 04:38:19 -0800 Subject: [PATCH] fix: adds TimeLag::new() (#568) --- ethers-middleware/src/timelag/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ethers-middleware/src/timelag/mod.rs b/ethers-middleware/src/timelag/mod.rs index 61976d15..133b6e3d 100644 --- a/ethers-middleware/src/timelag/mod.rs +++ b/ethers-middleware/src/timelag/mod.rs @@ -37,6 +37,16 @@ pub struct TimeLag { inner: Arc, } +impl TimeLag +where + M: Middleware, +{ + /// Instantiates TimeLag provider + pub fn new(inner: M) -> Self { + Self { inner: inner.into() } + } +} + impl TimeLag where M: Middleware,