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

feat: Simulate when txn is added for return values #7

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Conversation

Oighty
Copy link
Collaborator

@Oighty Oighty commented Nov 4, 2023

I refactored the simulation logic to allow for getting return values from scripts. This is potentially in various situations where you need an intermediate value for the next step in a batch, such as an address that is deployed.

Adding this required initializing the batch data prior to the end of the script and having the safe address available within the addToBatch function. Therefore, I added an isBatch(address) modifier that can be used on any script functions that will use batches to set this data up front. The examples had hard-coded safe addresses, but it can as easily be passed into the script as a parameter.

There are some breaking changes for scripts created with the old interface, so may be good to tag as a new version.

@ind-igo ind-igo merged commit a0170c3 into main Aug 20, 2024
@ind-igo ind-igo deleted the return-values branch August 20, 2024 11:48
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