Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Caller common.Uint168 Code []byte Input []byte CodeHash common.Uint168 CacheCodeTable interfaces.IScriptTable Time *big.Int BlockNumber *big.Int SignableData SignableData StateMachine ns.StateMachine DBCache database.Batch Gas common.Fixed64 ReturnType types.ContractParameterType ParameterTypes []types.ContractParameterType Trigger avm.TriggerType }
type SignableData ¶
type SignableData interface { interfaces.IDataContainer //TODO: add SerializeUnsigned SerializeUnsigned(io.Writer) error }
SignableData describe the data need be signed.
type SmartContract ¶
type SmartContract struct { Engine Engine Code []byte Input []byte ParameterTypes []types.ContractParameterType Caller common.Uint168 CodeHash common.Uint168 ReturnType types.ContractParameterType }
func NewSmartContract ¶
func NewSmartContract(context *Context) (*SmartContract, error)
func (*SmartContract) DeployContract ¶
func (sc *SmartContract) DeployContract(payload *types.PayloadDeploy) ([]byte, error)
func (*SmartContract) InvokeContract ¶
func (sc *SmartContract) InvokeContract() (interface{}, error)
func (*SmartContract) InvokeParamsTransform ¶
func (sc *SmartContract) InvokeParamsTransform() ([]byte, error)
func (*SmartContract) InvokeResult ¶
func (sc *SmartContract) InvokeResult() (interface{}, error)
Click to show internal directories.
Click to hide internal directories.