Use bindings config to generate RPC wrappers #1571

Closed
opened 2024-12-19 06:58:43 +00:00 by fyrchik · 3 comments
Owner

neo-go compiler can emit bindings config file which is used by generator to provide custom named types.
As an example, we have Subject* and Group* types in the frostfsid contract.
There is a quirk in neo-go which prevented me from making a PR https://github.com/nspcc-dev/neo-go/issues/3768

In this task:

  1. Introduce Subject*, Group* and Namespace* structs in the rpcclient/frostfsid package. This structs should be autogenerated.
  2. tests should reuse these structs instead of custom ones.
  3. frostfs/client package should reuse the parsing code where possible (some types could be made synonyms, others will persist, because of uint64/big.Int mismatch).
neo-go compiler can emit bindings config file which is used by generator to provide custom named types. As an example, we have `Subject*` and `Group*` types in the frostfsid contract. There is a quirk in neo-go which prevented me from making a PR https://github.com/nspcc-dev/neo-go/issues/3768 In this task: 1. Introduce `Subject*`, `Group*` and `Namespace*` structs in the rpcclient/frostfsid package. This structs should be autogenerated. 2. `tests` should reuse these structs instead of custom ones. 3. `frostfs/client` package should reuse the parsing code where possible (some types could be made synonyms, others will persist, because of uint64/big.Int mismatch).
fyrchik added the
triage
label 2024-12-19 06:58:43 +00:00
fyrchik added
enhancement
discussion
blocked
and removed
triage
labels 2024-12-19 07:00:38 +00:00
Author
Owner

Let's also discuss what other contracts can benefit from custom return types.

Let's also discuss what other contracts can benefit from custom return types.
Author
Owner

Closed, wrong repo

Closed, wrong repo
fyrchik added the
internal
label 2024-12-20 08:19:49 +00:00
Author
Owner

Closed, wrong repo

Closed, wrong repo
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: TrueCloudLab/frostfs-node#1571
No description provided.