mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-13 05:45:02 +00:00
d77354db66
* added runtime serialize and deserialize functions * removed getCurrentBlock from runtime functions * Added block and header stdlib interop functions * added transaction interop api * added asset interop api * bumped version * Added missing storage.Find storage API function * Fixed wrong example in the compiler README * updated the compiler README to be more accurate on compiler features
45 lines
971 B
Go
45 lines
971 B
Go
package runtime
|
|
|
|
// CheckWitness verifies if the invoker is the owner of the contract.
|
|
func CheckWitness(hash []byte) bool {
|
|
return true
|
|
}
|
|
|
|
// GetTime returns the timestamp of the most recent block.
|
|
func GetTime() int {
|
|
return 0
|
|
}
|
|
|
|
// Notify an event to the VM.
|
|
func Notify(arg interface{}) int {
|
|
return 0
|
|
}
|
|
|
|
// Log intructs the VM to log the given message.
|
|
func Log(message string) {}
|
|
|
|
// Application returns the application trigger type.
|
|
func Application() byte {
|
|
return 0x10
|
|
}
|
|
|
|
// Verification returns the verification trigger type.
|
|
func Verification() byte {
|
|
return 0x00
|
|
}
|
|
|
|
// GetTrigger return the current trigger type. The return in this function
|
|
// doesn't really mather, this is just an interop placeholder.
|
|
func GetTrigger() interface{} {
|
|
return 0
|
|
}
|
|
|
|
// Serialize serializes and item into a bytearray.
|
|
func Serialize(item interface{}) []byte {
|
|
return nil
|
|
}
|
|
|
|
// Deserializes an item from a bytearray.
|
|
func Deserialize(b []byte) interface{} {
|
|
return nil
|
|
}
|