@nomiclabs/buidler

Index

Classes

Interfaces

Type aliases

Variables

Functions

Object literals


Type aliases

ActionType

Ƭ ActionType: function

Defined in types.ts:230

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:201

Type declaration


EnvironmentExtender

Ƭ EnvironmentExtender: function

Defined in types.ts:105

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


IEthereumProvider

Ƭ IEthereumProvider: EthereumProvider

Defined in types.ts:236


NetworkConfig

Ƭ NetworkConfig: AutoNetworkConfig | HttpNetworkConfig

Defined in types.ts:46


NetworkConfigAccounts

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

Defined in types.ts:35


RunSuperFunction

Ƭ RunSuperFunction: function

Defined in types.ts:226

Type declaration

▸(taskArguments?: ArgT): Promise<any>

Parameters:

Name Type
Optional taskArguments ArgT

Returns: Promise<any>


RunTaskFunction

Ƭ RunTaskFunction: function

Defined in types.ts:221

Type declaration

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

Parameters:

Name Type
name string
Optional taskArguments TaskArguments

Returns: Promise<any>


Variables

<Const> types

● types: Types = argumentTypes

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


Functions

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


getArtifactFromContractOutput

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

Defined in internal/artifacts.ts:13

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


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:46

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:51

Type parameters:

ArgsT : TaskArguments

Parameters:

Name Type
name string
action ActionType<ArgsT>

Returns: ConfigurableTaskDefinition


readArtifact

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

Defined in internal/artifacts.ts:60

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


saveArtifact

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

Defined in internal/artifacts.ts:43

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>


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:21

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:26

Type parameters:

ArgsT : TaskArguments

Parameters:

Name Type
name string
action ActionType<ArgsT>

Returns: ConfigurableTaskDefinition


Object literals

<Const> ERRORS

ERRORS: object

Defined in internal/core/errors.ts:98

ARGUMENTS

ARGUMENTS: object

Defined in internal/core/errors.ts:197

INVALID_ENV_VAR_VALUE

INVALID_ENV_VAR_VALUE: object

Defined in internal/core/errors.ts:198

message

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

Defined in internal/core/errors.ts:200


number

● number: number = 300

Defined in internal/core/errors.ts:199



INVALID_INPUT_FILE

INVALID_INPUT_FILE: object

Defined in internal/core/errors.ts:206

message

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

Defined in internal/core/errors.ts:208


number

● number: number = 302

Defined in internal/core/errors.ts:207



INVALID_VALUE_FOR_TYPE

INVALID_VALUE_FOR_TYPE: object

Defined in internal/core/errors.ts:202

message

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

Defined in internal/core/errors.ts:204


number

● number: number = 301

Defined in internal/core/errors.ts:203



MISSING_POSITIONAL_ARG

MISSING_POSITIONAL_ARG: object

Defined in internal/core/errors.ts:228

message

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

Defined in internal/core/errors.ts:230


number

● number: number = 307

Defined in internal/core/errors.ts:229



MISSING_TASK_ARGUMENT

MISSING_TASK_ARGUMENT: object

Defined in internal/core/errors.ts:224

message

● message: string = "Missing task argument "%s"."

Defined in internal/core/errors.ts:226


number

● number: number = 306

Defined in internal/core/errors.ts:225



PARAM_NAME_INVALID_CASING

PARAM_NAME_INVALID_CASING: object

Defined in internal/core/errors.ts:240

message

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

Defined in internal/core/errors.ts:242


number

● number: number = 310

Defined in internal/core/errors.ts:241



REPEATED_PARAM

REPEATED_PARAM: object

Defined in internal/core/errors.ts:236

message

● message: string = "Repeated parameter "%s"."

Defined in internal/core/errors.ts:238


number

● number: number = 309

Defined in internal/core/errors.ts:237



UNRECOGNIZED_COMMAND_LINE_ARG

UNRECOGNIZED_COMMAND_LINE_ARG: object

Defined in internal/core/errors.ts:215

message

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

Defined in internal/core/errors.ts:217


number

● number: number = 304

Defined in internal/core/errors.ts:216



UNRECOGNIZED_PARAM_NAME

UNRECOGNIZED_PARAM_NAME: object

Defined in internal/core/errors.ts:220

message

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

Defined in internal/core/errors.ts:222


number

● number: number = 305

Defined in internal/core/errors.ts:221



