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
While upgrading I ran into a lot of problems using prior APIs because a lot of APIs no longer expect individual pieces of data but rather receive the "wrapping" CTX type.
To increase reusability, I believe that - where possible - APIs should use the low-level types, rather than the Context generic type. E.g.
we can call it when we have a context (validate_initial_tx_gas(context.cfg(), context.tx()) while also being able to call it when we just have a transaction and config type.
For convenience, you can provide helper methods that receive the context and internally call the low-level API that's more reusable.
The text was updated successfully, but these errors were encountered:
While upgrading I ran into a lot of problems using prior APIs because a lot of APIs no longer expect individual pieces of data but rather receive the "wrapping"
CTX
type.To increase reusability, I believe that - where possible - APIs should use the low-level types, rather than the
Context
generic type. E.g.limits the reusability for locations where you don't have a context. By changing to:
we can call it when we have a context (
validate_initial_tx_gas(context.cfg(), context.tx()
) while also being able to call it when we just have a transaction and config type.For convenience, you can provide helper methods that receive the context and internally call the low-level API that's more reusable.
The text was updated successfully, but these errors were encountered: