Documentation ¶
Index ¶
- Constants
- func ArrayFromStackParameter(param sc.Parameter) ([]sc.Parameter, error)
- func BoolFromStackParameter(param sc.Parameter) (bool, error)
- func BytesFromStackParameter(param sc.Parameter) ([]byte, error)
- func IntFromStackParameter(param sc.Parameter) (int64, error)
- func ReadStorage(c *Client, contract util.Uint160, key []byte) ([]byte, error)
- func StringFromStackParameter(param sc.Parameter) (string, error)
- type Client
- type Params
Constants ¶
const ErrMissingFee = internal.Error("invocation fee must be positive")
ErrMissingFee is returned by functions that expect a positive invocation fee, but received non-positive.
const ErrNilClient = internal.Error("go client is nil")
ErrNilClient is returned by functions that expect a non-nil Client, but received nil.
const HaltState = "HALT"
HaltState returned if TestInvoke function processed without panic.
Variables ¶
This section is empty.
Functions ¶
func ArrayFromStackParameter ¶
ArrayFromStackParameter returns the slice contract parameters from passed parameter.
If passed parameter carries boolean false value, (nil, nil) returns.
func BoolFromStackParameter ¶
BoolFromStackParameter receives boolean value from the value of a smart contract parameter.
func BytesFromStackParameter ¶
BytesFromStackParameter receives binary value from the value of a smart contract parameter.
func IntFromStackParameter ¶
IntFromStackParameter receives numerical value from the value of a smart contract parameter.
func ReadStorage ¶
ReadStorage of the contract directly. Use it for debug, try to obtain smart-contract data from contract method with TestInvoke function.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a neo-go wrapper that provides smart-contract invocation interface.
func (*Client) Invoke ¶
func (c *Client) Invoke(contract util.Uint160, fee util.Fixed8, method string, args ...interface{}) error
Invoke invokes contract method by sending transaction into blockchain. Supported args types: int64, string, util.Uint160, []byte and bool.
If passed fee is non-positive, ErrMissingFee returns.