Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cheatcode variants that allow introduction of custom K variable names. #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nwatson22
Copy link
Member

@nwatson22 nwatson22 commented Aug 6, 2024

Connected to:

Adds signatures for new cheatcodes corresponding to symbolicStorage and all the fresh cheatcodes with an additional string calldata parameter.

The use for this is to allow customized K variable names for the symbolic values in the configuration for ease of interpretation, so you can see based on the name what each symbolic value represents.

@nwatson22 nwatson22 self-assigned this Aug 6, 2024
@@ -31,10 +33,18 @@ interface KontrolCheatsBase {
function setGas(uint256) external;
// Returns a symbolic unsigned integer
function freshUInt(uint8) external returns (uint256);
// Returns a symbolic unsigned integer with specified K variable name.
function freshUInt(uint8, string calldata) external returns (uint256);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add a similar variant for cheatcodes generating a fresh uint of a specific size, such as this one?

function freshUInt256() internal returns (uint256) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I added these now. However I found I had to make the string arguments for those memory as opposed to calldata. I was wondering, should these all be memory type, including the ones in IKontrolCheatsBase.sol?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants