Implement address parsing from TXT record #96

Open
opened 2024-06-18 07:03:39 +00:00 by fyrchik · 0 comments

We have multiple places where we parse NNS records:

It would be beneficial to have this wrapper in a single place (as well as the opposite converter).
We add this to the rpcclient/ package, together with the autogenerated code, but in a different file.

func ParseHash(string) (util.Uint160, error)
func ResolveHash(ContractReader) (util.Uint160, error)

Also, see #91.

We have multiple places where we parse NNS records: - https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/1a5886e776de79fc6598838242e4dc7ff21e7bea/ns/nns.go#L151 - https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/morph/client/nns.go#L161 - https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/cmd/frostfs-adm/internal/modules/morph/helper/initialize.go#L123 It would be beneficial to have this wrapper in a single place (as well as the opposite converter). We add this to the `rpcclient/` package, together with the autogenerated code, but in a different file. ``` func ParseHash(string) (util.Uint160, error) func ResolveHash(ContractReader) (util.Uint160, error) ``` Also, see https://git.frostfs.info/TrueCloudLab/frostfs-contract/issues/91.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
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-contract#96
There is no content yet.