mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +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.
53 lines
1.6 KiB
Go
53 lines
1.6 KiB
Go
package blockchain
|
|
|
|
import (
|
|
"github.com/CityOfZion/neo-go/pkg/interop/account"
|
|
"github.com/CityOfZion/neo-go/pkg/interop/asset"
|
|
"github.com/CityOfZion/neo-go/pkg/interop/block"
|
|
"github.com/CityOfZion/neo-go/pkg/interop/contract"
|
|
"github.com/CityOfZion/neo-go/pkg/interop/header"
|
|
"github.com/CityOfZion/neo-go/pkg/interop/transaction"
|
|
)
|
|
|
|
// Package blockchain provides function signatures that can be used inside
|
|
// smart contracts that are written in the neo-go framework.
|
|
|
|
// GetHeight returns the height of te block recorded in the current execution scope.
|
|
func GetHeight() int {
|
|
return 0
|
|
}
|
|
|
|
// GetHeader returns the header found by the given hash or index.
|
|
func GetHeader(heightOrHash interface{}) header.Header {
|
|
return header.Header{}
|
|
}
|
|
|
|
// GetBlock returns the block found by the given hash or index.
|
|
func GetBlock(heightOrHash interface{}) block.Block {
|
|
return block.Block{}
|
|
}
|
|
|
|
// GetTransaction returns the transaction found by the given hash.
|
|
func GetTransaction(hash []byte) transaction.Transaction {
|
|
return transaction.Transaction{}
|
|
}
|
|
|
|
// GetContract returns the contract found by the given script hash.
|
|
func GetContract(scriptHash []byte) contract.Contract {
|
|
return contract.Contract{}
|
|
}
|
|
|
|
// GetAccount returns the account found by the given script hash.
|
|
func GetAccount(scriptHash []byte) account.Account {
|
|
return account.Account{}
|
|
}
|
|
|
|
// GetValidators returns a slice of validator addresses.
|
|
func GetValidators() [][]byte {
|
|
return nil
|
|
}
|
|
|
|
// GetAsset returns the asset found by the given asset id.
|
|
func GetAsset(assetID []byte) asset.Asset {
|
|
return asset.Asset{}
|
|
}
|