Skip to content

Commit

Permalink
forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
RPate97 committed Feb 24, 2024
1 parent ff1ad09 commit 88ce027
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
10 changes: 5 additions & 5 deletions crates/cheatcodes/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ impl<DB: DatabaseExt> Inspector<DB> for Cheatcodes {
reverted: false,
deployedCode: vec![],
storageAccesses: vec![],
depth: U256::from(0), // updated on cheatcodes::evm::get_state_diff
depth: U256::ZERO, // updated on cheatcodes::evm::get_state_diff
};
// Ensure that we're not selfdestructing a context recording was initiated on
if let Some(last) = account_accesses.last_mut() {
Expand Down Expand Up @@ -542,7 +542,7 @@ impl<DB: DatabaseExt> Inspector<DB> for Cheatcodes {
reverted: false,
deployedCode: vec![],
storageAccesses: vec![],
depth: U256::from(0), // updated on cheatcodes::evm::get_state_diff
depth: U256::ZERO, // updated on cheatcodes::evm::get_state_diff
};
let access = AccountAccess {
access: account_access,
Expand Down Expand Up @@ -901,7 +901,7 @@ impl<DB: DatabaseExt> Inspector<DB> for Cheatcodes {
reverted: false,
deployedCode: vec![],
storageAccesses: vec![], // updated on step
depth: U256::from(0), // updated on cheatcodes::evm::get_state_diff
depth: U256::ZERO, // updated on cheatcodes::evm::get_state_diff
},
depth: data.journaled_state.depth(),
}]);
Expand Down Expand Up @@ -1271,7 +1271,7 @@ impl<DB: DatabaseExt> Inspector<DB> for Cheatcodes {
reverted: false,
deployedCode: vec![], // updated on create_end
storageAccesses: vec![], // updated on create_end
depth: U256::from(0), // updated on cheatcodes::evm::get_state_diff
depth: U256::ZERO, // updated on cheatcodes::evm::get_state_diff
},
depth: data.journaled_state.depth(),
}]);
Expand Down Expand Up @@ -1575,7 +1575,7 @@ fn append_storage_access(
value: U256::ZERO,
data: vec![],
deployedCode: vec![],
depth: U256::from(0), // updated on cheatcodes::evm::get_state_diff
depth: U256::ZERO, // updated on cheatcodes::evm::get_state_diff
};
last.push(AccountAccess { access: resume_record, depth: entry.depth });
}
Expand Down
58 changes: 29 additions & 29 deletions testdata/cheats/RecordAccountAccesses.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 0
depth: 0
})
);

Expand All @@ -368,7 +368,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 1
depth: 1
})
);
assertEq(
Expand All @@ -386,7 +386,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "hello world",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 2
depth: 2
})
);
assertEq(
Expand All @@ -404,7 +404,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 3
depth: 3
})
);
assertEq(
Expand All @@ -422,7 +422,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodePacked(type(SelfCaller).creationCode, abi.encode("hello2 world2")),
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 3
depth: 3
})
);
assertEq(
Expand All @@ -440,7 +440,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 3
depth: 3
})
);
}
Expand Down Expand Up @@ -468,7 +468,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(this.revertingCall, (address(1234), "")),
reverted: true,
storageAccesses: new Vm.StorageAccess[](0),
depth: 0
depth: 0
})
);
assertEq(
Expand All @@ -486,7 +486,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: true,
storageAccesses: new Vm.StorageAccess[](0),
depth: 1
depth: 1
})
);
}
Expand Down Expand Up @@ -528,7 +528,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex
depth: startingIndex
})
);
}
Expand Down Expand Up @@ -561,7 +561,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(NestedRunner.run, (shouldRevert)),
reverted: shouldRevert,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex
depth: startingIndex
}),
false
);
Expand Down Expand Up @@ -594,7 +594,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(Reverter.run, ()),
reverted: true,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex + 1
depth: startingIndex + 1
}),
false
);
Expand Down Expand Up @@ -627,7 +627,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(Doer.run, ()),
reverted: true,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex + 2
depth: startingIndex + 2
}),
false
);
Expand Down Expand Up @@ -660,7 +660,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(Doer.doStuff, ()),
reverted: true,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex + 3
depth: startingIndex + 3
}),
false
);
Expand Down Expand Up @@ -693,7 +693,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(Succeeder.run, ()),
reverted: shouldRevert,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex + 4
depth: startingIndex + 4
}),
false
);
Expand Down Expand Up @@ -726,7 +726,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(Doer.run, ()),
reverted: shouldRevert,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex + 5
depth: startingIndex + 5
}),
false
);
Expand Down Expand Up @@ -759,7 +759,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(Doer.doStuff, ()),
reverted: shouldRevert,
storageAccesses: new Vm.StorageAccess[](0),
depth: startingIndex + 6
depth: startingIndex + 6
}),
false
);
Expand Down Expand Up @@ -799,7 +799,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(NestedStorer.run, ()),
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 0
depth: 0
}),
false
);
Expand Down Expand Up @@ -844,7 +844,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodeCall(NestedStorer.run2, ()),
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 1
depth: 1
}),
false
);
Expand Down Expand Up @@ -877,7 +877,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 2
depth: 2
}),
false
);
Expand Down Expand Up @@ -923,7 +923,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodePacked(type(ConstructorStorer).creationCode, abi.encode(false)),
reverted: false,
storageAccesses: storageAccesses,
depth: 0
depth: 0
})
);

Expand All @@ -946,7 +946,7 @@ contract RecordAccountAccessesTest is DSTest {
),
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 1
depth: 1
})
);

Expand Down Expand Up @@ -975,7 +975,7 @@ contract RecordAccountAccessesTest is DSTest {
data: creationCode,
reverted: true,
storageAccesses: storageAccesses,
depth: 2
depth: 2
})
);
}
Expand Down Expand Up @@ -1021,7 +1021,7 @@ contract RecordAccountAccessesTest is DSTest {
data: creationCode,
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 1
depth: 1
})
);
assertEq(
Expand All @@ -1039,7 +1039,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 2
depth: 2
})
);
}
Expand Down Expand Up @@ -1069,7 +1069,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodePacked(type(SelfDestructor).creationCode, abi.encode(address(this))),
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 1
depth: 1
})
);
assertEq(
Expand All @@ -1087,7 +1087,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 2
depth: 2
})
);
assertEq(
Expand All @@ -1105,7 +1105,7 @@ contract RecordAccountAccessesTest is DSTest {
data: abi.encodePacked(type(SelfDestructor).creationCode, abi.encode(address(bytes20("doesn't exist yet")))),
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 3
depth: 3
})
);
assertEq(
Expand All @@ -1123,7 +1123,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: false,
storageAccesses: new Vm.StorageAccess[](0),
depth: 4
depth: 4
})
);
}
Expand Down Expand Up @@ -1219,7 +1219,7 @@ contract RecordAccountAccessesTest is DSTest {
data: "",
reverted: expected.reverted,
storageAccesses: new Vm.StorageAccess[](0),
depth: 0
depth: 0
}),
false
);
Expand Down

0 comments on commit 88ce027

Please sign in to comment.