2018-08-21 10:57:48 +00:00
|
|
|
package blockchain
|
|
|
|
|
|
|
|
import (
|
2020-03-03 14:21:42 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/account"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/asset"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/block"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/contract"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/header"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/transaction"
|
2018-08-21 10:57:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Package blockchain provides function signatures that can be used inside
|
2019-08-15 16:41:51 +00:00
|
|
|
// smart contracts that are written in the neo-go framework.
|
2018-08-21 10:57:48 +00:00
|
|
|
|
|
|
|
// 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{}
|
|
|
|
}
|