Skip to content

Commit

Permalink
Update changelog and docs with prank cheatcode
Browse files Browse the repository at this point in the history
  • Loading branch information
arcz committed Jan 9, 2023
1 parent 08bf7bf commit 560ee43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- New cheatcode `prank(address)` that sets `msg.sender` to the specified address for the next call.

## [0.50.2] - 2023-01-06

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions doc/src/controlling-the-unit-testing-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ These can be accessed by calling into a contract (typically called `Hevm`) at ad
Executes the arguments as a command in the system shell and returns stdout. Expects abi encoded values to be returned from the shell or an error will be thrown. Note that this
cheatcode means test authors can execute arbitrary code on user machines as part of a call to `dapp test`, for this reason all calls to `ffi` will fail unless the `--ffi` flag is passed.

- `function prank(address sender) public`
Sets `msg.sender` to the specified `sender` for the next call.

## Environment Variables

These environment variables can be used to control block parameters:
Expand Down

0 comments on commit 560ee43

Please sign in to comment.