@evmcrispr/module-assertions
v0.11.0
Published
On-chain assertions backed by the assertions.eth contract: verify view return values and chain state atomically. Requires `load assertions`.
Readme
assertions module
On-chain assertions backed by the assertions.eth contract: verify view return values and chain state atomically. Requires load assertions.
load assertionsConfiguration variables
Config variables are set with set (fully qualified, including the module prefix) and are only readable by their own module and the user script.
| Variable | Type | Default | Description |
|----------|------|---------|-------------|
| $assertions:address | address | — | Override the resolved assertions contract address (forks / testing). |
Commands
| Command | Description | |---------|-------------| | assertions:assert | Assert that a contract view return satisfies a comparison, on-chain. | | assertions:assert-balance | Assert the native balance of an account, on-chain. | | assertions:assert-block-number | Assert the current block number, on-chain. | | assertions:assert-chainid | Assert the chain ID equals an expected value, on-chain. | | assertions:assert-code | Assert an address has deployed code, on-chain. | | assertions:assert-codehash | Assert an address has a specific code hash, on-chain. | | assertions:assert-no-code | Assert an address has no deployed code, on-chain. | | assertions:assert-timestamp | Assert the current block timestamp, on-chain. |
Helpers
| Helper | Returns | Description |
|--------|---------|-------------|
| @assertions:codehash | bytes32 | Read the keccak256 code hash of an address. |
