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

New context struct #1122

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

New context struct #1122

wants to merge 3 commits into from

Conversation

hardyjosh
Copy link
Contributor

Motivation

For #1100

Solution

Created a new Context struct that currently can optionally contain an Order. This could be extended in the future.

It then has fns to interpolate strings, looking for the vars and following the path. Currently supports order tokens (symbols, addresses, etc).

Added a context arg to the yaml parsing straits, then setup:

  • When a deployment is being parsed, the order will be parsed first then passed to the scenario parsing fn (so bindings can be interpolated
  • When a gui deployment is being parsed, the deployment's order will be used for interpolating field names and descriptions.

This won't work in practice yet, because we're still adding the new yaml handling to Gui and getting calldata's for Gui.

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

@hardyjosh hardyjosh requested a review from findolor January 5, 2025 20:19
@hardyjosh hardyjosh self-assigned this Jan 5, 2025
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