test: update failing tests

This commit is contained in:
Matthias Seitz 2021-03-18 19:01:50 +01:00
parent a67b30ceaf
commit 30a85ffc76
6 changed files with 12 additions and 21 deletions

View File

@ -384,10 +384,8 @@ mod tests {
let cx = test_context();
assert_quote!(cx.expand_filter(&event), {
#[doc = "Gets the contract's `Transfer` event"]
pub fn transfer_filter(&self) -> Event<M, TransferFilter> {
self.0
.event("Transfer")
.expect("event not found (this should never happen)")
pub fn transfer_filter(&self) -> ethers_contract::builders::Event<M, TransferFilter> {
self.0.event()
}
});
}
@ -419,7 +417,7 @@ mod tests {
assert_quote!(definition, {
struct FooFilter {
pub a: bool,
pub p1: Address,
pub p1: ethers_core::types::Address,
}
});
}
@ -446,10 +444,10 @@ mod tests {
let cx = test_context();
let params = cx.expand_params(&event).unwrap();
let name = expand_struct_name(&event);
let definition = expand_data_tuple(name, &params);
let definition = expand_data_tuple(&name, &params);
assert_quote!(definition, {
struct FooFilter(pub bool, pub Address);
struct FooFilter(pub bool, pub ethers_core::types::Address);
});
}

View File

@ -179,7 +179,7 @@ mod tests {
],
)
.unwrap(),
{ , a: bool, b: Address },
{ , a: bool, b: ethers_core::types::Address },
);
}
@ -214,7 +214,7 @@ mod tests {
},
],)
.unwrap(),
{ (bool, Address) },
{ (bool, ethers_core::types::Address) },
);
}
}

View File

@ -96,7 +96,7 @@ pub fn abigen(input: TokenStream) -> TokenStream {
/// - `name`: override the name of an indexed event input, default is the rust field name
///
/// # Example
/// ```no_run
/// ```ignore
/// # use ethers_core::types::Address;
///
/// #[derive(Debug, EthAbiType)]

View File

@ -11,11 +11,13 @@ use ethers_providers::{Http, Middleware, Provider};
use ethers_signers::LocalWallet;
use std::{convert::TryFrom, sync::Arc, time::Duration};
// Note: The `EthAbiType` derive macro implements the necessary conversion between `Tokens` and
// Note: The `EthEvent` derive macro implements the necessary conversion between `Tokens` and
// the struct
#[derive(Clone, Debug, EthEvent)]
pub struct ValueChanged {
#[ethevent(indexed)]
pub old_author: Address,
#[ethevent(indexed)]
pub new_author: Address,
pub old_value: String,
pub new_value: String,

View File

@ -1,9 +0,0 @@
use ethers_contract::{abigen, EthEvent};
// use ethers_core::abi::Tokenizable;
//
abigen!(DsProxyFactory,
"ethers-middleware/contracts/DsProxyFactory.json",
methods {
build(address) as build_with_owner;
}
);

View File

@ -17,7 +17,7 @@ pub static ADDRESS_BOOK: Lazy<HashMap<U256, Address>> = Lazy::new(|| {
///
/// Generated with
/// ```no_run
/// ```ignore
/// # use ethers_contract::abigen;
/// abigen!(DsProxyFactory,
/// "ethers-middleware/contracts/DsProxyFactory.json",