-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into evalir/v1-expect-updates
- Loading branch information
Showing
25 changed files
with
593 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## `skip` | ||
|
||
## Signature | ||
|
||
```solidity | ||
function skip(bool skip) external; | ||
``` | ||
|
||
## Description | ||
|
||
Marks a test as skipped, conditionally. It must be called at the top of the test to ensure it is skipped without any execution. | ||
|
||
If `skip` is called with a false boolean, it will not skip the test. | ||
|
||
Tests marked as skipped will appear with a `[SKIPPED]` label on the test runner and on the summary, to easily identify skipped tests. | ||
|
||
### Examples | ||
|
||
```solidity | ||
function testSkip() public { | ||
cheats.skip(true); | ||
/// This revert will not be reached as this test will be skipped. | ||
revert("Should not reach this revert"); | ||
} | ||
function testNotSkip() public { | ||
cheats.skip(false); | ||
/// This revert will be reached as this test will not be skipped, and the test will fail. | ||
revert("Should reach this revert"); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## cast codesize | ||
|
||
### NAME | ||
|
||
cast-codesize - Get the runtime bytecode size of a contract. | ||
|
||
### SYNOPSIS | ||
|
||
``cast codesize`` [*options*] *address* | ||
|
||
### DESCRIPTION | ||
|
||
Get the runtime bytecode size of a contract. | ||
|
||
The contract (*address*) can be an ENS name or an address. | ||
|
||
### OPTIONS | ||
|
||
#### Query Options | ||
|
||
`-B` *block* | ||
`--block` *block* | ||
The block height you want to query at. | ||
|
||
Can be a block number, or any of the tags: `earliest`, `finalized`, `safe`, `latest` or `pending`. | ||
|
||
#### RPC Options | ||
|
||
{{#include ../common/rpc-url-option.md}} | ||
|
||
{{#include common-options.md}} | ||
|
||
### EXAMPLES | ||
|
||
1. Get the runtime bytecode size of the WETH contract. | ||
```sh | ||
cast codesize 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
[cast](./cast.md), [cast code](./cast-code.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
## cast logs | ||
|
||
### NAME | ||
|
||
cast logs - Get logs by signature or topic. | ||
|
||
### SYNOPSIS | ||
|
||
``cast logs`` [*options*] *sig_or_topic* [*topics_or_args...*] | ||
|
||
|
||
### DESCRIPTION | ||
|
||
Get logs by signature or topic. | ||
|
||
The (*sig_or_topic*) may either be the event signature or its hashed topic (located at topics[0]). | ||
|
||
If using a signature, remaining arguments must be in their ordinary form. If using a topic, the arguments must be as they themselves appear as topics. | ||
|
||
### OPTIONS | ||
|
||
### Query Options | ||
|
||
`--from-block` *from_block* | ||
The block height to start query at. | ||
|
||
Can also be the tags: `earlies`t, `finalized`, `safe`, `latest`, or `pending`. | ||
|
||
`--to-block` *to_block* | ||
The block height to stop query at. | ||
|
||
Can also be the tags: `earlies`t, `finalized`, `safe`, `latest`, or `pending`. | ||
|
||
`--address` *address* | ||
The contract address to filter on | ||
|
||
{{#include ../common/wallet-options.md}} | ||
|
||
{{#include ../common/rpc-options.md}} | ||
|
||
{{#include ../common/etherscan-options.md}} | ||
|
||
### EXAMPLES | ||
|
||
1. Get logs using a signature: | ||
```sh | ||
cast logs --from-block 15537393 --to-block latest 'Transfer (address indexed from, address indexed to, uint256 value)' 0x2e8ABfE042886E4938201101A63730D04F160A82 | ||
``` | ||
2. Get logs using a topic: | ||
```sh | ||
cast logs --from-block 15537393 --to-block latest 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef 0x0000000000000000000000002e8abfe042886e4938201101a63730d04f160a82 | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
[cast](./cast.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.