ethcontract-mock 0.25.6

Tools for mocking ethereum contracts.
Documentation
1
2
3
4
5
6
7
8
9
10
use super::*;

#[tokio::test]
async fn chain_id() -> Result {
    let web3 = Mock::new(1234).web3();

    assert_eq!(web3.eth().chain_id().await?, 1234.into());

    Ok(())
}