UNRECOGNIZED_POSITIONAL_ARG

UNRECOGNIZED_POSITIONAL_ARG: object

Defined in internal/core/errors.ts:232

message

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

Defined in internal/core/errors.ts:234


number

● number: number = 308

Defined in internal/core/errors.ts:233



UNRECOGNIZED_TASK

UNRECOGNIZED_TASK: object

Defined in internal/core/errors.ts:211

message

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

Defined in internal/core/errors.ts:213


number

● number: number = 303

Defined in internal/core/errors.ts:212




ARTIFACTS

ARTIFACTS: object

Defined in internal/core/errors.ts:315

NOT_FOUND

NOT_FOUND: object

Defined in internal/core/errors.ts:316

message

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

Defined in internal/core/errors.ts:318


number

● number: number = 700

Defined in internal/core/errors.ts:317




BUILTIN_TASKS

BUILTIN_TASKS: object

Defined in internal/core/errors.ts:297

COMPILE_FAILURE

COMPILE_FAILURE: object

Defined in internal/core/errors.ts:298

message

● message: string = "Compilation failed"

Defined in internal/core/errors.ts:300


number

● number: number = 600

Defined in internal/core/errors.ts:299



FLATTEN_CYCLE

FLATTEN_CYCLE: object

Defined in internal/core/errors.ts:310

message

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

Defined in internal/core/errors.ts:312


number

● number: number = 603

Defined in internal/core/errors.ts:311



RUN_FILE_NOT_FOUND

RUN_FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:302

message

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

Defined in internal/core/errors.ts:304


number

● number: number = 601

Defined in internal/core/errors.ts:303



RUN_SCRIPT_ERROR

RUN_SCRIPT_ERROR: object

Defined in internal/core/errors.ts:306

message

● message: string = "Error running script "%s": %s"

Defined in internal/core/errors.ts:308


number

● number: number = 602

Defined in internal/core/errors.ts:307




GENERAL

GENERAL: object

Defined in internal/core/errors.ts:99

INVALID_NODE_VERSION

INVALID_NODE_VERSION: object

Defined in internal/core/errors.ts:104

message

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

Defined in internal/core/errors.ts:106


number

● number: number = 2

Defined in internal/core/errors.ts:105



NOT_INSIDE_PROJECT

NOT_INSIDE_PROJECT: object

Defined in internal/core/errors.ts:100

message

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

Defined in internal/core/errors.ts:102


number

● number: number = 1

Defined in internal/core/errors.ts:101



UNSUPPORTED_OPERATION

UNSUPPORTED_OPERATION: object

Defined in internal/core/errors.ts:108

message

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

Defined in internal/core/errors.ts:110


number

● number: number = 3

Defined in internal/core/errors.ts:109




NETWORK

NETWORK: object

Defined in internal/core/errors.ts:113

CONFIG_NOT_FOUND

CONFIG_NOT_FOUND: object

Defined in internal/core/errors.ts:114

message

● message: string = "Network "%s" not defined"

Defined in internal/core/errors.ts:116


number

● number: number = 100

Defined in internal/core/errors.ts:115



ETHSIGN_MISSING_DATA_PARAM

ETHSIGN_MISSING_DATA_PARAM: object

Defined in internal/core/errors.ts:128

message

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

Defined in internal/core/errors.ts:130


number

● number: number = 103

Defined in internal/core/errors.ts:129



INVALID_GLOBAL_CHAIN_ID

INVALID_GLOBAL_CHAIN_ID: object

Defined in internal/core/errors.ts:118

message

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

Defined in internal/core/errors.ts:120


number

● number: number = 101

Defined in internal/core/errors.ts:119



INVALID_HD_PATH

INVALID_HD_PATH: object

Defined in internal/core/errors.ts:146

message

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

Defined in internal/core/errors.ts:148


number

● number: number = 107

Defined in internal/core/errors.ts:147



INVALID_TX_CHAIN_ID

INVALID_TX_CHAIN_ID: object

Defined in internal/core/errors.ts:123

message

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

Defined in internal/core/errors.ts:125


number

● number: number = 102

Defined in internal/core/errors.ts:124



MISSING_TX_PARAM_TO_SIGN_LOCALLY

MISSING_TX_PARAM_TO_SIGN_LOCALLY: object

Defined in internal/core/errors.ts:137

message

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

Defined in internal/core/errors.ts:139


