You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider abi.nr where we store MAX_ARGS. If I want to change this, I need to manually find all places where this is used and update there too since I can't read the MAX ARGS slot like in entrypoint.nr - notice how because we can't do math or refer other storage slots, we have to manually update the counts everywhere.
When updating MAX_ARGS, I actually didn't know where else it had to be updated (because relevant comments weren't there) so everything broke temporarily (ty @sirasistant for your help btw!)
Happy Case
Instead of
// MAX_ARGS * (ACCOUNT_MAX_PUBLIC_CALLS + ACCOUNT_MAX_PRIVATE_CALLS)
global ACCOUNT_FLATTENED_ARGS_SIZE: comptime Field = 32;
have:
global ACCOUNT_FLATTENED_ARGS_SIZE: comptime Field = abi::MAX_ARGS * (....)
this would also prevent the number of vars that need to be passed in!
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered:
rahul-kothari
changed the title
Have storage slot assinged for fixed values
account abstraction using its own "custom" constants instead of using shared constants...
Jun 21, 2023
Problem
Consider
abi.nr
where we storeMAX_ARGS
. If I want to change this, I need to manually find all places where this is used and update there too since I can't read the MAX ARGS slot like in entrypoint.nr - notice how because we can't do math or refer other storage slots, we have to manually update the counts everywhere.When updating MAX_ARGS, I actually didn't know where else it had to be updated (because relevant comments weren't there) so everything broke temporarily (ty @sirasistant for your help btw!)
Happy Case
Instead of
have:
this would also prevent the number of vars that need to be passed in!
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: