forked from TrueCloudLab/neoneo-go
b6b8542caf
* refactored structs so the scope is not needed anymore + fix passing struct in func arguments. * implemented byte arrays and added runtime tests * Added sc examples in compiler README + added quick nested if test. * Updated README * Changed import paths to interop layer
42 lines
953 B
Go
42 lines
953 B
Go
package runtime
|
|
|
|
import "github.com/CityOfZion/neo-go/pkg/vm/smartcontract/types"
|
|
|
|
// CheckWitness verifies if the invoker is the owner of the contract.
|
|
func CheckWitness(hash []byte) bool {
|
|
return true
|
|
}
|
|
|
|
// GetCurrentBlock returns the current block.
|
|
func GetCurrentBlock() types.Block { return types.Block{} }
|
|
|
|
// 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) int {
|
|
return 0
|
|
}
|
|
|
|
// 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
|
|
}
|