Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/cheatcodes/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ impl Cheatcode for getChainIdCall {
impl Cheatcode for chainIdCall {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { newChainId } = self;
ensure!(*newChainId <= U256::from(u64::MAX), "chain ID must be less than 2^64 - 1");
ensure!(*newChainId <= U256::from(u64::MAX), "chain ID must be less than 2^64");
ccx.ecx.cfg.chain_id = newChainId.to();
Ok(Default::default())
}
Expand Down Expand Up @@ -465,7 +465,7 @@ impl Cheatcode for difficultyCall {
impl Cheatcode for feeCall {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { newBasefee } = self;
ensure!(*newBasefee <= U256::from(u64::MAX), "base fee must be less than 2^64 - 1");
ensure!(*newBasefee <= U256::from(u64::MAX), "base fee must be less than 2^64");
ccx.ecx.block.basefee = newBasefee.saturating_to();
Ok(Default::default())
}
Expand Down Expand Up @@ -542,7 +542,7 @@ impl Cheatcode for getBlockNumberCall {
impl Cheatcode for txGasPriceCall {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { newGasPrice } = self;
ensure!(*newGasPrice <= U256::from(u64::MAX), "gas price must be less than 2^64 - 1");
ensure!(*newGasPrice <= U256::from(u64::MAX), "gas price must be less than 2^64");
ccx.ecx.tx.gas_price = newGasPrice.saturating_to();
Ok(Default::default())
}
Expand Down Expand Up @@ -946,7 +946,7 @@ impl Cheatcode for broadcastRawTransactionCall {
impl Cheatcode for setBlockhashCall {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { blockNumber, blockHash } = *self;
ensure!(blockNumber <= U256::from(u64::MAX), "blockNumber must be less than 2^64 - 1");
ensure!(blockNumber <= U256::from(u64::MAX), "blockNumber must be less than 2^64");
ensure!(
blockNumber <= U256::from(ccx.ecx.block.number),
"block number must be less than or equal to the current block number"
Expand Down
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/evm/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl Cheatcode for eth_getLogsCall {
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")
bail!("blocks in block range must be less than 2^64")
};

if topics.len() > 4 {
Expand Down
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Cheatcode for getLabelCall {
impl Cheatcode for computeCreateAddressCall {
fn apply(&self, _state: &mut Cheatcodes) -> Result {
let Self { nonce, deployer } = self;
ensure!(*nonce <= U256::from(u64::MAX), "nonce must be less than 2^64 - 1");
ensure!(*nonce <= U256::from(u64::MAX), "nonce must be less than 2^64");
Ok(deployer.create(nonce.to()).abi_encode())
}
}
Expand Down
Loading