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

repeating setup steps #119

Open
zeroXbrock opened this issue Feb 6, 2025 · 0 comments
Open

repeating setup steps #119

zeroXbrock opened this issue Feb 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@zeroXbrock
Copy link
Member

Is your feature request related to a problem? Please describe.

Sometimes you need to call a setup step lots of times. The easy approach to this is to write a helper smart contract that loops your setup operations for you, so in contender, you can just call one function that does a lot of setup work. But if your target function uses too much gas, you're limited to some number of iterations before you run out of gas.

If we could just repeat setup steps and provide each step with a value from an iterator that provides new args (i.e. the index of the token to mint from the array of tokens you have), then this problem would be solved.

Describe the solution you'd like

Add a field to [[setup]] steps:

repeat = { param = "x", start_value = 0, increment ?= 1, decrement ?= 0, count = 5 }

that makes the step repeat count number of times, incrementing the argument to param (a function parameter name) by increment, or decrementing by decrement, with the value starting at start_value.

@zeroXbrock zeroXbrock added the enhancement New feature or request label Feb 6, 2025
@zeroXbrock zeroXbrock changed the title meta-params & repeats for setup steps repeating setup steps Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant