@nomiclabs/buidler > Environment

# Class: Environment

# Hierarchy


# Implements

# Index

# Constructors

# Properties

# Methods

# Constructors

# constructor

new Environment(config: ResolvedBuidlerConfig, buidlerArguments: BuidlerArguments, tasks: TasksMap, extenders?: EnvironmentExtender[]): Environment

Defined in internal/core/runtime-environment.ts:39


Name Type Default value Description
config ResolvedBuidlerConfig - The buidler's config object.
buidlerArguments BuidlerArguments - The parsed buidler's arguments.
tasks TasksMap - A map of tasks.
Default value extenders EnvironmentExtender[] [] A list of extenders.

Returns: Environment

# Properties

# buidlerArguments

● buidlerArguments: BuidlerArguments

Implementation of BuidlerRuntimeEnvironment.buidlerArguments

Defined in internal/core/runtime-environment.ts:55

# config

● config: ResolvedBuidlerConfig

Implementation of BuidlerRuntimeEnvironment.config

Defined in internal/core/runtime-environment.ts:54

# ethereum

● ethereum: EthereumProvider

Implementation of BuidlerRuntimeEnvironment.ethereum

Defined in internal/core/runtime-environment.ts:35

# network

● network: Network

Implementation of BuidlerRuntimeEnvironment.network

Defined in internal/core/runtime-environment.ts:37

# tasks

● tasks: TasksMap

Implementation of BuidlerRuntimeEnvironment.tasks

Defined in internal/core/runtime-environment.ts:56

# Methods

# injectToGlobal

injectToGlobal(blacklist?: string[]): function

Defined in internal/core/runtime-environment.ts:131


Name Type Default value Description
Default value blacklist string[] Environment._BLACKLISTED_PROPERTIES a list of property names that won't be injected.

Returns: function a function that restores the previous environment.

# run

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

Defined in internal/core/runtime-environment.ts:105


Name Type Default value Description
name string - The task's name.
Default value taskArguments any {} A map of task's arguments.

Returns: Promise<any> a promise with the task's execution result.