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
I was wondering how the evolution of RPC arguments can be done, as I could not find any documentation on it. Specifically, can method arguments be changed to a struct (or the reverse), while ensuring backwards compatibility?
Yes. A parenthesized parameter or result list is just an anonymous struct -- is encoded exactly the same as a struct containing the each parameter as a field, numbered in the order they appear in the list. You can swap this out for an actual struct type as shown in your example.
I guess the docs don't actually cover the syntax to specify a single struct type as the params or results. I'll leave this issue open for documenting that, and the compatibility properties of it.
I was wondering how the evolution of RPC arguments can be done, as I could not find any documentation on it. Specifically, can method arguments be changed to a struct (or the reverse), while ensuring backwards compatibility?
E.g. changing
to
The text was updated successfully, but these errors were encountered: