mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2026-03-01 04:28:51 +00:00
Allow to have fixed-width integer types in the autogenerator #1459
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U3
U3
U4
blocked
bug
bug
cli
compiler
config
config
consensus
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
neotest
network
oracle
performance
question
rpc
security
smartcontract
task
task
task
test
vm
wallet
windows
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neo-go#1459
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fyfyrchik on GitHub (Dec 19, 2024).
Is your feature request related to a problem? Please describe.
Sometimes I want to use
uint32instead ofbig.Intin the auto-generated wrappers.Currently, I need to add another struct.
Describe the solution you'd like
pkg/rpcclient/unwraphas a beautiful unwrappernspcc-dev/neo-go@6d20772714/pkg/rpcclient/unwrap/unwrap.go (L98)Allow to use it from inside the autogenerator.
A possible value to use for a type in rpcbinding configuration is
Integer:int64. Another option isbase: Integer; Name: int64.We may also have other types (e.g. uint32), the details can be discussed. E.g. have
LimitedInt[T interface { ~int* }]andLimitedUint[T interface{ ~uint* }]inunwrapand reuse them.Describe alternatives you've considered
Provide custom type/unmarshaler defined outside the generated code. With it, we can have SDK types reused in the autogenerated code for contracts.
@roman-khimov commented on GitHub (Dec 19, 2024):
This will be possible with NEP-25 implementation, it has a notion of type width.