Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpcbindings: produce ToStackItem companion method #3794

Merged
merged 2 commits into from
Jan 24, 2025
Merged

Conversation

roman-khimov
Copy link
Member

We need it for structs to be usable as function parameters, otherwise they're not implementing stackitam.Convertible and they fail at transaction script creation phase:

2025/01/22 20:31:26 bootstrap error: could not invoke method (addNode): test invocation failed: unsupported operation: *netmap.NetmapNode2 type

Related to nspcc-dev/neofs-node#3088.

@roman-khimov roman-khimov added compiler Go smart contract compiler rpc RPC server and client enhancement Improving existing functionality labels Jan 23, 2025
@roman-khimov roman-khimov added this to the v0.108.0 milestone Jan 23, 2025
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 24 lines in your changes missing coverage. Please review.

Project coverage is 83.06%. Comparing base (673b26f) to head (00e22b9).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/smartcontract/rpcbinding/binding.go 76.54% 19 Missing ⚠️
pkg/vm/stackitem/item.go 87.17% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3794      +/-   ##
==========================================
- Coverage   83.14%   83.06%   -0.09%     
==========================================
  Files         335      335              
  Lines       46903    46988      +85     
==========================================
+ Hits        38999    39031      +32     
- Misses       6311     6367      +56     
+ Partials     1593     1590       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@roman-khimov roman-khimov force-pushed the tostackitem branch 2 times, most recently from 10a71cd to 2f02b3e Compare January 24, 2025 07:01
pkg/vm/stackitem/item.go Outdated Show resolved Hide resolved
pkg/smartcontract/rpcbinding/binding.go Show resolved Hide resolved
pkg/smartcontract/rpcbinding/binding.go Show resolved Hide resolved
pkg/smartcontract/rpcbinding/binding.go Show resolved Hide resolved
Sometimes we may need something that doesn't panic.

Signed-off-by: Roman Khimov <[email protected]>
We need it for structs to be usable as function parameters, otherwise
they're not implementing stackitam.Convertible and they fail at transaction
script creation phase:

    2025/01/22 20:31:26 bootstrap error: could not invoke method (addNode): test invocation failed: unsupported operation: *netmap.NetmapNode2 type

Related to nspcc-dev/neofs-node#3088.

Signed-off-by: Roman Khimov <[email protected]>
@roman-khimov roman-khimov merged commit 22c5cf3 into master Jan 24, 2025
32 of 34 checks passed
@roman-khimov roman-khimov deleted the tostackitem branch January 24, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Go smart contract compiler enhancement Improving existing functionality rpc RPC server and client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants