mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-30 15:01:35 +00:00
a1e3655560
neo-storm has developed more wrappers for syscall APIs, so they can and should be used as a drop-in replacement for pkg/vm/api. Moving it out of vm, as it's not exactly related to the VM itself.
48 lines
1.1 KiB
Go
48 lines
1.1 KiB
Go
package runtime
|
|
|
|
// Package runtime provides function signatures that can be used inside
|
|
// smart contracts that are written in the neo-go framework.
|
|
|
|
// CheckWitness verifies if the given hash is the invoker of the contract.
|
|
func CheckWitness(hash []byte) bool {
|
|
return true
|
|
}
|
|
|
|
// Log instucts the VM to log the given message.
|
|
func Log(message string) {}
|
|
|
|
// Notify an event to the VM.
|
|
func Notify(arg ...interface{}) int {
|
|
return 0
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
// Application returns the Application trigger type
|
|
func Application() byte {
|
|
return 0x10
|
|
}
|
|
|
|
// Verification returns the Verification trigger type
|
|
func Verification() byte {
|
|
return 0x00
|
|
}
|
|
|
|
// Serialize serializes and item into a bytearray.
|
|
func Serialize(item interface{}) []byte {
|
|
return nil
|
|
}
|
|
|
|
// Deserialize an item from a bytearray.
|
|
func Deserialize(b []byte) interface{} {
|
|
return nil
|
|
}
|