@nomiclabs/buidler

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals


Type aliases

ActionType

Ƭ ActionType: function

Defined in types.ts:249

Type declaration

▸(taskArgs: ArgsT, env: BuidlerRuntimeEnvironment, runSuper: RunSuperFunction<ArgsT>): Promise<any>

Parameters:

Name Type
taskArgs ArgsT
env BuidlerRuntimeEnvironment
runSuper RunSuperFunction<ArgsT>

Returns: Promise<any>


BuidlerParamDefinitions

Ƭ BuidlerParamDefinitions: object

Defined in types.ts:216

Type declaration


EnvironmentExtender

Ƭ EnvironmentExtender: function

Defined in types.ts:119

A function that receives a BuidlerRuntimeEnvironment and modify its properties or add new ones.

Type declaration

▸(env: BuidlerRuntimeEnvironment): void

Parameters:

Name Type
env BuidlerRuntimeEnvironment

Returns: void


GlobalWithBuidlerContext

Ƭ GlobalWithBuidlerContext: Global & object

Defined in internal/internalTypes.ts:13


IEthereumProvider

Ƭ IEthereumProvider: EthereumProvider

Defined in types.ts:260


JsonRpcResponse

Ƭ JsonRpcResponse: SuccessfulJsonRpcResponse | FailedJsonRpcResponse

Defined in internal/core/providers/http.ts:28


NetworkConfig

Ƭ NetworkConfig: BuidlerNetworkConfig | HttpNetworkConfig

Defined in types.ts:50


NetworkConfigAccounts

Ƭ NetworkConfigAccounts: "remote" | string[] | HDAccountsConfig | OtherAccountsConfig

Defined in types.ts:39


RunTaskFunction

Ƭ RunTaskFunction: function

Defined in types.ts:239

Type declaration

▸(name: string, taskArguments?: TaskArguments): Promise<any>

Parameters:

Name Type
name string
Optional taskArguments TaskArguments

Returns: Promise<any>


Variables

<Const> BUIDLER_EXECUTABLE_NAME

● BUIDLER_EXECUTABLE_NAME: "buidler" = "buidler"

Defined in internal/constants.ts:3


<Const> BUIDLER_NAME

● BUIDLER_NAME: "Buidler" = "Buidler"

Defined in internal/constants.ts:1


<Const> GANACHE_GAS_MULTIPLIER

● GANACHE_GAS_MULTIPLIER: 2 = 2

Defined in internal/core/providers/gas-providers.ts:7


<Const> TASK_BUILD_ARTIFACTS

● TASK_BUILD_ARTIFACTS: "compile:build-artifacts" = "compile:build-artifacts"

Defined in builtin-tasks/task-names.ts:14


<Const> TASK_CHECK

● TASK_CHECK: "check" = "check"

Defined in builtin-tasks/task-names.ts:1


<Const> TASK_CLEAN

● TASK_CLEAN: "clean" = "clean"

Defined in builtin-tasks/task-names.ts:3


<Const> TASK_COMPILE

● TASK_COMPILE: "compile" = "compile"

Defined in builtin-tasks/task-names.ts:5


<Const> TASK_COMPILE_CHECK_CACHE

● TASK_COMPILE_CHECK_CACHE: "compile:cache" = "compile:cache"

Defined in builtin-tasks/task-names.ts:12


<Const> TASK_COMPILE_COMPILE

● TASK_COMPILE_COMPILE: "compile:compile" = "compile:compile"

Defined in builtin-tasks/task-names.ts:11


<Const> TASK_COMPILE_GET_COMPILER_INPUT

● TASK_COMPILE_GET_COMPILER_INPUT: "compile:get-compiler-input" = "compile:get-compiler-input"

Defined in builtin-tasks/task-names.ts:9


<Const> TASK_COMPILE_GET_DEPENDENCY_GRAPH

● TASK_COMPILE_GET_DEPENDENCY_GRAPH: "compile:get-dependency-graph" = "compile:get-dependency-graph"

Defined in builtin-tasks/task-names.ts:8


<Const> TASK_COMPILE_GET_RESOLVED_SOURCES

● TASK_COMPILE_GET_RESOLVED_SOURCES: "compile:get-resolved-sources" = "compile:get-resolved-sources"

Defined in builtin-tasks/task-names.ts:7


<Const> TASK_COMPILE_GET_SOURCE_PATHS

● TASK_COMPILE_GET_SOURCE_PATHS: "compile:get-source-paths" = "compile:get-source-paths"

Defined in builtin-tasks/task-names.ts:6


<Const> TASK_COMPILE_RUN_COMPILER

● TASK_COMPILE_RUN_COMPILER: "compile:run-compiler" = "compile:run-compiler"

Defined in builtin-tasks/task-names.ts:10


<Const> TASK_CONSOLE

● TASK_CONSOLE: "console" = "console"

Defined in builtin-tasks/task-names.ts:16


<Const> TASK_FLATTEN

● TASK_FLATTEN: "flatten" = "flatten"

Defined in builtin-tasks/task-names.ts:18


<Const> TASK_FLATTEN_GET_FLATTENED_SOURCE

● TASK_FLATTEN_GET_FLATTENED_SOURCE: "flatten:get-flattened-sources" = "flatten:get-flattened-sources"

Defined in builtin-tasks/task-names.ts:19


<Const> TASK_HELP

● TASK_HELP: "help" = "help"

Defined in builtin-tasks/task-names.ts:22


<Const> TASK_RUN

● TASK_RUN: "run" = "run"

Defined in builtin-tasks/task-names.ts:24


<Const> TASK_TEST

● TASK_TEST: "test" = "test"

Defined in builtin-tasks/task-names.ts:26


<Const> TASK_TEST_GET_TEST_FILES

● TASK_TEST_GET_TEST_FILES: "test:get-test-files" = "test:get-test-files"

Defined in builtin-tasks/task-names.ts:29


<Const> TASK_TEST_RUN_MOCHA_TESTS

● TASK_TEST_RUN_MOCHA_TESTS: "test:run-mocha-tests" = "test:run-mocha-tests"

Defined in builtin-tasks/task-names.ts:28


<Const> TASK_TEST_SETUP_TEST_ENVIRONMENT

● TASK_TEST_SETUP_TEST_ENVIRONMENT: "test:setup-test-environment" = "test:setup-test-environment"

Defined in builtin-tasks/task-names.ts:30


<Const> types

● types: "/opt/build/repo/packages/buidler-core/src/internal/core/params/argumentTypes" = argumentTypes

Defined in internal/core/config/config-env.ts:71


<Const> unsafeObjectKeys

● unsafeObjectKeys: function = Object.keys as ( o: T ) => Array<Extract<keyof T, string>>

Defined in internal/util/unsafe.ts:5

This function is a typed version of Object.keys. Note that it's type unsafe. You have to be sure that o has exactly the same keys as T.

Type declaration

▸<T>(o: T): Array<Extract<keyof T, string>>

Type parameters:

T

Parameters:

Name Type
o T

Returns: Array<Extract<keyof T, string>>


Functions

applyErrorMessageTemplate

applyErrorMessageTemplate(template: string, values: object): string

Defined in internal/core/errors.ts:102

This function applies error messages templates like this:

  • Template is a string which contains a variable tags. A variable tag is a a variable name surrounded by %. Eg: %plugin1%
  • A variable name is a string of alphanumeric ascii characters.
  • Every variable tag is replaced by its value.
  • %% is replaced by %.
  • Values can't contain variable tags.
  • If a variable is not present in the template, but present in the values object, an error is thrown.

Parameters:

Name Type Description
template string The template string.
values object A map of variable names to their values.

Returns: string


areArtifactsCached

