-
Notifications
You must be signed in to change notification settings - Fork 81
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
Move code generation from rpcclient to smartcontract #2610
Conversation
RPC client shouldn't build scripts and this function can be useful as a reusable building block.
Move the last remaining script-related things out of the rpcclient.
852f619
to
1fa3a00
Compare
Codecov Report
@@ Coverage Diff @@
## master #2610 +/- ##
==========================================
+ Coverage 84.52% 84.59% +0.07%
==========================================
Files 297 299 +2
Lines 37865 37882 +17
==========================================
+ Hits 32005 32048 +43
+ Misses 4454 4424 -30
- Partials 1406 1410 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. |
cli/wallet/validator.go
Outdated
res, err := c.SignAndPushInvocationTx(w.Bytes(), acc, sysGas, gas, []rpcclient.SignerAccount{{ | ||
script, err := smartcontract.CreateCallWithAssertScript(neoContractHash, method, acc.PrivateKey().PublicKey().Bytes()) | ||
if err != nil { | ||
return err |
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.
cli.NewExitError
?
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.
Yeah, I've noticed this also, but for some reason thought that it's an internal function the result of which is wrapped outside if needed. But that's not the case, so NewExitError
is appropriate here. Fixed.
It wasn't possible way back when this test was written (CreateOracleResponseScript was a method), now we can simplify things.
f779241
to
c8ff489
Compare
Moving on with #2597.