DeployUtil

DeployUtil

Utility class for Deployer.

Constructor

new DeployUtil(logSetting)

Source:

Initialize an instance of DeployUtil.

Parameters:
Name Type Description
logSetting Logger.state.ENUM

Log setting for DeployUtil's functions

Methods

extractContract(output, name) → {object}

Source:

Function which takes solc compiled output, a contract name to extract, and returns a convenience object. This returned object contains name, abi, bytecode, the raw solc output, and other properties conveniently mapped to pieces of the raw JSON.

Parameters:
Name Type Description
output JSON

solc compiled output.

name string

Name of the contract (e.g. MemeToken)

Returns:

contract - An internally defined contract object., with the following properties: "name" {string} - Name of contract "abi" {JSON} - Contract ABI "bytecode" {string} - Bytecode "metadata" {object} - Metadata (contains metadata on compilation) "compilerVersion" {string} - Compiler version used in compilation "optimizer" {JSON} - JSON Object with both number of runs, and whether enabled or not "raw" {JSON} - Holds the raw compilation output of the contract "solFile": Name of the .sol file the contract was compiled in.

Type
object