forked from TrueCloudLab/neoneo-go
rpc: move ContractDetails to request/ package
This commit is contained in:
parent
63751a6e6b
commit
98a1e2170a
3 changed files with 7 additions and 9 deletions
|
@ -477,11 +477,11 @@ func testInvokeScript(ctx *cli.Context) error {
|
||||||
// ProjectConfig contains project metadata.
|
// ProjectConfig contains project metadata.
|
||||||
type ProjectConfig struct {
|
type ProjectConfig struct {
|
||||||
Version uint
|
Version uint
|
||||||
Contract rpc.ContractDetails `yaml:"project"`
|
Contract request.ContractDetails `yaml:"project"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseContractDetails() rpc.ContractDetails {
|
func parseContractDetails() request.ContractDetails {
|
||||||
details := rpc.ContractDetails{}
|
details := request.ContractDetails{}
|
||||||
reader := bufio.NewReader(os.Stdin)
|
reader := bufio.NewReader(os.Stdin)
|
||||||
|
|
||||||
fmt.Print("Author: ")
|
fmt.Print("Author: ")
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
package rpc
|
package request
|
||||||
|
|
||||||
import "github.com/CityOfZion/neo-go/pkg/rpc/request"
|
|
||||||
|
|
||||||
// ContractDetails contains contract metadata.
|
// ContractDetails contains contract metadata.
|
||||||
type ContractDetails struct {
|
type ContractDetails struct {
|
||||||
|
@ -12,6 +10,6 @@ type ContractDetails struct {
|
||||||
HasStorage bool
|
HasStorage bool
|
||||||
HasDynamicInvocation bool
|
HasDynamicInvocation bool
|
||||||
IsPayable bool
|
IsPayable bool
|
||||||
ReturnType request.StackParamType
|
ReturnType StackParamType
|
||||||
Parameters []request.StackParamType
|
Parameters []StackParamType
|
||||||
}
|
}
|
|
@ -110,7 +110,7 @@ func GetInvocationScript(tx *transaction.Transaction, wif *keys.WIF) ([]byte, er
|
||||||
|
|
||||||
// CreateDeploymentScript returns a script that deploys given smart contract
|
// CreateDeploymentScript returns a script that deploys given smart contract
|
||||||
// with its metadata.
|
// with its metadata.
|
||||||
func CreateDeploymentScript(avm []byte, contract *ContractDetails) ([]byte, error) {
|
func CreateDeploymentScript(avm []byte, contract *request.ContractDetails) ([]byte, error) {
|
||||||
var props smartcontract.PropertyState
|
var props smartcontract.PropertyState
|
||||||
|
|
||||||
script := io.NewBufBinWriter()
|
script := io.NewBufBinWriter()
|
||||||
|
|
Loading…
Reference in a new issue