tools/abigen/internal/generate.go
Function compileSolidity
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func compileSolidity(version string, filePath string, optimizeRuns int, evmVersion *string) (map[string]*compiler.Contract, error) {
runFile, err := createRunFile(version)
if err != nil {
return nil, err
}
Function BuildTemplates
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func BuildTemplates(version, file, pkg, filename string, optimizerRuns int, evmVersion *string) error {
// TODO ast
contracts, err := compileSolidity(version, file, optimizerRuns, evmVersion)
if err != nil {
return err
Function compileSolidity
has 10 return statements (exceeds 4 allowed). Open
Open
func compileSolidity(version string, filePath string, optimizeRuns int, evmVersion *string) (map[string]*compiler.Contract, error) {
runFile, err := createRunFile(version)
if err != nil {
return nil, err
}
Function BuildTemplates
has 7 return statements (exceeds 4 allowed). Open
Open
func BuildTemplates(version, file, pkg, filename string, optimizerRuns int, evmVersion *string) error {
// TODO ast
contracts, err := compileSolidity(version, file, optimizerRuns, evmVersion)
if err != nil {
return err
Function GenerateABIFromEtherscan
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func GenerateABIFromEtherscan(ctx context.Context, chainID uint32, url string, contractAddress common.Address, fileName, solVersion, pkgName string) error {
Function GenerateABIFromEtherscan
has 5 return statements (exceeds 4 allowed). Open
Open
func GenerateABIFromEtherscan(ctx context.Context, chainID uint32, url string, contractAddress common.Address, fileName, solVersion, pkgName string) error {
client, err := etherscan.NewEtherscanAbiGenClientFromChain(ctx, chainID, url)
if err != nil {
return fmt.Errorf("could not etherscan client for chain %d", chainID)
}