Skip to content

Commit

Permalink
fix: fix warnings for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Dec 20, 2023
1 parent 8be2649 commit f9b3c9a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/cheatcodes/assets/cheatcodes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/cheatcodes/spec/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ interface Vm {

/// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session.
#[cheatcode(group = Evm, safety = Safe)]
function stopAndReturnStateDiff() external returns (AccountAccess[] memory accesses);
function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses);

// -------- Recording Map Writes --------

Expand Down Expand Up @@ -508,7 +508,7 @@ interface Vm {

/// Gets all the logs according to specified filter.
#[cheatcode(group = Evm, safety = Safe)]
function eth_getLogs(uint256 fromBlock, uint256 toBlock, address addr, bytes32[] memory topics)
function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] memory topics)
external
returns (EthGetLogs[] memory logs);

Expand Down
4 changes: 2 additions & 2 deletions crates/cheatcodes/src/evm/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl Cheatcode for rpcCall {

impl Cheatcode for eth_getLogsCall {
fn apply_full<DB: DatabaseExt>(&self, ccx: &mut CheatsCtxt<DB>) -> Result {
let Self { fromBlock, toBlock, addr, topics } = self;
let Self { fromBlock, toBlock, target, topics } = self;
let (Ok(from_block), Ok(to_block)) = (u64::try_from(fromBlock), u64::try_from(toBlock))
else {
bail!("blocks in block range must be less than 2^64 - 1")
Expand All @@ -253,7 +253,7 @@ impl Cheatcode for eth_getLogsCall {
ccx.data.db.active_fork_url().ok_or_else(|| fmt_err!("no active fork URL found"))?;
let provider = ProviderBuilder::new(&url).build()?;
let mut filter =
Filter::new().address(addr.to_ethers()).from_block(from_block).to_block(to_block);
Filter::new().address(target.to_ethers()).from_block(from_block).to_block(to_block);
for (i, topic) in topics.iter().enumerate() {
let topic = topic.to_ethers();
match i {
Expand Down
4 changes: 2 additions & 2 deletions testdata/cheats/Vm.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f9b3c9a

Please sign in to comment.