areArtifactsCached(sourceTimestamps: number[], newSolcConfig: SolcConfig, paths: ProjectPaths): Promise<boolean>

Defined in builtin-tasks/utils/cache.ts:11

Parameters:

Name Type
sourceTimestamps number[]
newSolcConfig SolcConfig
paths ProjectPaths

Returns: Promise<boolean>


cacheBuidlerConfig

cacheBuidlerConfig(paths: ProjectPaths, config: SolcConfig): Promise<any>

Defined in builtin-tasks/utils/cache.ts:74

Parameters:

Name Type
paths ProjectPaths
config SolcConfig

Returns: Promise<any>


createAutomaticGasPriceProvider

createAutomaticGasPriceProvider(provider: IEthereumProvider): EthereumProvider

Defined in internal/core/providers/gas-providers.ts:73

Parameters:

Name Type
provider IEthereumProvider

Returns: EthereumProvider


createAutomaticGasProvider

createAutomaticGasProvider(provider: IEthereumProvider, gasMultiplier?: number): EthereumProvider

Defined in internal/core/providers/gas-providers.ts:53

Parameters:

Name Type Default value
provider IEthereumProvider -
Default value gasMultiplier number DEFAULT_GAS_MULTIPLIER

Returns: EthereumProvider


createChainIdGetter

createChainIdGetter(provider: IEthereumProvider): getRealChainId

Defined in internal/core/providers/provider-utils.ts:27

Parameters:

Name Type
provider IEthereumProvider

Returns: getRealChainId


createChainIdValidationProvider

createChainIdValidationProvider(provider: IEthereumProvider, chainId?: undefined | number): EthereumProvider

Defined in internal/core/providers/chainId.ts:7

Parameters:

Name Type
provider IEthereumProvider
Optional chainId undefined | number

Returns: EthereumProvider


createFixedGasPriceProvider

createFixedGasPriceProvider(provider: IEthereumProvider, gasPrice: number): EthereumProvider

Defined in internal/core/providers/gas-providers.ts:31

Parameters:

Name Type
provider IEthereumProvider
gasPrice number

Returns: EthereumProvider


createFixedGasProvider

createFixedGasProvider(provider: IEthereumProvider, gasLimit: number): EthereumProvider

Defined in internal/core/providers/gas-providers.ts:9

Parameters:

Name Type
provider IEthereumProvider
gasLimit number

Returns: EthereumProvider


createGanacheGasMultiplierProvider

createGanacheGasMultiplierProvider(provider: IEthereumProvider): EthereumProvider

Defined in internal/core/providers/gas-providers.ts:94

This provider multiplies whatever gas estimation Ganache gives by GANACHE_GAS_MULTIPLIER

NOTE: This bug was present at least in Ganache 6.4.x. One way to test if the bug is still present is to check if the estimation to run a deployment transaction with this data is high enough:

  • 0x608060405234801561001057600080fd5b5060405161043e38038061043e8339810180604052602081101561003357600080fd5b81019080805164010000000081111561004b57600080fd5b8281019050602081018481111561006157600080fd5b815185600182028301116401000000008211171561007e57600080fd5b50509291905050506040516100929061010b565b604051809103906000f0801580156100ae573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060019080519060200190610104929190610117565b50506101bc565b6088806103b683390190565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061015857805160ff1916838001178555610186565b82800160010185558215610186579182015b8281111561018557825182559160200191906001019061016a565b5b5090506101939190610197565b5090565b6101b991905b808211156101b557600081600090555060010161019d565b5090565b90565b6101eb806101cb6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f86cc00914610030575b600080fd5b61003861003a565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319ff1d216040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156100a357600080fd5b505af11580156100b7573d6000803e3d6000fd5b505050506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319ff1d216040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561012457600080fd5b505af1158015610138573d6000803e3d6000fd5b505050506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319ff1d216040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156101a557600080fd5b505af11580156101b9573d6000803e3d6000fd5b5050505056fea165627a7a723058203691efa02f6279a7b7eea9265988d2deaf417c2590c3103779c96b68e78463b700296080604052348015600f57600080fd5b50606b80601d6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806319ff1d2114602d575b600080fd5b60336035565b005b600560008190555056fea165627a7a72305820a00cf00e60c019ed83e0857faef9e9383880a5addd91429d30203771c82a4014002900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000

Parameters:

Name Type
provider IEthereumProvider

Returns: EthereumProvider


createHDWalletProvider

createHDWalletProvider(provider: IEthereumProvider, mnemonic: string, hdpath?: string, initialIndex?: number, count?: number): EthereumProvider

Defined in internal/core/providers/accounts.ts:126

Parameters:

Name Type Default value
provider IEthereumProvider -
mnemonic string -
Default value hdpath string "m/44'/60'/0'/0/"
Default value initialIndex number 0
Default value count number 10

Returns: EthereumProvider


createLocalAccountsProvider

createLocalAccountsProvider(provider: IEthereumProvider, hexPrivateKeys: string[]): EthereumProvider

Defined in internal/core/providers/accounts.ts:22

Parameters:

Name Type
provider IEthereumProvider
hexPrivateKeys string[]

Returns: EthereumProvider


createProject

createProject(): Promise<void>

Defined in internal/cli/project-creation.ts:148

Returns: Promise<void>


createProvider

createProvider(networkName: string, networkConfig: NetworkConfig): IEthereumProvider

Defined in internal/core/providers/construction.ts:17

Parameters:

Name Type
networkName string
networkConfig NetworkConfig

Returns: IEthereumProvider


createSenderProvider

createSenderProvider(provider: IEthereumProvider, from?: undefined | string): EthereumProvider

Defined in internal/core/providers/accounts.ts:167

Parameters:

Name Type
provider IEthereumProvider
Optional from undefined | string

Returns: EthereumProvider


default

default(): void

Defined in builtin-tasks/check.ts:3

Returns: void


deriveKeyFromMnemonicAndPath

deriveKeyFromMnemonicAndPath(mnemonic: string, hdPath: string): Buffer | undefined

Defined in internal/util/keys-derivation.ts:4

Parameters:

Name Type
mnemonic string
hdPath string

Returns: Buffer | undefined


disableReplWriterShowProxy

disableReplWriterShowProxy(): void

Defined in internal/util/console.ts:11

Starting at node 10, proxies are shown in the console by default, instead of actually inspecting them. This makes all our lazy loading efforts wicked, so we disable it ni buidler/register.

Returns: void


emoji

emoji(msgIfEnabled: string, msgIfDisabled?: string): string

Defined in internal/cli/emoji.ts:7

Parameters:

Name Type Default value
msgIfEnabled string -
Default value msgIfDisabled string ""

Returns: string


enableEmoji

enableEmoji(): void

Defined in internal/cli/emoji.ts:3

Returns: void


ensurePluginLoadedWithUsePlugin

ensurePluginLoadedWithUsePlugin(): void

Defined in internal/core/plugins.ts:144

Returns: void


extendEnvironment

extendEnvironment(extender: EnvironmentExtender): void

Defined in internal/core/config/config-env.ts:80

Register an environment extender what will be run after the Buidler Runtime Environment is initialized.

Parameters:

Name Type Description
extender EnvironmentExtender A function that receives the Buidler Runtime Environment.

Returns: void


failure

failure(es: ValidationError[]): string[]

Defined in internal/core/config/config-validation.ts:49

Parameters:

Name Type
es ValidationError[]

Returns: string[]


fromEntries

fromEntries<T>(entries: Array<[string, any]>): T

Defined in internal/util/lang.ts:1

Type parameters:

T

Parameters:

Name Type
entries Array<[string, any]>

Returns: T


getArtifactFromContractOutput

getArtifactFromContractOutput(contractName: string, contractOutput: any): Artifact

Defined in internal/artifacts.ts:14

