-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add ContractArgs for building function args #1382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is reasonable. I'm not sure it's too useful outside of constructor args, but in general seems ok to have. It also sort of helps with discoverability, as we can advertise this in all the constructor examples.
The only concern is the wasm size - are we sure the args won't bloat the builds in case if they're not used (but the clients are)?
The tests I ran building for wasm before and after this change resulted in no size change to any of the test vectors. Even when used the new code should be entirely inlined and disappear because it's just data pushing. To reduce the chance we're ever wrong about that I just pushed marking the functions as I should add a test vector that deploys a contract, and uses it, and check that for the deploy case it's also a zero cost or near zero cost construct. I'll do that before marking this ready. |
@dmkozh This is ready for review in conjunction with: |
### What Fill gaps in ref conversions to Val. ### Why Needed for: - stellar/rs-soroban-sdk#1382
What
Add ContractArgs for building function args.
Usage
Diff of generated code for constructor test vector
Why
To provide a way to make specifying args as concrete.
Dependent on:
Close #1348
Note
This is still very much an experiment.