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: Add Cheatcodes::AddAccount #980

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jbargu
Copy link

@jbargu jbargu commented May 31, 2024

Give an overview of the tasks completed
Arbiter currently assumes all accounts are initialized before the execution. However sometimes the user cannot anticipate all the involved accounts. With the Cheatcodes::AddAccount cheat code, the user can inject a new account mid execution and then update the balance with Cheatcodes::Deal cheat code.

The PR is based on top of #977.

REMINDER! Please check that you have done the following prior to submitting this PR:

  • Checked that the relevant version(s) have been incremented if necessary.
  • Ran both and made any changes necessary for:
    • cargo +nightly fmt --all
    • cargo clippy --all

@Alexangelj
Copy link
Contributor

Reviewing next week

@Alexangelj
Copy link
Contributor

Overall like the changes - just need to make sure everything merges in clean

@jbargu
Copy link
Author

jbargu commented Jun 3, 2024

At first I wanted to expose the whole Instruction struct and add Cheatcodes(Instruction) but then the struct is cyclic.

Maybe a more sound way would be to have an apply_instruction(Instruction) function or modify apply_cheatcode(Cheatcodes) to apply_cheatcode(Instruction) however this would be a breaking change.

@Alexangelj
Copy link
Contributor

Actually - maybe we can just keep the existing apply_cheatcode and expose a new method apply_instruction(Instruction), @kinrezC wdyt?

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