2018-08-20 08:59:35 +00:00
|
|
|
package runtime
|
|
|
|
|
2018-08-21 10:57:48 +00:00
|
|
|
// Package runtime provides function signatures that can be used inside
|
2019-08-15 16:41:51 +00:00
|
|
|
// smart contracts that are written in the neo-go framework.
|
2018-08-21 10:57:48 +00:00
|
|
|
|
|
|
|
// CheckWitness verifies if the given hash is the invoker of the contract.
|
2018-08-20 08:59:35 +00:00
|
|
|
func CheckWitness(hash []byte) bool {
|
|
|
|
return true
|
|
|
|
}
|
2018-08-21 08:55:03 +00:00
|
|
|
|
2018-08-21 10:57:48 +00:00
|
|
|
// Log instucts the VM to log the given message.
|
|
|
|
func Log(message string) {}
|
|
|
|
|
|
|
|
// Notify an event to the VM.
|
2018-08-22 16:49:30 +00:00
|
|
|
func Notify(arg ...interface{}) int {
|
2018-08-21 08:55:03 +00:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-08-21 10:57:48 +00:00
|
|
|
// GetTime returns the timestamp of the most recent block.
|
|
|
|
func GetTime() int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetTrigger returns the smart contract invoke trigger which can be either
|
|
|
|
// verification or application.
|
|
|
|
func GetTrigger() byte {
|
|
|
|
return 0x00
|
|
|
|
}
|
2018-08-21 08:55:03 +00:00
|
|
|
|
|
|
|
// Application returns the Application trigger type
|
|
|
|
func Application() byte {
|
|
|
|
return 0x10
|
|
|
|
}
|
|
|
|
|
|
|
|
// Verification returns the Verification trigger type
|
|
|
|
func Verification() byte {
|
|
|
|
return 0x00
|
|
|
|
}
|
|
|
|
|
2018-08-21 10:57:48 +00:00
|
|
|
// Serialize serializes and item into a bytearray.
|
|
|
|
func Serialize(item interface{}) []byte {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-08-22 16:49:30 +00:00
|
|
|
// Deserialize an item from a bytearray.
|
2018-08-21 10:57:48 +00:00
|
|
|
func Deserialize(b []byte) interface{} {
|
|
|
|
return nil
|
2018-08-21 08:55:03 +00:00
|
|
|
}
|