Retrieves an artifact for the given contractName from the compilation output.

Parameters:

Name Type Description
contractName string the contract's name.
contractOutput any the contract's compilation output as emitted by `solc`.

Returns: Artifact


getClosestCallerPackage

getClosestCallerPackage(): string | undefined

Defined in internal/util/caller-package.ts:11

Returns the name of the closest package in the callstack that isn't this.

Returns: string | undefined


getEnvBuidlerArguments

getEnvBuidlerArguments(paramDefinitions: BuidlerParamDefinitions, envVariables: ProcessEnv): BuidlerArguments

Defined in internal/core/params/env-variables.ts:35

Parameters:

Name Type
paramDefinitions BuidlerParamDefinitions
envVariables ProcessEnv

Returns: BuidlerArguments


getEnvVariablesMap

getEnvVariablesMap(buidlerArguments: BuidlerArguments): object

Defined in internal/core/params/env-variables.ts:19

Parameters:

Name Type
buidlerArguments BuidlerArguments

Returns: object


getExecutionMode

getExecutionMode(): ExecutionMode

Defined in internal/core/execution-mode.ts:16

Returns: ExecutionMode


getImports

getImports(fileContent: string): string[]

Defined in internal/solidity/imports.ts:1

Parameters:

Name Type
fileContent string

Returns: string[]


getInputFromDependencyGraph

getInputFromDependencyGraph(graph: DependencyGraph, optimizerConfig: SolcOptimizerConfig, evmVersion?: undefined | string): SolcInput

Defined in internal/solidity/compiler/compiler-input.ts:4

Parameters:

Name Type
graph DependencyGraph
optimizerConfig SolcOptimizerConfig
Optional evmVersion undefined | string

Returns: SolcInput


getPackageJson

getPackageJson(): Promise<PackageJson>

Defined in internal/util/packageInfo.ts:27

Returns: Promise<PackageJson>


getPackageRoot

getPackageRoot(): Promise<string>

Defined in internal/util/packageInfo.ts:9

Returns: Promise<string>


getRecommendedGitIgnore

getRecommendedGitIgnore(): Promise<any>

Defined in internal/core/project-structure.ts:35

Returns: Promise<any>


getUserConfigPath

getUserConfigPath(): any

Defined in internal/core/project-structure.ts:19

Returns: any


getValidationErrors

getValidationErrors(config: any): string[]

Defined in internal/core/config/config-validation.ts:169

Parameters:

Name Type
config any

Returns: string[]


glob

glob(pattern: string): Promise<string[]>

Defined in internal/util/glob.ts:3

Parameters:

Name Type
pattern string

Returns: Promise<string[]>


globSync

globSync(pattern: string): string[]

Defined in internal/util/glob.ts:8

Parameters:

Name Type
pattern string

Returns: string[]


internalTask

internalTask<ArgsT>(name: string, description?: undefined | string, action?: ActionType<ArgsT>): ConfigurableTaskDefinition

internalTask<ArgsT>(name: string, action: ActionType<ArgsT>): ConfigurableTaskDefinition

Defined in internal/core/config/config-env.ts:41

Type parameters:

ArgsT : TaskArguments

Parameters:

Name Type
name string
Optional description undefined | string
Optional action ActionType<ArgsT>

Returns: ConfigurableTaskDefinition

Defined in internal/core/config/config-env.ts:47

Type parameters:

ArgsT : TaskArguments

Parameters:

Name Type
name string
action ActionType<ArgsT>

Returns: ConfigurableTaskDefinition


isCwdInsideProject

isCwdInsideProject(): boolean

Defined in internal/core/project-structure.ts:12

Returns: boolean


isHDAccountsConfig

isHDAccountsConfig(accounts?: NetworkConfigAccounts): boolean

Defined in internal/core/providers/construction.ts:11

Parameters:

Name Type
Optional accounts NetworkConfigAccounts

Returns: boolean


isNodeCalledWithoutAScript

isNodeCalledWithoutAScript(): boolean

Defined in internal/util/console.ts:1

Returns: boolean


isTypescriptSupported

isTypescriptSupported(): boolean

Defined in internal/core/typescript-support.ts:18

Returns: boolean


isValidJsonResponse

isValidJsonResponse(payload: any): boolean

Defined in internal/core/providers/http.ts:120

Parameters:

Name Type
payload any

Returns: boolean


lazyFunction

lazyFunction<T>(functionCreator: function): T

Defined in internal/util/lazy.ts:51

Type parameters:

T : Function

Parameters:

Name Type
functionCreator function

Returns: T


lazyObject

lazyObject<T>(objectCreator: function): T

Defined in internal/util/lazy.ts:30

This module provides function to implement proxy-based object, functions, and classes (they are functions). They receive an initializer function that it's not used until someone interacts with the lazy element.

This functions can also be used like a lazy require, creating a proxy that doesn't require the module until needed.

The disadvantage of using this technique is that the type information is lost wrt import, as require returns an `any. If done with enough care, this can be manually fixed.

TypeScript doesn't emit require calls for modules that are imported only because of their types. So if one uses lazyObject or lazyFunction along with a normal ESM import you can pass the module's type to this function.

An example of this can be:

import findUpT from "find-up"; export const findUp = lazyFunction(() => require("find-up"));

You can also use it with named exports:

import { EthT } from "web3x/eth"; const Eth = lazyFunction(() => require("web3x/eth").Eth);

Type parameters:

T : object

Parameters:

Name Type
objectCreator function

Returns: T


loadConfigAndTasks

loadConfigAndTasks(configPath?: undefined | string): ResolvedBuidlerConfig

Defined in internal/core/config/config-loading.ts:17

Parameters:

Name Type
Optional configPath undefined | string

Returns: ResolvedBuidlerConfig


loadPluginFile

loadPluginFile(absolutePluginFilePath: string): void

Defined in internal/core/plugins.ts:118

Parameters:

Name Type
absolutePluginFilePath string

Returns: void


loadTsNodeIfPresent

loadTsNodeIfPresent(): void

Defined in internal/core/typescript-support.ts:44

Returns: void


numberToRpcQuantity

numberToRpcQuantity(n: number): string

Defined in internal/core/providers/provider-utils.ts:23

Parameters:

Name Type
n number

Returns: string


paramNameToEnvVariable

paramNameToEnvVariable(paramName: string): string

Defined in internal/core/params/env-variables.ts:10

Parameters:

Name Type
paramName string

Returns: string


pluralize

pluralize(n: number, singular: string, plural?: undefined | string): string

Defined in internal/util/strings.ts:10

Returns the plural form of a word.

Parameters:

Name Type Description
n number The number of things to represent. This dictates whether to return the singular or plural form of the word.
singular string The singular form of the word.
Optional plural undefined | string An optional plural form of the word. If non is given, the plural form is constructed by appending an "s" to the singular form.

Returns: string


readArtifact

readArtifact(artifactsPath: string, contractName: string): Promise<Artifact>

Defined in internal/artifacts.ts:61

Asynchronically reads an artifact with the given contractName from the given artifactPath.

Parameters:

Name Type Description
artifactsPath string the artifacts' directory.
contractName string the contract's name.

Returns: Promise<Artifact>


readArtifactSync

readArtifactSync(artifactsPath: string, contractName: string): Artifact

Defined in internal/artifacts.ts:80

Synchronically reads an artifact with the given contractName from the given artifactPath.

Parameters:

Name Type Description
artifactsPath string the artifacts directory.
contractName string the contract's name.

Returns: Artifact


readPackageJson

readPackageJson(packageName: string, from?: undefined | string): PackageJson | undefined

Defined in internal/core/plugins.ts:127

Parameters:

Name Type
packageName string
Optional from undefined | string

Returns: PackageJson | undefined


replaceAll

replaceAll(str: string, toReplace: string, replacement: string): string

Defined in internal/util/strings.ts:25

Replaces all the instances of [[toReplace]] by [[replacement]] in [[str]].

Parameters:

Name Type
str string
toReplace string
replacement string

Returns: string


resetBuidlerContext

resetBuidlerContext(): void

Defined in internal/reset.ts:10

Returns: void


resolveConfig

resolveConfig(userConfigPath: string, defaultConfig: BuidlerConfig, userConfig: BuidlerConfig): ResolvedBuidlerConfig

Defined in internal/core/config/config-resolution.ts:31

This functions resolves the buidler config by merging the user provided config and the buidler default config.

Parameters:

Name Type Description
userConfigPath string the user config filepath
defaultConfig BuidlerConfig the buidler's default config object
userConfig BuidlerConfig the user config object

Returns: ResolvedBuidlerConfig the resolved config


resolveProjectPaths

resolveProjectPaths(userConfigPath: string, userPaths?: any): ProjectPaths

Defined in internal/core/config/config-resolution.ts:72

This function resolves the ProjectPaths object from the user-provided config and its path. The logic of this is not obvious and should well be document. The good thing is that most users will never use this.

Explanation:

  • paths.configFile is not overridable
  • If a path is absolute it is used "as is".
  • If the root path is relative, it's resolved from paths.configFile's dir.
  • If any other path is relative, it's resolved from paths.root.

Parameters:

Name Type Default value
userConfigPath string -
Default value userPaths any {}

Returns: ProjectPaths


rpcQuantityToNumber

rpcQuantityToNumber(quantity?: undefined | string): number

Defined in internal/core/providers/provider-utils.ts:4

Parameters:

Name Type
Optional quantity undefined | string

Returns: number


runScript

runScript(scriptPath: string, scriptArgs?: string[], extraNodeArgs?: string[], extraEnvVars?: object): Promise<number>

Defined in internal/util/scripts-runner.ts:9

Parameters:

Name Type Default value
scriptPath string -
Default value scriptArgs string[] []
Default value extraNodeArgs string[] []
Default value extraEnvVars object {}

Returns: Promise<number>


runScriptWithBuidler

runScriptWithBuidler(buidlerArguments: BuidlerArguments, scriptPath: string, scriptArgs?: string[], extraNodeArgs?: string[], extraEnvVars?: object): Promise<number>

Defined in internal/util/scripts-runner.ts:39

Parameters:

Name Type Default value
buidlerArguments BuidlerArguments -
scriptPath string -
Default value scriptArgs string[] []
Default value extraNodeArgs string[] []
Default value extraEnvVars object {}

Returns: Promise<number>


saveArtifact

saveArtifact(artifactsPath: string, artifact: Artifact): Promise<void>

Defined in internal/artifacts.ts:44

Stores an artifact in the given path.

Parameters:

Name Type Description
artifactsPath string the artifacts' directory.
artifact Artifact the artifact to be stored.

Returns: Promise<void>


success

success(): string[]

Defined in internal/core/config/config-validation.ts:53

Returns: string[]


task

task<ArgsT>(name: string, description?: undefined | string, action?: ActionType<ArgsT>): ConfigurableTaskDefinition

task<ArgsT>(name: string, action: ActionType<ArgsT>): ConfigurableTaskDefinition

Defined in internal/core/config/config-env.ts:11

Type parameters:

ArgsT : TaskArguments

Parameters:

Name Type
name string
Optional description undefined | string
Optional action ActionType<ArgsT>

Returns: ConfigurableTaskDefinition

Defined in internal/core/config/config-env.ts:17

Type parameters:

ArgsT : TaskArguments

Parameters:

Name Type
name string
action ActionType<ArgsT>

Returns: ConfigurableTaskDefinition


usePlugin

usePlugin(buidlerContext: BuidlerContext, pluginName: string, from?: undefined | string): void

Defined in internal/core/plugins.ts:28

Validates a plugin dependencies and loads it.

Parameters:

Name Type Description
buidlerContext BuidlerContext The BuidlerContext
pluginName string The plugin name.
Optional from undefined | string Where to resolve plugins and dependencies from. Only for testing purposes.

Returns: void


validateConfig

validateConfig(config: any): void

Defined in internal/core/config/config-validation.ts:157

Validates the config, throwing a BuidlerError if invalid.

Parameters:

Name Type Description
config any

Returns: void


wrapEthereumProvider

wrapEthereumProvider(provider: IEthereumProvider, netConfig: Partial<HttpNetworkConfig>): IEthereumProvider

Defined in internal/core/providers/construction.ts:31

Parameters:

Name Type
provider IEthereumProvider
netConfig Partial<HttpNetworkConfig>

Returns: IEthereumProvider


wrapSend

wrapSend(provider: IEthereumProvider, sendWrapper: function): IEthereumProvider

Defined in internal/core/providers/wrapper.ts:3

Parameters:

Name Type
provider IEthereumProvider
sendWrapper function

Returns: IEthereumProvider


Object literals

<Const> BUIDLER_PARAM_DEFINITIONS

BUIDLER_PARAM_DEFINITIONS: object

Defined in internal/core/params/buidler-params.ts:5

config

config: object

Defined in internal/core/params/buidler-params.ts:51

defaultValue

● defaultValue: undefined = undefined

Defined in internal/core/params/buidler-params.ts:53


description

● description: string = "A Buidler config file."

Defined in internal/core/params/buidler-params.ts:54


isFlag

● isFlag: false = false

Defined in internal/core/params/buidler-params.ts:56


isOptional

● isOptional: true = true

Defined in internal/core/params/buidler-params.ts:57


isVariadic

● isVariadic: false = false

Defined in internal/core/params/buidler-params.ts:58


name

● name: string = "config"

Defined in internal/core/params/buidler-params.ts:52


type

● type: ArgumentType<string> = types.inputFile

Defined in internal/core/params/buidler-params.ts:55



emoji

emoji: object

Defined in internal/core/params/buidler-params.ts:42

defaultValue

● defaultValue: boolean = process.platform === "darwin"

Defined in internal/core/params/buidler-params.ts:44


description

● description: string = "Use emoji in messages."

Defined in internal/core/params/buidler-params.ts:45


isFlag

● isFlag: true = true

Defined in internal/core/params/buidler-params.ts:47


isOptional

● isOptional: true = true

Defined in internal/core/params/buidler-params.ts:48


isVariadic

● isVariadic: false = false

Defined in internal/core/params/buidler-params.ts:49


name

● name: string = "emoji"

Defined in internal/core/params/buidler-params.ts:43


type

● type: ArgumentType<boolean> = types.boolean

Defined in internal/core/params/buidler-params.ts:46



help

help: object

Defined in internal/core/params/buidler-params.ts:33

defaultValue

● defaultValue: false = false

Defined in internal/core/params/buidler-params.ts:35


description

● description: string = "Shows this message, or a task's help if its name is provided"

Defined in internal/core/params/buidler-params.ts:36


isFlag

● isFlag: true = true

Defined in internal/core/params/buidler-params.ts:38


isOptional

● isOptional: true = true

Defined in internal/core/params/buidler-params.ts:39


isVariadic

● isVariadic: false = false

Defined in internal/core/params/buidler-params.ts:40


name

● name: string = "help"

Defined in internal/core/params/buidler-params.ts:34


type

● type: ArgumentType<boolean> = types.boolean

Defined in internal/core/params/buidler-params.ts:37



network

network: object

Defined in internal/core/params/buidler-params.ts:6

defaultValue

● defaultValue: undefined = undefined

Defined in internal/core/params/buidler-params.ts:8


description

● description: string = "The network to connect to."

Defined in internal/core/params/buidler-params.ts:9


isFlag

● isFlag: false = false

Defined in internal/core/params/buidler-params.ts:12


isOptional

● isOptional: true = true

Defined in internal/core/params/buidler-params.ts:11


isVariadic

● isVariadic: false = false

Defined in internal/core/params/buidler-params.ts:13


name

● name: string = "network"

Defined in internal/core/params/buidler-params.ts:7


type

● type: ArgumentType<string> = types.string

Defined in internal/core/params/buidler-params.ts:10



showStackTraces

showStackTraces: object

Defined in internal/core/params/buidler-params.ts:15

defaultValue

● defaultValue: false = false

Defined in internal/core/params/buidler-params.ts:17


description

● description: string = "Show stack traces."

Defined in internal/core/params/buidler-params.ts:18


isFlag

● isFlag: true = true

Defined in internal/core/params/buidler-params.ts:20


isOptional

● isOptional: true = true

Defined in internal/core/params/buidler-params.ts:21


isVariadic

● isVariadic: false = false

Defined in internal/core/params/buidler-params.ts:22


name

● name: string = "showStackTraces"

Defined in internal/core/params/buidler-params.ts:16


type

● type: ArgumentType<boolean> = types.boolean

Defined in internal/core/params/buidler-params.ts:19



verbose

verbose: object

Defined in internal/core/params/buidler-params.ts:60

defaultValue

● defaultValue: false = false

Defined in internal/core/params/buidler-params.ts:62


description

● description: string = "Enables Buidler verbose logging"

Defined in internal/core/params/buidler-params.ts:63


isFlag

● isFlag: true = true

Defined in internal/core/params/buidler-params.ts:65


isOptional

● isOptional: true = true

Defined in internal/core/params/buidler-params.ts:66


isVariadic

● isVariadic: false = false

Defined in internal/core/params/buidler-params.ts:67


name

● name: string = "verbose"

Defined in internal/core/params/buidler-params.ts:61


type

● type: ArgumentType<boolean> = types.boolean

Defined in internal/core/params/buidler-params.ts:64



version

version: object

Defined in internal/core/params/buidler-params.ts:24

defaultValue

● defaultValue: false = false

Defined in internal/core/params/buidler-params.ts:26


description

● description: string = "Shows buidler's version."

Defined in internal/core/params/buidler-params.ts:27


isFlag

● isFlag: true = true

Defined in internal/core/params/buidler-params.ts:29


isOptional

● isOptional: true = true

Defined in internal/core/params/buidler-params.ts:30


isVariadic

● isVariadic: false = false

Defined in internal/core/params/buidler-params.ts:31


name

● name: string = "version"

Defined in internal/core/params/buidler-params.ts:25


type

● type: ArgumentType<boolean> = types.boolean

Defined in internal/core/params/buidler-params.ts:28




<Const> DotPathReporter

DotPathReporter: object

Defined in internal/core/config/config-validation.ts:57

report

report(validation: any): any

Defined in internal/core/config/config-validation.ts:58

Parameters:

Name Type
validation any

Returns: any



<Const> ERRORS

ERRORS: object

Defined in internal/core/errors.ts:198

ARGUMENTS

ARGUMENTS: object

Defined in internal/core/errors.ts:358

INVALID_ENV_VAR_VALUE

INVALID_ENV_VAR_VALUE: object

Defined in internal/core/errors.ts:359

message

● message: string = "Invalid environment variable %varName%'s value: %value%"

Defined in internal/core/errors.ts:361


number

● number: number = 300

Defined in internal/core/errors.ts:360



INVALID_INPUT_FILE

INVALID_INPUT_FILE: object

Defined in internal/core/errors.ts:367

message

● message: string = "Invalid argument %name%: File %value% doesn't exist or is not a readable file."

Defined in internal/core/errors.ts:369


number

● number: number = 302

Defined in internal/core/errors.ts:368



INVALID_JSON_ARGUMENT

INVALID_JSON_ARGUMENT: object

Defined in internal/core/errors.ts:405

message

● message: string = "Error parsing JSON value for argument %param%: %error%"

Defined in internal/core/errors.ts:407


number

● number: number = 311

Defined in internal/core/errors.ts:406



INVALID_VALUE_FOR_TYPE

INVALID_VALUE_FOR_TYPE: object

Defined in internal/core/errors.ts:363

message

● message: string = "Invalid value %value% for argument %name% of type %type%"

Defined in internal/core/errors.ts:365


number

● number: number = 301

Defined in internal/core/errors.ts:364



MISSING_POSITIONAL_ARG

MISSING_POSITIONAL_ARG: object

Defined in internal/core/errors.ts:389

message

● message: string = "Missing positional argument %param%"

Defined in internal/core/errors.ts:391


number

● number: number = 307

Defined in internal/core/errors.ts:390



MISSING_TASK_ARGUMENT

MISSING_TASK_ARGUMENT: object

Defined in internal/core/errors.ts:385

message

● message: string = "Missing task argument %param%"

Defined in internal/core/errors.ts:387


number

● number: number = 306

Defined in internal/core/errors.ts:386



PARAM_NAME_INVALID_CASING

PARAM_NAME_INVALID_CASING: object

Defined in internal/core/errors.ts:401

message

● message: string = "Invalid param %param%. Command line params must be lowercase."

Defined in internal/core/errors.ts:403


number

● number: number = 310

Defined in internal/core/errors.ts:402



REPEATED_PARAM

REPEATED_PARAM: object

Defined in internal/core/errors.ts:397

message

● message: string = "Repeated parameter %param%"

Defined in internal/core/errors.ts:399


number

● number: number = 309

Defined in internal/core/errors.ts:398



UNRECOGNIZED_COMMAND_LINE_ARG

UNRECOGNIZED_COMMAND_LINE_ARG: object

Defined in internal/core/errors.ts:376

message

● message: string = "Unrecognised command line argument %argument%. Note that task arguments must come after the task name."

Defined in internal/core/errors.ts:378


number

● number: number = 304

Defined in internal/core/errors.ts:377



UNRECOGNIZED_PARAM_NAME

UNRECOGNIZED_PARAM_NAME: object

Defined in internal/core/errors.ts:381

message

● message: string = "Unrecognized param %param%"

Defined in internal/core/errors.ts:383


number

● number: number = 305

Defined in internal/core/errors.ts:382



UNRECOGNIZED_POSITIONAL_ARG

UNRECOGNIZED_POSITIONAL_ARG: object

Defined in internal/core/errors.ts:393

message

● message: string = "Unrecognized positional argument %argument%"

Defined in internal/core/errors.ts:395


number

● number: number = 308

Defined in internal/core/errors.ts:394



UNRECOGNIZED_TASK

UNRECOGNIZED_TASK: object

Defined in internal/core/errors.ts:372

message

● message: string = "Unrecognized task %task%"

Defined in internal/core/errors.ts:374


number

● number: number = 303

Defined in internal/core/errors.ts:373




ARTIFACTS

ARTIFACTS: object

Defined in internal/core/errors.ts:486

NOT_FOUND

NOT_FOUND: object

Defined in internal/core/errors.ts:487

message

● message: string = "Artifact for contract "%contractName%" not found."

Defined in internal/core/errors.ts:489


number

● number: number = 700

Defined in internal/core/errors.ts:488




BUILTIN_TASKS

BUILTIN_TASKS: object

Defined in internal/core/errors.ts:468

COMPILE_FAILURE

COMPILE_FAILURE: object

Defined in internal/core/errors.ts:469

message

● message: string = "Compilation failed"

Defined in internal/core/errors.ts:471


number

● number: number = 600

Defined in internal/core/errors.ts:470



FLATTEN_CYCLE

FLATTEN_CYCLE: object

Defined in internal/core/errors.ts:481

message

● message: string = "buidler flatten doesn't support cyclic dependencies."

Defined in internal/core/errors.ts:483


number

● number: number = 603

Defined in internal/core/errors.ts:482



RUN_FILE_NOT_FOUND

RUN_FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:473

message

● message: string = "Script %script% doesn't exist."

Defined in internal/core/errors.ts:475


number

● number: number = 601

Defined in internal/core/errors.ts:474



RUN_SCRIPT_ERROR

RUN_SCRIPT_ERROR: object

Defined in internal/core/errors.ts:477

message

● message: string = "Error running script {%script%}: %error%"

Defined in internal/core/errors.ts:479


number

● number: number = 602

Defined in internal/core/errors.ts:478




GENERAL

GENERAL: object

Defined in internal/core/errors.ts:199

CONTEXT_ALREADY_CREATED

CONTEXT_ALREADY_CREATED: object

Defined in internal/core/errors.ts:213

message

● message: string = "BuidlerContext is already created."

Defined in internal/core/errors.ts:215


number

● number: number = 4

Defined in internal/core/errors.ts:214



CONTEXT_BRE_ALREADY_DEFINED

CONTEXT_BRE_ALREADY_DEFINED: object

Defined in internal/core/errors.ts:225

message

● message: string = "BuidlerRuntime is already defined in the BuidlerContext"

Defined in internal/core/errors.ts:227


number

● number: number = 7

Defined in internal/core/errors.ts:226



CONTEXT_BRE_NOT_DEFINED

CONTEXT_BRE_NOT_DEFINED: object

Defined in internal/core/errors.ts:221

message

● message: string = "BuidlerRuntimeEnvironment is not defined in the BuidlerContext."

Defined in internal/core/errors.ts:223


number

● number: number = 6

Defined in internal/core/errors.ts:222



CONTEXT_NOT_CREATED

CONTEXT_NOT_CREATED: object

Defined in internal/core/errors.ts:217

message

● message: string = "BuidlerContext is not created."

Defined in internal/core/errors.ts:219


number

● number: number = 5

Defined in internal/core/errors.ts:218



INVALID_CONFIG

INVALID_CONFIG: object

Defined in internal/core/errors.ts:229

message

● message: string = `There's one or more errors in your config file:

