Skip to content

Instantly share code, notes, and snippets.

View Freyskeyd's full-sized avatar

Simon Paitrault Freyskeyd

View GitHub Profile
@Freyskeyd
Freyskeyd / mock.rs
Last active April 25, 2024 08:02
Ethers MockResponse order
/// MockProvider seems to stack response in the wrong order
/// If I've a test that expect to:
/// - get_latest_block_number
/// - get_block
///
/// I'm expecting to define the mock for `get_last_block_number` and then `get_block`.
/// It's because of how MockProvider is processing request: https://github.com/gakonst/ethers-rs/blob/master/ethers-providers/src/rpc/transports/mock.rs#L64
/// When a request comes in, it pop_back instead of pop_front.
/// However, in the current setup I need to do the opposite, making the definition a bit weird in tests:
@Freyskeyd
Freyskeyd / keybase.md
Last active November 8, 2015 11:29
keybase.md

Keybase proof

I hereby claim:

  • I am freyskeyd on github.
  • I am freyskeyd (https://keybase.io/freyskeyd) on keybase.
  • I have a public key whose fingerprint is BD16 2677 1738 3122 BEF6 A991 D8CF BEFB F52B 8091

To claim this, I am signing this object: