2023-01-27 19:54:49 +00:00
|
|
|
use ethers_contract_derive::abigen;
|
|
|
|
use ethers_core::abi::Address;
|
|
|
|
use ethers_providers::Provider;
|
|
|
|
use std::{
|
|
|
|
future::{Future, IntoFuture},
|
|
|
|
sync::Arc,
|
|
|
|
};
|
|
|
|
|
2023-02-25 14:12:16 +00:00
|
|
|
fn _contract_call_into_future_is_send() {
|
2023-02-25 22:24:20 +00:00
|
|
|
abigen!(DsProxyFactory, "./../ethers-middleware/contracts/DSProxyFactory.json");
|
2023-01-27 19:54:49 +00:00
|
|
|
let (provider, _) = Provider::mocked();
|
|
|
|
let client = Arc::new(provider);
|
|
|
|
let contract = DsProxyFactory::new(Address::zero(), client);
|
|
|
|
|
2023-02-21 00:27:43 +00:00
|
|
|
fn is_send<T: Future + Send + 'static>(future: T) -> T {
|
|
|
|
future
|
2023-01-27 19:54:49 +00:00
|
|
|
}
|
|
|
|
|
2023-02-21 00:27:43 +00:00
|
|
|
is_send(contract.cache().into_future());
|
2023-01-27 19:54:49 +00:00
|
|
|
}
|