number

● number: number = 105

Defined in internal/core/errors.ts:138



NOT_LOCAL_ACCOUNT

NOT_LOCAL_ACCOUNT: object

Defined in internal/core/errors.ts:132

message

● message: string = "Account "%s" is not managed by the current network access provider."

Defined in internal/core/errors.ts:134


number

● number: number = 104

Defined in internal/core/errors.ts:133



NO_REMOTE_ACCOUNT_AVAILABLE

NO_REMOTE_ACCOUNT_AVAILABLE: object

Defined in internal/core/errors.ts:141

message

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

Defined in internal/core/errors.ts:143


number

● number: number = 106

Defined in internal/core/errors.ts:142




RESOLVER

RESOLVER: object

Defined in internal/core/errors.ts:245

FILE_NOT_FOUND

FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:246

message

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

Defined in internal/core/errors.ts:246


number

● number: number = 400

Defined in internal/core/errors.ts:246



FILE_OUTSIDE_LIB

FILE_OUTSIDE_LIB: object

Defined in internal/core/errors.ts:267

message

● message: string = "File "%s" is outside its library."

Defined in internal/core/errors.ts:269


number

● number: number = 406

Defined in internal/core/errors.ts:268



FILE_OUTSIDE_PROJECT

FILE_OUTSIDE_PROJECT: object

Defined in internal/core/errors.ts:247

message

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

Defined in internal/core/errors.ts:249


number

● number: number = 401

Defined in internal/core/errors.ts:248



ILLEGAL_IMPORT

ILLEGAL_IMPORT: object

Defined in internal/core/errors.ts:263

message

● message: string = "Illegal import "%s" from "%s"."

Defined in internal/core/errors.ts:265


number

● number: number = 405

Defined in internal/core/errors.ts:264



IMPORTED_FILE_NOT_FOUND

IMPORTED_FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:271

message

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

Defined in internal/core/errors.ts:273


number

● number: number = 407

Defined in internal/core/errors.ts:272



LIBRARY_FILE_NOT_FOUND

LIBRARY_FILE_NOT_FOUND: object

Defined in internal/core/errors.ts:259

message

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

Defined in internal/core/errors.ts:261


number

● number: number = 404

Defined in internal/core/errors.ts:260



LIBRARY_FILE_NOT_LOCAL

LIBRARY_FILE_NOT_LOCAL: object

Defined in internal/core/errors.ts:251

message

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

Defined in internal/core/errors.ts:253


number

● number: number = 402

Defined in internal/core/errors.ts:252



LIBRARY_NOT_INSTALLED

LIBRARY_NOT_INSTALLED: object

Defined in internal/core/errors.ts:255

message

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

Defined in internal/core/errors.ts:257


number

● number: number = 403

Defined in internal/core/errors.ts:256




SOLC

SOLC: object

Defined in internal/core/errors.ts:276

DOWNLOAD_FAILED

DOWNLOAD_FAILED: object

Defined in internal/core/errors.ts:281

message

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

Defined in internal/core/errors.ts:283


number

● number: number = 501

Defined in internal/core/errors.ts:282



INVALID_DOWNLOAD

INVALID_DOWNLOAD: object

Defined in internal/core/errors.ts:291

message

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

Defined in internal/core/errors.ts:293


number

● number: number = 503

Defined in internal/core/errors.ts:292



INVALID_VERSION

INVALID_VERSION: object

Defined in internal/core/errors.ts:277

message

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

Defined in internal/core/errors.ts:279


number

● number: number = 500

Defined in internal/core/errors.ts:278



VERSION_LIST_DOWNLOAD_FAILED

VERSION_LIST_DOWNLOAD_FAILED: object

Defined in internal/core/errors.ts:286

message

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

Defined in internal/core/errors.ts:288


number

● number: number = 502

Defined in internal/core/errors.ts:287




TASK_DEFINITIONS

TASK_DEFINITIONS: object

Defined in internal/core/errors.ts:152

ACTION_NOT_SET

ACTION_NOT_SET: object

Defined in internal/core/errors.ts:178

message

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

Defined in internal/core/errors.ts:180


number

● number: number = 205

Defined in internal/core/errors.ts:179



DEFAULT_IN_MANDATORY_PARAM

DEFAULT_IN_MANDATORY_PARAM: object

Defined in internal/core/errors.ts:192

message

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

