[#749] morph/client: reuse TestInvokePrm in InvokePrm

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-29 14:21:57 +03:00 committed by Alex Vanin
parent 9e2f7ac371
commit fa947b85a6

View file

@ -65,9 +65,7 @@ func (s StaticClient) Morph() *Client {
// InvokePrm groups parameters of the Invoke operation.
type InvokePrm struct {
// required parameters
method string
args []interface{}
TestInvokePrm
// optional parameters
InvokePrmOptional
@ -84,16 +82,6 @@ type InvokePrmOptional struct {
hash *util.Uint256
}
// SetMethod sets method of the contract to call.
func (i *InvokePrm) SetMethod(method string) {
i.method = method
}
// SetArgs sets arguments of the contact call.
func (i *InvokePrm) SetArgs(args ...interface{}) {
i.args = args
}
// SetHash sets optional hash of the transaction.
// If hash is set and notary is enabled, StaticClient
// uses it for notary nonce and `validUntilBlock`