neo-go/pkg/interop/block/block.go
Roman Khimov a1e3655560 interop: move into pkg/interop, replace pkg/vm/api
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.
2019-08-15 19:41:51 +03:00

25 lines
775 B
Go

package block
import "github.com/CityOfZion/neo-go/pkg/interop/transaction"
// Package block provides function signatures that can be used inside
// smart contracts that are written in the neo-go framework.
// Block stubs a NEO block type.
type Block struct{}
// GetTransactionCount return the number of recorded transactions in the given block.
func GetTransactionCount(b Block) int {
return 0
}
// GetTransactions returns a slice of transactions recorded in the given block.
func GetTransactions(b Block) []transaction.Transaction {
return []transaction.Transaction{}
}
// GetTransaction returns a transaction from the given a block hash of the
// transaction.
func GetTransaction(b Block, hash []byte) transaction.Transaction {
return transaction.Transaction{}
}