common/compiler: Add docs to compiler.Contract and compiler.ContractInfo

This commit is contained in:
Antonio Salazar Cardozo 2018-05-04 11:09:32 -04:00
parent d2fe83dc5c
commit 5c75423e3c
No known key found for this signature in database
GPG key ID: AFF226F4A6B64797

View file

@ -31,11 +31,17 @@ import (
var versionRegexp = regexp.MustCompile(`([0-9]+)\.([0-9]+)\.([0-9]+)`) var versionRegexp = regexp.MustCompile(`([0-9]+)\.([0-9]+)\.([0-9]+)`)
// Contract contains information about a compiled contract, alongside its code.
type Contract struct { type Contract struct {
Code string `json:"code"` Code string `json:"code"`
Info ContractInfo `json:"info"` Info ContractInfo `json:"info"`
} }
// ContractInfo contains information about a compiled contract, including access
// to the ABI definition, user and developer docs, and metadata.
//
// Depending on the source, language version, compiler version, and compiler
// options will provide information about how the contract was compiled.
type ContractInfo struct { type ContractInfo struct {
Source string `json:"source"` Source string `json:"source"`
Language string `json:"language"` Language string `json:"language"`