Overview of the cheatcodes made available for the Phylax Credible Layer
forkPreTx
forkPostTx
forkPreCall
getCallInputs(..)
can be used to get ids to fork to.
forkPostCall
getCallInputs(..)
can be used to get ids to fork to.
load
forge inspect <ContractName> storage-layout
is an easy way to get the storage layout of a contract.
This can be used to determine the storage slot of a specific variable to use in the cheatcode.getLogs
getAllCallInputs
getCallInputs
getStaticCallInputs
getDelegateCallInputs
getCallCodeInputs
getCallInputs
, getStaticCallInputs
, getDelegateCallInputs
, getCallCodeInputs
) eliminate double-counting issues by allowing you to target only the specific call type you need. Use these instead of getAllCallInputs()
when you want to avoid duplicate entries from proxy contracts.
For example, if you’re monitoring a proxy contract and only want the actual delegate calls (not the proxy calls), use getDelegateCallInputs()
instead of getAllCallInputs()
.
getAllCallInputs()
, you may still need to filter out proxy calls:
CallInputs
or trigger call-based assertions. However, using the this
keyword (e.g., this.functionName()
) creates an external call that will be traced and can trigger assertions.Example:getStateChanges
forge inspect <ContractName> storage-layout
is an easy way to get the storage layout of a contract.
This can be used to determine the storage slot of a specific variable to use in the cheatcode.getStateChangesUint
getStateChangesAddress
: Convert to address valuesgetStateChangesBool
: Convert to boolean valuesgetStateChangesBytes32
: Get raw bytes32 valuestriggers()
function.
forge inspect <ContractName> storage-layout
is an easy way to get the storage layout of a contract.
This can be used to determine the storage slot of a specific variable to use in the cheatcode.getAssertionAdopter
triggers()
function and the assertion functions.
It cannot be used in the constructor since assertion contracts have no state during deployment.
console.log
pcl test
. Useful for debugging assertion logic and understanding transaction flow.