Skip to content

Commit

Permalink
Modified codegen to exclude unnecessary whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
zomglings committed Nov 22, 2023
1 parent 4dd141b commit 223d246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,14 @@ func ResolveCompounds(abi DecodedABI) DecodedABIWithCompundTypes {

// This is the Go template used to generate Solidity interfaces to contracts with a given ABI.
// The template is meant to be applied to InterfaceSpecification structs.
const InterfaceTemplate string = `
{{ if .License }}
const InterfaceTemplate string = `{{- if .License -}}
// SPDX-License-Identifier: {{.License}}
{{ end }}
{{- if .Pragma }}
{{- if .Pragma -}}
pragma solidity {{.Pragma}};
{{ end }}
{{ end -}}
// Interface generated by solface: https://github.com/moonstream-to/solface
// solface version: {{.SolfaceVersion}}
{{- $includeAnnotations := .IncludeAnnotations}}
Expand Down
2 changes: 1 addition & 1 deletion lib/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package lib

// The current version of solface.
var VERSION string = "0.2.1"
var VERSION string = "0.2.2"

0 comments on commit 223d246

Please sign in to comment.