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

Extend accepted parameters #3583

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Extend accepted parameters #3583

merged 2 commits into from
Sep 12, 2024

Conversation

roman-khimov
Copy link
Member

Problem

Contracts with methods(some []string) generate RPC bindings with []string parameters. But these bindings are unusable by default because we can't convert []string to parameters.

Solution

Extend accepted type list.

It's all the same in its essence.

Signed-off-by: Roman Khimov <[email protected]>
@roman-khimov roman-khimov added compiler Go smart contract compiler rpc RPC server and client enhancement Improving existing functionality labels Sep 11, 2024
@roman-khimov roman-khimov added this to the v0.106.4 milestone Sep 11, 2024
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.86%. Comparing base (d47fe39) to head (8469f97).
Report is 25 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3583      +/-   ##
==========================================
+ Coverage   85.85%   85.86%   +0.01%     
==========================================
  Files         330      330              
  Lines       38537    38567      +30     
==========================================
+ Hits        33085    33116      +31     
+ Misses       3904     3902       -2     
- Partials     1548     1549       +1     

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

It's _very_ annoying to not be able to use []string types properly:
    test invocation failed: unsupported parameter []string

But the same thing can happen to any other slice, so accept slices of every
basic type we accept above. Reorder tests to match implementation switch as
well.

Signed-off-by: Roman Khimov <[email protected]>
@roman-khimov roman-khimov merged commit 80dd635 into master Sep 12, 2024
20 checks passed
@roman-khimov roman-khimov deleted the extend-accepted-parameters branch September 12, 2024 05:57
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