%errors%

To learn more about Buidler's configuration, please go to https://buidler.dev/documentation/#configuration`

Defined in internal/core/errors.ts:231


number

● number: number = 8

Defined in internal/core/errors.ts:230



INVALID_NODE_VERSION

INVALID_NODE_VERSION: object

Defined in internal/core/errors.ts:204

message

● message: string = "Buidler doesn't support your node version. It should be %requirement%."

Defined in internal/core/errors.ts:206


number

● number: number = 2

Defined in internal/core/errors.ts:205



LIB_IMPORTED_FROM_THE_CONFIG

LIB_IMPORTED_FROM_THE_CONFIG: object

Defined in internal/core/errors.ts:237

message

● message: string = Error while loading Buidler's configuration. You probably imported @nomiclabs/buidler instead of @nomiclabs/buidler/config

Defined in internal/core/errors.ts:239


number

● number: number = 9

Defined in internal/core/errors.ts:238



NOT_INSIDE_PROJECT

NOT_INSIDE_PROJECT: object

Defined in internal/core/errors.ts:200

message

● message: string = "You are not inside a buidler project."

Defined in internal/core/errors.ts:202


number

● number: number = 1

Defined in internal/core/errors.ts:201



UNSUPPORTED_OPERATION

UNSUPPORTED_OPERATION: object

Defined in internal/core/errors.ts:209

message

● message: string = "%operation% is not supported in Buidler."

Defined in internal/core/errors.ts:211


number

● number: number = 3

Defined in internal/core/errors.ts:210




INTERNAL

INTERNAL: object

Defined in internal/core/errors.ts:517

TEMPLATE_INVALID_VARIABLE_NAME

TEMPLATE_INVALID_VARIABLE_NAME: object

Defined in internal/core/errors.ts:518

message

● message: string = "Variable names can only include ascii letters and numbers, and start with a letter, but got %variable%"

Defined in internal/core/errors.ts:520


number

● number: number = 900

Defined in internal/core/errors.ts:519



TEMPLATE_VALUE_CONTAINS_VARIABLE_TAG

TEMPLATE_VALUE_CONTAINS_VARIABLE_TAG: object

Defined in internal/core/errors.ts:523

message

● message: string = "Template values can't include variable tags, but %variable%'s value includes one"

Defined in internal/core/errors.ts:525


number

● number: number = 901

Defined in internal/core/errors.ts:524



TEMPLATE_VARIABLE_TAG_MISSING

TEMPLATE_VARIABLE_TAG_MISSING: object

Defined in internal/core/errors.ts:528

message

● message: string = "Variable %variable%'s tag not present in the template"

Defined in internal/core/errors.ts:530


number

● number: number = 902

Defined in internal/core/errors.ts:529




NETWORK

NETWORK: object

Defined in internal/core/errors.ts:243

CANT_DERIVE_KEY

CANT_DERIVE_KEY: object

Defined in internal/core/errors.ts:301

message

● message: string = "Cannot derive key %path% from mnemonic '%mnemonic%. Try using another mnemonic or deriving less keys."

Defined in internal/core/errors.ts:303


number

● number: number = 112

Defined in internal/core/errors.ts:302



CONFIG_NOT_FOUND

CONFIG_NOT_FOUND: object

Defined in internal/core/errors.ts:244

message

● message: string = "Network %network% doesn't exist"

Defined in internal/core/errors.ts:246


number

● number: number = 100

Defined in internal/core/errors.ts:245



DEPRECATED_INVALID_TX_CHAIN_ID

DEPRECATED_INVALID_TX_CHAIN_ID: object

Defined in internal/core/errors.ts:254

message

● message: string = "Trying to send a tx with chain id %txChainId%, but Buidler is connected to a chain with id %chainId%."

Defined in internal/core/errors.ts:256


number

● number: number = 102

Defined in internal/core/errors.ts:255



ETHSIGN_MISSING_DATA_PARAM

ETHSIGN_MISSING_DATA_PARAM: object

Defined in internal/core/errors.ts:259

message

● message: string = "Missing "data" param when calling eth_sign."

Defined in internal/core/errors.ts:261


number

● number: number = 103

Defined in internal/core/errors.ts:260



INVALID_GLOBAL_CHAIN_ID

INVALID_GLOBAL_CHAIN_ID: object

Defined in internal/core/errors.ts:248

message

● message: string = "Buidler was set to use chain id %configChainId%, but connected to a chain with id %connectionChainId%."

Defined in internal/core/errors.ts:250


number

● number: number = 101

Defined in internal/core/errors.ts:249



INVALID_HD_PATH

INVALID_HD_PATH: object

Defined in internal/core/errors.ts:277

message

● message: string = "HD path %path% is invalid. Read about BIP32 to know about the valid forms."

Defined in internal/core/errors.ts:279


number

● number: number = 107

Defined in internal/core/errors.ts:278



INVALID_JSON_RESPONSE

INVALID_JSON_RESPONSE: object

Defined in internal/core/errors.ts:297

message

● message: string = "Invalid JSON-RPC response received: %response%"

Defined in internal/core/errors.ts:299


number

● number: number = 111

Defined in internal/core/errors.ts:298



INVALID_RPC_QUANTITY_VALUE

INVALID_RPC_QUANTITY_VALUE: object

Defined in internal/core/errors.ts:282

message

● message: string = "Received invalid value %value% from/to the node's JSON-RPC, but a Quantity was expected."

Defined in internal/core/errors.ts:284


number

● number: number = 108

Defined in internal/core/errors.ts:283



MISSING_TX_PARAM_TO_SIGN_LOCALLY

