rpc, cli: encode script in base64 for Invoke*

This commit is contained in:
Anna Shaleva 2020-10-14 16:46:06 +03:00
parent d58c50fb77
commit c50f3db6ad
6 changed files with 38 additions and 33 deletions

View file

@ -381,7 +381,7 @@ func (c *Client) GetVersion() (*result.Version, error) {
// InvokeScript returns the result of the given script after running it true the VM.
// NOTE: This is a test invoke and will not affect the blockchain.
func (c *Client) InvokeScript(script []byte, signers []transaction.Signer) (*result.Invoke, error) {
var p = request.NewRawParams(hex.EncodeToString(script))
var p = request.NewRawParams(script)
return c.invokeSomething("invokescript", p, signers)
}