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

Simulate: run the simulation even if fees are too low, report the underage #5805

Open
jannotti opened this issue Oct 25, 2023 · 0 comments
Open

Comments

@jannotti
Copy link
Contributor

Some contracts might want to spec that they require the caller to pay fees for inner transactions, and the number of inner transactions might depend on chain state. So it would be useful to simulate the call, find out how much it would have cost, and then include that in a real call.

A reasonable work-around is to make the simulate call with an extra 1algo fee (really, 256*minFee would be sufficient) and then examine the simulation response to determine how many inners were actually called. Multiply by minfee, and you know how much you actually need to include.

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

No branches or pull requests

1 participant