[Version-unspecific] Deprecate Coins Add, Coins SafeSub, and Gas Add #check-lint-warning
[Version-unspecific]
This is intended to close #1887 (closed)
'Should Coins Add
and SafeSub
functions also have _deprecated
?'.
This includes (from !3423 (merged)) the renaming of Gas Add
to Adds_deprecated
to match the existing Coins Adds_deprecated
.
My main aims:
-
Like Uint
Add
andSafeSub
, don't modify the inputs (to avoid unintended upstream ramifications). -
Rather than having separate functions for adding a Coin or adding Coins,
use the...Coin
argument type so a single function allows either a 'coin' or 'coins...' or 'gas...' input. -
Use the same function names for Gas and Coins, and since Gas is Coins
(type Gas Coins
)
have the Gas functions directly call the Coins functions.
(Is there any more streamlined way of doing this? I suspect there is not, but would be happy to learn otherwise.)
The #check-lint-warning
is intended to be solely from the _deprecated
renames in versioned functions and managers.
The deprecation was done by first renaming the functions and then renaming the lines which called those functions
(confirming that make lint-ci
then didn't find missing called functions),
so I predict there is no logic change (such as if function replacement were done without renaming the old calls).