mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 03:06:16 +00:00
Add missing compiler interop API functions (#93)
* 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
This commit is contained in:
parent
34a37ff51d
commit
d77354db66
8 changed files with 145 additions and 9 deletions
|
@ -1,15 +1,10 @@
|
|||
package runtime
|
||||
|
||||
import "github.com/CityOfZion/neo-go/pkg/vm/api/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
|
||||
|
@ -38,3 +33,13 @@ func Verification() byte {
|
|||
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue