Support Deprecated marks in RPC bindings #1570

Open
opened 2025-12-28 17:16:52 +00:00 by sami · 1 comment
Owner

Originally created by @cthulhu-rider on GitHub (Nov 6, 2025).

when developing a contract, sometimes there is a need to deprecate a method. This is done for corresponding Go func according to https://go.dev/wiki/Deprecated

users of the contract can call the method through RPC wrapper

for example, in NeoFS we have https://pkg.go.dev/github.com/nspcc-dev/neofs-contract/contracts/container#GetContainerSize which is deprecated. But https://pkg.go.dev/github.com/nspcc-dev/neofs-contract/rpc/container#ContractReader.GetContainerSize is not deprecated in the Go way

Describe the solution you'd like

add deprecation mark to the generated method as well

as an option, copy Deprecated: XXX paragraph or even the entire method's doc comment

Describe alternatives you've considered

manual modifications in generated code. This is a more annoying method, but still it works

Originally created by @cthulhu-rider on GitHub (Nov 6, 2025). ## Is your feature request related to a problem? Please describe. when developing a contract, sometimes there is a need to deprecate a method. This is done for corresponding Go func according to https://go.dev/wiki/Deprecated users of the contract can call the method through RPC wrapper for example, in NeoFS we have https://pkg.go.dev/github.com/nspcc-dev/neofs-contract/contracts/container#GetContainerSize which is deprecated. But https://pkg.go.dev/github.com/nspcc-dev/neofs-contract/rpc/container#ContractReader.GetContainerSize is not deprecated in the Go way ## Describe the solution you'd like add deprecation mark to the generated method as well as an option, copy `Deprecated: XXX` paragraph or even the entire method's doc comment ## Describe alternatives you've considered manual modifications in generated code. This is a more annoying method, but still it works
Author
Owner

@roman-khimov commented on GitHub (Nov 6, 2025):

It's impossible currently and technically it'd require NEP-25 extension.

@roman-khimov commented on GitHub (Nov 6, 2025): It's impossible currently and technically it'd require NEP-25 extension.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1570
No description provided.