Skip to content

Commit

Permalink
Add view modifier to envOr
Browse files Browse the repository at this point in the history
  • Loading branch information
anikaraghu committed Jan 10, 2024
1 parent 68c3663 commit 4ff94d1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions crates/cheatcodes/spec/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,86 +895,86 @@ interface Vm {
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, bool defaultValue) external returns (bool value);
function envOr(string calldata name, bool defaultValue) external view returns (bool value);
/// Gets the environment variable `name` and parses it as `uint256`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value);
function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value);
/// Gets the environment variable `name` and parses it as `int256`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, int256 defaultValue) external returns (int256 value);
function envOr(string calldata name, int256 defaultValue) external view returns (int256 value);
/// Gets the environment variable `name` and parses it as `address`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, address defaultValue) external returns (address value);
function envOr(string calldata name, address defaultValue) external view returns (address value);
/// Gets the environment variable `name` and parses it as `bytes32`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value);
function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value);
/// Gets the environment variable `name` and parses it as `string`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata defaultValue) external returns (string memory value);
function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value);
/// Gets the environment variable `name` and parses it as `bytes`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value);
function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value);

/// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)
external
external view
returns (bool[] memory value);
/// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)
external
external view
returns (uint256[] memory value);
/// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)
external
external view
returns (int256[] memory value);
/// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)
external
external view
returns (address[] memory value);
/// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)
external
external view
returns (bytes32[] memory value);
/// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)
external
external view
returns (string[] memory value);
/// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
#[cheatcode(group = Environment)]
function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)
external
external view
returns (bytes[] memory value);

// ======== Scripts ========
Expand Down

0 comments on commit 4ff94d1

Please sign in to comment.