Skip to content

Commit

Permalink
Inject web3 to deploy-apm script
Browse files Browse the repository at this point in the history
  • Loading branch information
ßingen committed Oct 29, 2018
1 parent 2a008e4 commit 85f9335
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scripts/deploy-apm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const logDeploy = require('./helpers/deploy-logger')
const getAccounts = require('./helpers/get-accounts')

const globalArtifacts = this.artifacts // Not injected unless called directly via truffle
const globalWeb3 = this.artifacts // Not injected unless called directly via truffle

const ZERO_ADDR = '0x0000000000000000000000000000000000000000'

Expand All @@ -18,6 +19,7 @@ module.exports = async (
truffleExecCallback,
{
artifacts = globalArtifacts,
web3 = globalWeb3,
ensAddress = defaultENSAddress,
owner = defaultOwner,
daoFactoryAddress = defaultDaoFactoryAddress,
Expand Down
11 changes: 10 additions & 1 deletion scripts/deploy-test-ens.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ const logDeploy = require('./helpers/deploy-logger')
const getAccounts = require('./helpers/get-accounts')

const globalArtifacts = this.artifacts // Not injected unless called directly via truffle
const globalWeb3 = this.artifacts // Not injected unless called directly via truffle

const defaultOwner = process.env.OWNER

module.exports = async (truffleExecCallback, { artifacts = globalArtifacts, owner = defaultOwner, verbose = true } = {}) => {
module.exports = async (
truffleExecCallback,
{
artifacts = globalArtifacts,
web3 = globalWeb3,
owner = defaultOwner,
verbose = true
} = {}
) => {
const log = (...args) => {
if (verbose) { console.log(...args) }
}
Expand Down

0 comments on commit 85f9335

Please sign in to comment.