Defined in internal/core/errors.ts:194


number

● number: number = 208

Defined in internal/core/errors.ts:193



DEFAULT_VALUE_WRONG_TYPE

DEFAULT_VALUE_WRONG_TYPE: object

Defined in internal/core/errors.ts:187

message

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

Defined in internal/core/errors.ts:189


number

● number: number = 207

Defined in internal/core/errors.ts:188



MANDATORY_PARAM_AFTER_OPTIONAL

MANDATORY_PARAM_AFTER_OPTIONAL: object

Defined in internal/core/errors.ts:168

message

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

Defined in internal/core/errors.ts:170


number

● number: number = 203

Defined in internal/core/errors.ts:169



OVERRIDE_NO_PARAMS

OVERRIDE_NO_PARAMS: object

Defined in internal/core/errors.ts:173

message

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

Defined in internal/core/errors.ts:175


number

● number: number = 204

Defined in internal/core/errors.ts:174



PARAM_AFTER_VARIADIC

PARAM_AFTER_VARIADIC: object

Defined in internal/core/errors.ts:153

message

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

Defined in internal/core/errors.ts:155


number

● number: number = 200

Defined in internal/core/errors.ts:154



PARAM_ALREADY_DEFINED

PARAM_ALREADY_DEFINED: object

Defined in internal/core/errors.ts:158

message

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

Defined in internal/core/errors.ts:160


number

● number: number = 201

Defined in internal/core/errors.ts:159



PARAM_CLASHES_WITH_BUIDLER_PARAM

PARAM_CLASHES_WITH_BUIDLER_PARAM: object

Defined in internal/core/errors.ts:163

message

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

Defined in internal/core/errors.ts:165


number

● number: number = 202

Defined in internal/core/errors.ts:164



RUNSUPER_NOT_AVAILABLE

RUNSUPER_NOT_AVAILABLE: object

Defined in internal/core/errors.ts:182

message

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

Defined in internal/core/errors.ts:184


number

● number: number = 206

Defined in internal/core/errors.ts:183





<Const> ERROR_RANGES

ERROR_RANGES: object

Defined in internal/core/errors.ts:85

ARGUMENTS

ARGUMENTS: object

Defined in internal/core/errors.ts:91

max

● max: number = 399

Defined in internal/core/errors.ts:91


min

● min: number = 300

Defined in internal/core/errors.ts:91



ARTIFACTS

ARTIFACTS: object

Defined in internal/core/errors.ts:95

max

● max: number = 799

Defined in internal/core/errors.ts:95


min

● min: number = 700

Defined in internal/core/errors.ts:95



BUILTIN_TASKS

BUILTIN_TASKS: object

Defined in internal/core/errors.ts:94

max

● max: number = 699

Defined in internal/core/errors.ts:94


min

● min: number = 600

Defined in internal/core/errors.ts:94



GENERAL

GENERAL: object

Defined in internal/core/errors.ts:88

max

● max: number = 99

Defined in internal/core/errors.ts:88


min

● min: number = 0

Defined in internal/core/errors.ts:88



NETWORK

NETWORK: object

Defined in internal/core/errors.ts:89

max

● max: number = 199

Defined in internal/core/errors.ts:89


min

● min: number = 100

Defined in internal/core/errors.ts:89



RESOLVER

RESOLVER: object

Defined in internal/core/errors.ts:92

max

● max: number = 499

Defined in internal/core/errors.ts:92


min

● min: number = 400

Defined in internal/core/errors.ts:92



SOLC

SOLC: object

Defined in internal/core/errors.ts:93

max

● max: number = 599

Defined in internal/core/errors.ts:93


min

● min: number = 500

Defined in internal/core/errors.ts:93



TASK_DEFINITIONS

TASK_DEFINITIONS: object

Defined in internal/core/errors.ts:90

max

● max: number = 299

Defined in internal/core/errors.ts:90


min

● min: number = 200

Defined in internal/core/errors.ts:90




<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:92

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:93


parse

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

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

Parameters:

Name Type
argName string
strValue string

Returns: number



<Let> inputFile

inputFile: object

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

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

throws: BDLR302

name

● name: string = "inputFile"

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


parse

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

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

Parameters:

Name Type
argName string
strValue string

Returns: string



<Const> int

int: object

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

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:69


parse

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

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

Parameters:

Name Type
argName string
strValue string

Returns: number



<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