mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Review feedback: handle full paths
This commit is contained in:
parent
643969c471
commit
02c8bf5b31
1 changed files with 3 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
|
|
@ -204,7 +205,8 @@ func abigen(c *cli.Context) error {
|
|||
// Sanitize the combined json names to match the
|
||||
// format expected by solidity.
|
||||
if !strings.Contains(n, ":") {
|
||||
name = abi.ToCamelCase(strings.TrimSuffix(name, ".vy"))
|
||||
// Remove extra path components
|
||||
name = abi.ToCamelCase(strings.TrimSuffix(filepath.Base(name), ".vy"))
|
||||
}
|
||||
contracts[name] = contract
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue