Skip to content

Commit 76d6084

Browse files
authored
fix(cheats): solc:0.6 compatible fork cheats (#11280)
1 parent fadbdcd commit 76d6084

File tree

3 files changed

+42
-42
lines changed

3 files changed

+42
-42
lines changed

crates/cheatcodes/assets/cheatcodes.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cheatcodes/spec/src/vm.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,72 +2218,72 @@ interface Vm {
22182218
/// Gets the value for the key `key` from the currently active fork and parses it as `bool`.
22192219
/// Reverts if the key was not found or the value could not be parsed.
22202220
#[cheatcode(group = Forking)]
2221-
function forkBool(string memory key) external view returns (bool);
2221+
function forkBool(string calldata key) external view returns (bool);
22222222

22232223
/// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `bool`.
22242224
/// Reverts if the key was not found or the value could not be parsed.
22252225
#[cheatcode(group = Forking)]
2226-
function forkChainBool(uint256 chain, string memory key) external view returns (bool);
2226+
function forkChainBool(uint256 chain, string calldata key) external view returns (bool);
22272227

22282228
/// Gets the value for the key `key` from the currently active fork and parses it as `int256`.
22292229
/// Reverts if the key was not found or the value could not be parsed.
22302230
#[cheatcode(group = Forking)]
2231-
function forkInt(string memory key) external view returns (int256);
2231+
function forkInt(string calldata key) external view returns (int256);
22322232

22332233
/// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `int256`.
22342234
/// Reverts if the key was not found or the value could not be parsed.
22352235
#[cheatcode(group = Forking)]
2236-
function forkChainInt(uint256 chain, string memory key) external view returns (int256);
2236+
function forkChainInt(uint256 chain, string calldata key) external view returns (int256);
22372237

22382238
/// Gets the value for the key `key` from the currently active fork and parses it as `uint256`.
22392239
/// Reverts if the key was not found or the value could not be parsed.
22402240
#[cheatcode(group = Forking)]
2241-
function forkUint(string memory key) external view returns (uint256);
2241+
function forkUint(string calldata key) external view returns (uint256);
22422242

22432243
/// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `uint256`.
22442244
/// Reverts if the key was not found or the value could not be parsed.
22452245
#[cheatcode(group = Forking)]
2246-
function forkChainUint(uint256 chain, string memory key) external view returns (uint256);
2246+
function forkChainUint(uint256 chain, string calldata key) external view returns (uint256);
22472247

22482248
/// Gets the value for the key `key` from the currently active fork and parses it as `address`.
22492249
/// Reverts if the key was not found or the value could not be parsed.
22502250
#[cheatcode(group = Forking)]
2251-
function forkAddress(string memory key) external view returns (address);
2251+
function forkAddress(string calldata key) external view returns (address);
22522252

22532253
/// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `address`.
22542254
/// Reverts if the key was not found or the value could not be parsed.
22552255
#[cheatcode(group = Forking)]
2256-
function forkChainAddress(uint256 chain, string memory key) external view returns (address);
2256+
function forkChainAddress(uint256 chain, string calldata key) external view returns (address);
22572257

22582258
/// Gets the value for the key `key` from the currently active fork and parses it as `bytes32`.
22592259
/// Reverts if the key was not found or the value could not be parsed.
22602260
#[cheatcode(group = Forking)]
2261-
function forkBytes32(string memory key) external view returns (bytes32);
2261+
function forkBytes32(string calldata key) external view returns (bytes32);
22622262

22632263
/// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `bytes32`.
22642264
/// Reverts if the key was not found or the value could not be parsed.
22652265
#[cheatcode(group = Forking)]
2266-
function forkChainBytes32(uint256 chain, string memory key) external view returns (bytes32);
2266+
function forkChainBytes32(uint256 chain, string calldata key) external view returns (bytes32);
22672267

22682268
/// Gets the value for the key `key` from the currently active fork and parses it as `string`.
22692269
/// Reverts if the key was not found or the value could not be parsed.
22702270
#[cheatcode(group = Forking)]
2271-
function forkString(string memory key) external view returns (string memory);
2271+
function forkString(string calldata key) external view returns (string memory);
22722272

22732273
/// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `string`.
22742274
/// Reverts if the key was not found or the value could not be parsed.
22752275
#[cheatcode(group = Forking)]
2276-
function forkChainString(uint256 chain, string memory key) external view returns (string memory);
2276+
function forkChainString(uint256 chain, string calldata key) external view returns (string memory);
22772277

22782278
/// Gets the value for the key `key` from the currently active fork and parses it as `bytes`.
22792279
/// Reverts if the key was not found or the value could not be parsed.
22802280
#[cheatcode(group = Forking)]
2281-
function forkBytes(string memory key) external view returns (bytes memory);
2281+
function forkBytes(string calldata key) external view returns (bytes memory);
22822282

22832283
/// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `bytes`.
22842284
/// Reverts if the key was not found or the value could not be parsed.
22852285
#[cheatcode(group = Forking)]
2286-
function forkChainBytes(uint256 chain, string memory key) external view returns (bytes memory);
2286+
function forkChainBytes(uint256 chain, string calldata key) external view returns (bytes memory);
22872287

22882288
// ======== Scripts ========
22892289
// -------- Broadcasting Transactions --------

testdata/cheats/Vm.sol

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)