cli: use manifest during contract deployment
This commit is contained in:
parent
a03af55732
commit
76a2f62fbd
6 changed files with 65 additions and 128 deletions
|
@ -117,33 +117,10 @@ func methodStruct() struct{} { return struct{}{} }
|
|||
}
|
||||
|
||||
t.Run("convert to ABI", func(t *testing.T) {
|
||||
author := "Joe"
|
||||
email := "Joe@ex.com"
|
||||
version := "1.0"
|
||||
title := "MyProj"
|
||||
description := "Description"
|
||||
actual := d.convertToABI(buf, &smartcontract.ContractDetails{
|
||||
Author: author,
|
||||
Email: email,
|
||||
Version: version,
|
||||
ProjectName: title,
|
||||
Description: description,
|
||||
HasStorage: true,
|
||||
HasDynamicInvocation: false,
|
||||
IsPayable: false,
|
||||
ReturnType: smartcontract.BoolType,
|
||||
Parameters: []smartcontract.ParamType{
|
||||
smartcontract.StringType,
|
||||
},
|
||||
})
|
||||
actual := d.convertToABI(buf, smartcontract.HasStorage)
|
||||
expected := ABI{
|
||||
Hash: hash.Hash160(buf),
|
||||
Metadata: Metadata{
|
||||
Author: author,
|
||||
Email: email,
|
||||
Version: version,
|
||||
Title: title,
|
||||
Description: description,
|
||||
HasStorage: true,
|
||||
HasDynamicInvocation: false,
|
||||
IsPayable: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue