diff --git a/buidler/config.go b/buidler/config.go index 7469831..0b50ee4 100644 --- a/buidler/config.go +++ b/buidler/config.go @@ -1,4 +1,4 @@ -package buidler +package builder import ( "encoding/json" @@ -23,27 +23,27 @@ type BuidlerConfig struct { } func (dp *DeploymentProvider) GetConfig(configName string, projectDir string) (*providers.Config, error) { - buidlerPath := filepath.Join(projectDir, configName) + builderPath := filepath.Join(projectDir, configName) divider := getDivider() - logrus.Debugf("Trying buidler config path: %s", buidlerPath) + logrus.Debugf("Trying builder config path: %s", builderPath) - _, err := os.Stat(buidlerPath) + _, err := os.Stat(builderPath) if os.IsNotExist(err) { return nil, err } if err != nil { - return nil, fmt.Errorf("cannot find %s, tried path: %s, error: %s", configName, buidlerPath, err) + return nil, fmt.Errorf("cannot find %s, tried path: %s, error: %s", configName, builderPath, err) } if runtime.GOOS == "windows" { - buidlerPath = strings.ReplaceAll(buidlerPath, `\`, `\\`) + builderPath = strings.ReplaceAll(builderPath, `\`, `\\`) } data, err := exec.Command("node", "-e", fmt.Sprintf(` - let { BuidlerContext } = require("@nomiclabs/buidler/internal/context"); - let { loadConfigAndTasks } = require("@nomiclabs/buidler/internal/core/config/config-loading"); - let { loadTsNodeIfPresent } = require("@nomiclabs/buidler/internal/core/typescript-support"); + let { BuidlerContext } = require("@nomiclabs/builder/internal/context"); + let { loadConfigAndTasks } = require("@nomiclabs/builder/internal/core/config/config-loading"); + let { loadTsNodeIfPresent } = require("@nomiclabs/builder/internal/core/typescript-support"); loadTsNodeIfPresent(); @@ -71,11 +71,11 @@ func (dp *DeploymentProvider) GetConfig(configName string, projectDir string) (* console.log("%s" + jsonConfig + "%s"); process.exit(0); - `, buidlerPath, divider, divider)).CombinedOutput() + `, builderPath, divider, divider)).CombinedOutput() if err != nil { return nil, fmt.Errorf( "cannot evaluate %s, tried path: %s, error: %s, output: %s", - configName, buidlerPath, err, string(data)) + configName, builderPath, err, string(data)) } configString, err := providers.ExtractConfigWithDivider(string(data), divider) @@ -84,19 +84,19 @@ func (dp *DeploymentProvider) GetConfig(configName string, projectDir string) (* return nil, fmt.Errorf("cannot read %s", configName) } - var buidlerConfig BuidlerConfig - err = json.Unmarshal([]byte(configString), &buidlerConfig) + var builderConfig BuidlerConfig + err = json.Unmarshal([]byte(configString), &builderConfig) if err != nil { logrus.Debugf("failed unmarshaling config: %s", err) return nil, fmt.Errorf("cannot read %s", configName) } - buidlerConfig.ProjectDirectory = projectDir - buidlerConfig.ConfigType = configName + builderConfig.ProjectDirectory = projectDir + builderConfig.ConfigType = configName networks := make(map[string]providers.NetworkConfig) - for key, network := range buidlerConfig.Networks { + for key, network := range builderConfig.Networks { networkId := network.NetworkID if val, ok := dp.NetworkIdMap[key]; ok { networkId = val @@ -108,13 +108,13 @@ func (dp *DeploymentProvider) GetConfig(configName string, projectDir string) (* } return &providers.Config{ - ProjectDirectory: buidlerConfig.ProjectDirectory, - BuildDirectory: buidlerConfig.BuildDirectory, + ProjectDirectory: builderConfig.ProjectDirectory, + BuildDirectory: builderConfig.BuildDirectory, Networks: networks, Compilers: map[string]providers.Compiler{ - "solc": buidlerConfig.Solc, + "solc": builderConfig.Solc, }, - ConfigType: buidlerConfig.ConfigType, + ConfigType: builderConfig.ConfigType, }, nil } @@ -124,7 +124,7 @@ func getDivider() string { func (dp *DeploymentProvider) MustGetConfig() (*providers.Config, error) { projectDir, err := filepath.Abs(config.ProjectDirectory) - buidlerConfigFile := providers.BuidlerConfigFile + builderConfigFile := providers.BuidlerConfigFile if err != nil { return nil, userError.NewUserError( @@ -133,7 +133,7 @@ func (dp *DeploymentProvider) MustGetConfig() (*providers.Config, error) { ) } - buidlerConfig, err := dp.GetConfig(buidlerConfigFile, projectDir) + builderConfig, err := dp.GetConfig(builderConfigFile, projectDir) if err != nil { return nil, userError.NewUserError( fmt.Errorf("unable to fetch config: %s", err), @@ -141,5 +141,5 @@ func (dp *DeploymentProvider) MustGetConfig() (*providers.Config, error) { ) } - return buidlerConfig, nil + return builderConfig, nil } diff --git a/commands/contract/push.go b/commands/contract/push.go index b20c5b4..b21626c 100644 --- a/commands/contract/push.go +++ b/commands/contract/push.go @@ -115,7 +115,7 @@ func uploadContracts(rest *rest.Rest) error { if numberOfContractsWithANetwork == 0 { if commands.DeploymentProvider.GetProviderName() == providers.OpenZeppelinDeploymentProvider { pushErrors[projectSlug] = userError.NewUserError( - fmt.Errorf("no contracts with a netowrk found in build dir: %s", providerConfig.AbsoluteBuildDirectoryPath()), + fmt.Errorf("no contracts with a network found in build dir: %s", providerConfig.AbsoluteBuildDirectoryPath()), commands.Colorizer.Sprintf("No migrated contracts detected in build directory: %s. This can happen when no contracts have been migrated yet.\n"+ "There is currently an issue with exporting networks for regular contracts.\nThe OpenZeppelin team has come up with a workaround,"+ "so make sure you run %s before running %s\n"+ @@ -129,7 +129,7 @@ func uploadContracts(rest *rest.Rest) error { continue } pushErrors[projectSlug] = userError.NewUserError( - fmt.Errorf("no contracts with a netowrk found in build dir: %s", providerConfig.AbsoluteBuildDirectoryPath()), + fmt.Errorf("no contracts with a network found in build dir: %s", providerConfig.AbsoluteBuildDirectoryPath()), commands.Colorizer.Sprintf("No migrated contracts detected in build directory: %s. This can happen when no contracts have been migrated yet.", commands.Colorizer.Bold(commands.Colorizer.Red(providerConfig.AbsoluteBuildDirectoryPath())), ), diff --git a/providers/util.go b/providers/util.go index ea93bfa..246a46a 100644 --- a/providers/util.go +++ b/providers/util.go @@ -24,14 +24,14 @@ func (d DeploymentProviderName) String() string { const ( TruffleDeploymentProvider DeploymentProviderName = "Truffle" OpenZeppelinDeploymentProvider DeploymentProviderName = "OpenZeppelin" - BuidlerDeploymentProvider DeploymentProviderName = "Buidler" + BuilderDeploymentProvider DeploymentProviderName = "Builder" HardhatDeploymentProvider DeploymentProviderName = "Hardhat" BrownieDeploymentProvider DeploymentProviderName = "Brownie" HardhatConfigFile = "hardhat.config.js" HardhatConfigFileTs = "hardhat.config.ts" - BuidlerConfigFile = "buidler.config.js" + BuilderConfigFile = "buidler.config.js" NewTruffleConfigFile = "truffle-config.js" OldTruffleConfigFile = "truffle.js" @@ -45,7 +45,7 @@ const ( var AllProviders = []DeploymentProviderName{ TruffleDeploymentProvider, OpenZeppelinDeploymentProvider, - BuidlerDeploymentProvider, + BuilderDeploymentProvider, HardhatDeploymentProvider, BrownieConfigFile, } diff --git a/rest/payloads/generated/actions/structs.conjure.go b/rest/payloads/generated/actions/structs.conjure.go index ada0ad8..810d92d 100644 --- a/rest/payloads/generated/actions/structs.conjure.go +++ b/rest/payloads/generated/actions/structs.conjure.go @@ -260,7 +260,7 @@ func (o *BlockTrigger) UnmarshalYAML(unmarshal func(interface{}) error) error { return safejson.Unmarshal(jsonBytes, *&o) } -// Action invokation result. +// Action invocation result. type Call struct { Id string `json:"id"` ActionId string `json:"actionId"` @@ -474,7 +474,7 @@ func (o *CallStats) UnmarshalYAML(unmarshal func(interface{}) error) error { return safejson.Unmarshal(jsonBytes, *&o) } -// Summary of action invokation result since full call can be large. Keep this in sync with call. +// Summary of action invocation result since full call can be large. Keep this in sync with call. type CallSummary struct { Id string `json:"id"` ActionId string `json:"actionId"`