Documentation ¶
Overview ¶
Package contract provides functions to work with contracts.
Index ¶
- Constants
- func Call(scriptHash interop.Hash160, method string, args ...interface{}) interface{}
- func CallEx(f CallFlag, scriptHash interop.Hash160, method string, args ...interface{}) interface{}
- func CreateStandardAccount(pub interop.PublicKey) []byte
- func GetCallFlags() int64
- func IsStandard(h interop.Hash160) bool
- type CallFlag
Constants ¶
const ( ReadStates CallFlag = 1 << iota WriteStates AllowCall AllowNotify States = ReadStates | WriteStates ReadOnly = ReadStates | AllowCall All = States | AllowCall | AllowNotify NoneFlag CallFlag = 0 )
Using `smartcontract` package from compiled contract requires moderate compiler refactoring, thus all flags are mirrored here.
Variables ¶
This section is empty.
Functions ¶
func Call ¶ added in v0.92.0
Call executes previously deployed blockchain contract with specified hash (20 bytes in BE form) using provided arguments. It returns whatever this contract returns. This function uses `System.Contract.Call` syscall.
func CallEx ¶ added in v0.92.0
CallEx executes previously deployed blockchain contract with specified hash (20 bytes in BE form) using provided arguments and call flags. It returns whatever this contract returns. This function uses `System.Contract.CallEx` syscall.
func CreateStandardAccount ¶ added in v0.90.0
CreateStandardAccount calculates script hash of a given public key. This function uses `System.Contract.CreateStandardAccount` syscall.
func GetCallFlags ¶ added in v0.91.0
func GetCallFlags() int64
GetCallFlags returns calling flags which execution context was created with. This function uses `System.Contract.GetCallFlags` syscall.
func IsStandard ¶ added in v0.90.0
IsStandard checks if contract with provided hash is a standard signature/multisig contract. This function uses `System.Contract.IsStandard` syscall.