fix(contract): doctests (#2007)

This commit is contained in:
DaniPopes 2023-01-04 12:29:10 +01:00 committed by GitHub
parent 71fbf8c6b6
commit 24b9ae2404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -107,10 +107,12 @@ use std::{fmt::Debug, marker::PhantomData, sync::Arc};
/// ```
///
/// # Event Logging
///
/// Querying structured logs requires you to have defined a struct with the expected
/// datatypes and to have implemented `Detokenize` for it. This boilerplate code
/// is generated for you via the [`abigen`] and [`Abigen` builder] utilities.
///
//
// Ignore because `ethers-contract-derive` macros do not work in doctests in `ethers-contract`.
/// ```ignore
/// # async fn foo() -> Result<(), Box<dyn std::error::Error>> {
/// use ethers_core::{abi::Abi, types::Address};

View File

@ -133,8 +133,8 @@ where
/// requests, and this is done on an interval basis.
///
/// # Example
///
/// ```
// Ignore because `ethers-contract-derive` macros do not work in doctests in `ethers-contract`.
/// ```ignore
/// # #[cfg(feature = "abigen")]
/// # async fn test<M:ethers_providers::Middleware>(contract: ethers_contract::Contract<M>) {
/// # use ethers_core::types::*;

View File

@ -75,8 +75,8 @@ where
/// will be wrapped into the right-hand variant of that `Either`.
///
/// # Example
///
/// ```
// Ignore because `ethers-contract-derive` macros do not work in doctests in `ethers-contract`.
/// ```ignore
/// # #[cfg(feature = "abigen")]
/// # async fn test<M:ethers_providers::Middleware>(contract: ethers_contract::Contract<M>) {
/// # use ethers_core::types::*;