ethcontract-mock 0.15.3

Tools for mocking ethereum contracts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;
use crate::Mock;

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

    assert_eq!(web3.eth().gas_price().await?, 1.into());

    mock.update_gas_price(10);

    assert_eq!(web3.eth().gas_price().await?, 10.into());

    Ok(())
}