2018-08-21 10:57:48 +00:00
|
|
|
package contract
|
|
|
|
|
2019-08-15 16:41:51 +00:00
|
|
|
import "github.com/CityOfZion/neo-go/pkg/interop/storage"
|
2018-08-22 07:51:35 +00:00
|
|
|
|
2018-08-21 10:57:48 +00:00
|
|
|
// Package contract 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
|
|
|
|
|
|
|
// Contract stubs a NEO contract type.
|
|
|
|
type Contract struct{}
|
|
|
|
|
|
|
|
// GetScript returns the script of the given contract.
|
|
|
|
func GetScript(c Contract) []byte {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsPayable returns whether the given contract is payable.
|
|
|
|
func IsPayable(c Contract) bool {
|
|
|
|
return false
|
|
|
|
}
|
2018-08-22 07:51:35 +00:00
|
|
|
|
|
|
|
// GetStorageContext returns the storage context for the given contract.
|
|
|
|
func GetStorageContext(c Contract) storage.Context {
|
|
|
|
return storage.Context{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create creates a new contract.
|
|
|
|
// @FIXME What is the type of the returnType here?
|
|
|
|
func Create(
|
|
|
|
script []byte,
|
|
|
|
params []interface{},
|
|
|
|
returnType byte,
|
|
|
|
properties interface{},
|
|
|
|
name,
|
|
|
|
version,
|
|
|
|
author,
|
|
|
|
email,
|
|
|
|
description string) {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Migrate migrates a new contract.
|
|
|
|
// @FIXME What is the type of the returnType here?
|
|
|
|
func Migrate(
|
|
|
|
script []byte,
|
|
|
|
params []interface{},
|
|
|
|
returnType byte,
|
|
|
|
properties interface{},
|
|
|
|
name,
|
|
|
|
version,
|
|
|
|
author,
|
|
|
|
email,
|
|
|
|
description string) {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Destroy deletes a contract that is registered on the blockchain.
|
|
|
|
func Destroy(c Contract) {}
|