cli: use manifest during contract deployment

This commit is contained in:
Evgenii Stratonikov 2020-06-09 16:12:58 +03:00
parent a03af55732
commit 76a2f62fbd
6 changed files with 65 additions and 128 deletions

View file

@ -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,