-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added priv_call functionality to generated contract APIs #236
Added priv_call functionality to generated contract APIs #236
Conversation
niklas-emmelius-mittelstand-ai
commented
Sep 2, 2023
- Retain PrivacyGroupID together with other private transaction fields
- Switch to priv_call when PrivacyGroupID is passed as query option
- No PrivacyGroupID generation from PrivateFrom and PrivateFor
- Retain PrivacyGroupID together with other private transaction fields - Switch to priv_call when PrivacyGroupID is passed as query option - No PrivacyGroupID generation from PrivateFrom and PrivateFor Signed-off-by: Niklas Emmelius <[email protected]>
9c50163
to
4e6bc28
Compare
Codecov Report
@@ Coverage Diff @@
## main #236 +/- ##
==========================================
- Coverage 97.26% 97.18% -0.08%
==========================================
Files 59 59
Lines 7521 7529 +8
==========================================
+ Hits 7315 7317 +2
- Misses 163 167 +4
- Partials 43 45 +2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @niklas-emmelius-mittelstand-ai for contributing this! I'm happy to merge it. Could you please add a unit test that covers the new code? As is, these changes reduce code coverage and we try to make sure it always goes up. Thanks!
- Test calls function callAndProcessReply - A privacyGroupId is passed in transaction - Captured rpc method should equal priv_call - Captured rpc args[0] should equal privacyGroupId Signed-off-by: Niklas Emmelius <[email protected]>
Hi, @nguyer I added a test for the changes. Hopefully coverage should now be unchanged. Let me know if there is anything else to do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am really sorry this one fell off my radar and I didn't see it needed a re-review until now.
@@ -23,6 +23,7 @@ import ( | |||
"reflect" | |||
"testing" | |||
|
|||
"github.com/ethereum/go-ethereum/common/hexutil" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the licensing of the github.com/ethereum/go-ethereum
we cannot depend on it in any code in this repo.
assert.Equal(t, "HvuYiHoyL31rZ5OYRzSYMGGRV+V8KS4LMuHRfmfDWzg=", rpc.capturedArgs[0]) | ||
assert.Equal(t, &SendTXArgs{ | ||
From: "0x0000000000000000000000000000000000000000", | ||
Data: &hexutil.Bytes{90, 238, 148, 49}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should be able to change this to ðbinding.HexBytes
and have it work, which will remove the need to pull in github.com/ethereum/go-ethereum
Closing this PR due to inactivity. Please feel free to re-open if this work is still ongoing. |