MISSING_TX_PARAM_TO_SIGN_LOCALLY: object

Defined in internal/core/errors.ts:268

message

● message: string = "Missing param %param% from a tx being signed locally."

Defined in internal/core/errors.ts:270


number

● number: number = 105

Defined in internal/core/errors.ts:269



NETWORK_TIMEOUT

NETWORK_TIMEOUT: object

Defined in internal/core/errors.ts:292

message

● message: string = Network connection timed-out. Please check your internet connection and networks config

Defined in internal/core/errors.ts:294


number

● number: number = 110

Defined in internal/core/errors.ts:293



NODE_IS_NOT_RUNNING

NODE_IS_NOT_RUNNING: object

Defined in internal/core/errors.ts:287

message

● message: string = Cannot connect to the network %network%. Please make sure your node is running, and check your internet connection and networks config

Defined in internal/core/errors.ts:289


number

● number: number = 109

Defined in internal/core/errors.ts:288



NOT_LOCAL_ACCOUNT

NOT_LOCAL_ACCOUNT: object

Defined in internal/core/errors.ts:263

message

● message: string = "Account %account% is not managed by the node you are connected to."

Defined in internal/core/errors.ts:265


number

● number: number = 104

Defined in internal/core/errors.ts:264



NO_REMOTE_ACCOUNT_AVAILABLE

NO_REMOTE_ACCOUNT_AVAILABLE: object

Defined in internal/core/errors.ts:272

message

● message: string = "No local account was set and there are accounts in the remote node."

Defined in internal/core/errors.ts:274


number

● number: number = 106

Defined in internal/core/errors.ts:273




PLUGINS

PLUGINS: object

Defined in internal/core/errors.ts:492

DEPENDENCY_VERSION_MISMATCH

DEPENDENCY_VERSION_MISMATCH: object

Defined in internal/core/errors.ts:503

message

● message: string = "Plugin %plugin% requires %dependency% version %versionSpec% but got %installedVersion%.\n%extraMessage%" + "If you haven't installed %dependency% manually, please run: npm install --save-dev%extraFlags% %dependency%@%versionSpec%\n" + "If you have installed %dependency% yourself, please reinstall it with a valid version."

Defined in internal/core/errors.ts:505


number

● number: number = 802

Defined in internal/core/errors.ts:504



MISSING_DEPENDENCY

MISSING_DEPENDENCY: object

Defined in internal/core/errors.ts:497

message

● message: string = "Plugin %plugin% requires %dependency% to be installed.\n%extraMessage%" + "Please run: npm install --save-dev%extraFlags% %dependency%@%versionSpec%"

Defined in internal/core/errors.ts:499


number

● number: number = 801

Defined in internal/core/errors.ts:498



NOT_INSTALLED

NOT_INSTALLED: object

Defined in internal/core/errors.ts:493

message

● message: string = "Plugin %plugin% is not installed."

Defined in internal/core/errors.ts:495


number

● number: number = 800

Defined in internal/core/errors.ts:494



OLD_STYLE_IMPORT_DETECTED

OLD_STYLE_IMPORT_DETECTED: object

Defined in internal/core/errors.ts:510

message

● message: string = "You are trying to load %pluginNameText% with a require or import statement.\n" + 'Please replace it with a call to usePlugin("%pluginNameCode%").'

Defined in internal/core/errors.ts:512


number

● number: number = 803

Defined in internal/core/errors.ts:511




RESOLVER

RESOLVER: object

Defined in internal/core/errors.ts:410

FILE_NOT_FOUND

FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:411

message

● message: string = "File %file% doesn't exist."

Defined in internal/core/errors.ts:413


number

● number: number = 400

Defined in internal/core/errors.ts:412



FILE_OUTSIDE_LIB

FILE_OUTSIDE_LIB: object

Defined in internal/core/errors.ts:436

message

● message: string = "File %file% from %library% is resolved to a path outside of its library."

Defined in internal/core/errors.ts:438


number

● number: number = 406

Defined in internal/core/errors.ts:437



FILE_OUTSIDE_PROJECT

FILE_OUTSIDE_PROJECT: object

Defined in internal/core/errors.ts:415

message

● message: string = "File %file% is outside the project."

Defined in internal/core/errors.ts:417


number

● number: number = 401

Defined in internal/core/errors.ts:416



ILLEGAL_IMPORT

ILLEGAL_IMPORT: object

Defined in internal/core/errors.ts:432

message

● message: string = "Illegal import %imported% from %from%"

Defined in internal/core/errors.ts:434


number

● number: number = 405

Defined in internal/core/errors.ts:433



IMPORTED_FILE_NOT_FOUND

IMPORTED_FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:441

message

● message: string = "File %imported%, imported from %from%, not found."

Defined in internal/core/errors.ts:443


number

● number: number = 407

Defined in internal/core/errors.ts:442



LIBRARY_FILE_NOT_FOUND

LIBRARY_FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:428

message

● message: string = "File %file% doesn't exist."

Defined in internal/core/errors.ts:430


number

● number: number = 404

Defined in internal/core/errors.ts:429



LIBRARY_FILE_NOT_LOCAL

LIBRARY_FILE_NOT_LOCAL: object

Defined in internal/core/errors.ts:419

message

● message: string = "File %file% belongs to a library but was treated as a local one."

Defined in internal/core/errors.ts:421


number

● number: number = 402

Defined in internal/core/errors.ts:420



LIBRARY_NOT_INSTALLED

LIBRARY_NOT_INSTALLED: object

Defined in internal/core/errors.ts:424

message

● message: string = "Library %library% is not installed."

Defined in internal/core/errors.ts:426


number

● number: number = 403

Defined in internal/core/errors.ts:425




SOLC

SOLC: object

Defined in internal/core/errors.ts:446

DOWNLOAD_FAILED

DOWNLOAD_FAILED: object

Defined in internal/core/errors.ts:452

message

● message: string = "Couldn't download compiler version %remoteVersion%. Please check your connection or use local version %localVersion%"

Defined in internal/core/errors.ts:454


number

● number: number = 501

Defined in internal/core/errors.ts:453



INVALID_DOWNLOAD

INVALID_DOWNLOAD: object

Defined in internal/core/errors.ts:462

message

● message: string = "Couldn't download compiler version %remoteVersion%. Checksum verification failed. Please check your connection or use local version %localVersion%"

Defined in internal/core/errors.ts:464


number

● number: number = 503

Defined in internal/core/errors.ts:463



INVALID_VERSION

INVALID_VERSION: object

Defined in internal/core/errors.ts:447

message

● message: string = "Solidity version %version% is invalid or hasn't been released yet."

Defined in internal/core/errors.ts:449


number

● number: number = 500

Defined in internal/core/errors.ts:448



VERSION_LIST_DOWNLOAD_FAILED

VERSION_LIST_DOWNLOAD_FAILED: object

Defined in internal/core/errors.ts:457

message

● message: string = "Couldn't download compiler versions list. Please check your connection or use local version %localVersion%"

Defined in internal/core/errors.ts:459


number

● number: number = 502

Defined in internal/core/errors.ts:458




TASK_DEFINITIONS

TASK_DEFINITIONS: object

Defined in internal/core/errors.ts:307

ACTION_NOT_SET

ACTION_NOT_SET: object

Defined in internal/core/errors.ts:333

message

● message: string = "No action set for task %taskName%."

Defined in internal/core/errors.ts:335


number

● number: number = 205

Defined in internal/core/errors.ts:334



DEFAULT_IN_MANDATORY_PARAM

DEFAULT_IN_MANDATORY_PARAM: object

Defined in internal/core/errors.ts:347

message

● message: string = "Default value for param %paramName% of task %taskName% shouldn't be set."

