rpc: move ContractDetails to request/ package

This commit is contained in:
Evgenii Stratonikov 2020-02-17 14:42:57 +03:00 committed by Roman Khimov
parent 63751a6e6b
commit 98a1e2170a
3 changed files with 7 additions and 9 deletions

View file

@ -477,11 +477,11 @@ func testInvokeScript(ctx *cli.Context) error {
// ProjectConfig contains project metadata.
type ProjectConfig struct {
Version uint
Contract rpc.ContractDetails `yaml:"project"`
Contract request.ContractDetails `yaml:"project"`
}
func parseContractDetails() rpc.ContractDetails {
details := rpc.ContractDetails{}
func parseContractDetails() request.ContractDetails {
details := request.ContractDetails{}
reader := bufio.NewReader(os.Stdin)
fmt.Print("Author: ")

View file

@ -1,6 +1,4 @@
package rpc
import "github.com/CityOfZion/neo-go/pkg/rpc/request"
package request
// ContractDetails contains contract metadata.
type ContractDetails struct {
@ -12,6 +10,6 @@ type ContractDetails struct {
HasStorage bool
HasDynamicInvocation bool
IsPayable bool
ReturnType request.StackParamType
Parameters []request.StackParamType
ReturnType StackParamType
Parameters []StackParamType
}

View file

@ -110,7 +110,7 @@ func GetInvocationScript(tx *transaction.Transaction, wif *keys.WIF) ([]byte, er
// CreateDeploymentScript returns a script that deploys given smart contract
// with its metadata.
func CreateDeploymentScript(avm []byte, contract *ContractDetails) ([]byte, error) {
func CreateDeploymentScript(avm []byte, contract *request.ContractDetails) ([]byte, error) {
var props smartcontract.PropertyState
script := io.NewBufBinWriter()