Open samlaf opened 4 months ago
Hey @samlaf can I take up this issue?
Hey @samlaf can I take up this issue?
yes sir
Hey @samlaf , I see that it is still not resolved. Can I contribute to it? And do I need to change all the type alias to the actual datatypes?
Hey @samlaf , I see that it is still not resolved. Can I contribute to it? And do I need to change all the type alias to the actual datatypes?
There’s a PR open for it, I haven’t had time to review it though :/
We shouldn't have used type aliases in types (see for example OperatorId). See quote below.
Problem it creates is that when another pkg uses the sdk and calls a function which returns an Aliased type, vscode (and probably other editors?) show the returned type as the underneath type definition (instead of the type alias name).
So for eg getOperatorsAvsStateAtBlock will show
instead of its actual definition in the sdk as
Note the key type is Bytes32 instead of OperatorId, so it lost its semantics.
From https://yourbasic.org/golang/type-alias/ (and see the linked https://go.dev/talks/2016/refactor.article)