Skip to content

Instantly share code, notes, and snippets.

@SilentCicero
SilentCicero / ethers-rs-contract-example.rs
Last active November 11, 2022 06:47
A contract example for Ethers.rs, with use of provider get_logs and event decoding.
use anyhow::Result;
use ethers::{
prelude::*,
utils::{Ganache, Solc},
};
use std::{convert::TryFrom, sync::Arc, time::Duration};
// Generate the type-safe contract bindings by providing the ABI
// definition in human readable format