neo-go/interop/blockchain/blockchain.go
Anthony De Meulemeester 523789ee1c Compiler interop APIs (CityOfZion/neo-storm#5)
* added draft of block and transaction interop api.

* added header interop API

* added attribute, transaction, input, output interop API

* Added asset, attribute and account interop api.

* added Runtime interop apis

* added asset renew and create + contract and asset interop apis

Imported from CityOfZion/neo-storm (b6810d58b98312a959980f344db24689839574c4).
2019-08-14 19:13:56 +03:00

53 lines
1.6 KiB
Go

package blockchain
import (
"github.com/CityOfZion/neo-go-sc/interop/account"
"github.com/CityOfZion/neo-go-sc/interop/asset"
"github.com/CityOfZion/neo-go-sc/interop/block"
"github.com/CityOfZion/neo-go-sc/interop/contract"
"github.com/CityOfZion/neo-go-sc/interop/header"
"github.com/CityOfZion/neo-go-sc/interop/transaction"
)
// Package blockchain provides function signatures that can be used inside
// smart contracts that are written in the neo-go-sc 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{}
}