Defined in internal/core/errors.ts:349


number

● number: number = 208

Defined in internal/core/errors.ts:348



DEFAULT_VALUE_WRONG_TYPE

DEFAULT_VALUE_WRONG_TYPE: object

Defined in internal/core/errors.ts:342

message

● message: string = "Default value for param %paramName% of task %taskName% doesn't match the default one, try specifying it."

Defined in internal/core/errors.ts:344


number

● number: number = 207

Defined in internal/core/errors.ts:343



INVALID_PARAM_NAME_CASING

INVALID_PARAM_NAME_CASING: object

Defined in internal/core/errors.ts:352

message

● message: string = "Invalid param name %paramName% in task %taskName%. Param names must be camelCase."

Defined in internal/core/errors.ts:354


number

● number: number = 209

Defined in internal/core/errors.ts:353



MANDATORY_PARAM_AFTER_OPTIONAL

MANDATORY_PARAM_AFTER_OPTIONAL: object

Defined in internal/core/errors.ts:323

message

● message: string = "Could not set param %paramName% for task %taskName% because it is mandatory and it was added after an optional positional param."

Defined in internal/core/errors.ts:325


number

● number: number = 203

Defined in internal/core/errors.ts:324



OVERRIDE_NO_PARAMS

OVERRIDE_NO_PARAMS: object

Defined in internal/core/errors.ts:328

message

● message: string = "Redefinition of task %taskName% failed. You can't change param definitions in an overridden task."

Defined in internal/core/errors.ts:330


number

● number: number = 204

Defined in internal/core/errors.ts:329



PARAM_AFTER_VARIADIC

PARAM_AFTER_VARIADIC: object

Defined in internal/core/errors.ts:308

message

● message: string = "Could not set positional param %paramName% for task %taskName% because there is already a variadic positional param and it has to be the last positional one."

Defined in internal/core/errors.ts:310


number

● number: number = 200

Defined in internal/core/errors.ts:309



PARAM_ALREADY_DEFINED

PARAM_ALREADY_DEFINED: object

Defined in internal/core/errors.ts:313

message

● message: string = "Could not set param %paramName% for task %taskName% because its name is already used."

Defined in internal/core/errors.ts:315


number

● number: number = 201

Defined in internal/core/errors.ts:314



PARAM_CLASHES_WITH_BUIDLER_PARAM

PARAM_CLASHES_WITH_BUIDLER_PARAM: object

Defined in internal/core/errors.ts:318

message

● message: string = "Could not set param %paramName% for task %taskName% because its name is used as a param for Buidler."

Defined in internal/core/errors.ts:320


number

● number: number = 202

Defined in internal/core/errors.ts:319



RUNSUPER_NOT_AVAILABLE

RUNSUPER_NOT_AVAILABLE: object

Defined in internal/core/errors.ts:337

message

● message: string = "Tried to call runSuper from a non-overridden definition of task %taskName%"

Defined in internal/core/errors.ts:339


number

● number: number = 206

Defined in internal/core/errors.ts:338





<Const> ERROR_RANGES

ERROR_RANGES: object

Defined in internal/core/errors.ts:183

ARGUMENTS

ARGUMENTS: object

Defined in internal/core/errors.ts:189

max

● max: number = 399

Defined in internal/core/errors.ts:189


min

● min: number = 300

Defined in internal/core/errors.ts:189



ARTIFACTS

ARTIFACTS: object

Defined in internal/core/errors.ts:193

max

● max: number = 799

Defined in internal/core/errors.ts:193


min

● min: number = 700

Defined in internal/core/errors.ts:193



BUILTIN_TASKS

BUILTIN_TASKS: object

Defined in internal/core/errors.ts:192

max

● max: number = 699

Defined in internal/core/errors.ts:192


min

● min: number = 600

Defined in internal/core/errors.ts:192



GENERAL

GENERAL: object

Defined in internal/core/errors.ts:186

max

● max: number = 99

Defined in internal/core/errors.ts:186


min

● min: number = 0

Defined in internal/core/errors.ts:186



INTERNAL

INTERNAL: object

Defined in internal/core/errors.ts:195

max

● max: number = 999

Defined in internal/core/errors.ts:195


min

● min: number = 900

Defined in internal/core/errors.ts:195



NETWORK

NETWORK: object

Defined in internal/core/errors.ts:187

max

● max: number = 199

Defined in internal/core/errors.ts:187


min

● min: number = 100

Defined in internal/core/errors.ts:187



PLUGINS

PLUGINS: object

Defined in internal/core/errors.ts:194

max

● max: number = 899

Defined in internal/core/errors.ts:194


min

● min: number = 800

Defined in internal/core/errors.ts:194



RESOLVER

RESOLVER: object

Defined in internal/core/errors.ts:190

max

● max: number = 499

Defined in internal/core/errors.ts:190


min

● min: number = 400

Defined in internal/core/errors.ts:190



SOLC

SOLC: object

Defined in internal/core/errors.ts:191

max

● max: number = 599

Defined in internal/core/errors.ts:191


min

● min: number = 500

Defined in internal/core/errors.ts:191



TASK_DEFINITIONS

TASK_DEFINITIONS: object

Defined in internal/core/errors.ts:188

max

● max: number = 299

Defined in internal/core/errors.ts:188


min

● min: number = 200

Defined in internal/core/errors.ts:188




<Const> boolean

boolean: object

Defined in internal/core/params/argumentTypes.ts:44

Boolean type.

Accepts only 'true' or 'false' (case-insensitive).

throws: BDLR301

name

● name: string = "boolean"

Defined in internal/core/params/argumentTypes.ts:45


parse

parse(argName: string, strValue: string): boolean

Defined in internal/core/params/argumentTypes.ts:46

Parameters:

Name Type
argName string
strValue string

Returns: boolean



<Const> float

float: object

Defined in internal/core/params/argumentTypes.ts:93

Float type. Accepts either a decimal string number or hexadecimal string number.

throws: BDLR301

name

● name: string = "float"

Defined in internal/core/params/argumentTypes.ts:94


parse

parse(argName: string, strValue: string): number

Defined in internal/core/params/argumentTypes.ts:95

Parameters:

Name Type
argName string
strValue string

Returns: number



<Const> inputFile

inputFile: object

Defined in internal/core/params/argumentTypes.ts:119

Input file type. Accepts a path to a readable file..

throws: BDLR302

name

● name: string = "inputFile"

Defined in internal/core/params/argumentTypes.ts:120


parse

parse(argName: string, strValue: string): string

Defined in internal/core/params/argumentTypes.ts:121

Parameters:

Name Type
argName string
strValue string

Returns: string



<Const> int

int: object

Defined in internal/core/params/argumentTypes.ts:67

Int type. Accepts either a decimal string integer or hexadecimal string integer.

throws: BDLR301

name

● name: string = "int"

Defined in internal/core/params/argumentTypes.ts:68


parse

parse(argName: string, strValue: string): number

Defined in internal/core/params/argumentTypes.ts:69

Parameters:

Name Type
argName string
strValue string

Returns: number



<Const> json

json: object

Defined in internal/core/params/argumentTypes.ts:146

name

● name: string = "json"

Defined in internal/core/params/argumentTypes.ts:147


parse

parse(argName: string, strValue: string): any

Defined in internal/core/params/argumentTypes.ts:148

Parameters:

Name Type
argName string
strValue string

Returns: any



<Const> string

string: object

Defined in internal/core/params/argumentTypes.ts:33

String type.

Accepts any kind of string.

name

● name: string = "string"

Defined in internal/core/params/argumentTypes.ts:34


parse

parse(argName: string, strValue: string): string

Defined in internal/core/params/argumentTypes.ts:35

Parameters:

Name Type
argName string
strValue string

Returns: string