Running `yarn deploy` gives `TypeError: Cannot read property 'length' of undefined`

Open
#618 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
blockchain, devops

Research direction

Start with deploy/deploy_contracts.ts and hardhat.config.ts, then run the documented Ephemery setup and yarn deploy to reproduce the failure. Trace the deployment configuration around the reported hardhat-deploy error and verify that deployment completes without the TypeError.

Written by the indexing model from the issue text.

Description

I am trying to use the instructions here to deploy the protocol to the Ethereum Ephemery testnet.

Steps to reproduce:

  1. clone the protocol repo with:
git clone https://github.com/livepeer/protocol.git
  1. copy the .env.sample file to .env
  2. add a private key, corresponding to an address with funds on Ephemery, to PRIVATE_KEY=
  3. Add the following in hardhat.config.ts under networks:
        ethereumEphemeryDevnet: {
            url: `https://eth.ephemeral.zeus.fyi`,
            accounts: PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : undefined
        },
  1. Set the defaultNetwork in hardhat.config.ts to ethereumEphemeryDevnet.
  2. Run the following:
yarn
export LPT_DEPLOYMENT_EXPORT_PATH=~/Development/lpt_contracts.json
yarn deploy
  1. See error:
Error: ERROR processing /home/ubuntu/protocol/deploy/deploy_contracts.ts:
TypeError: Cannot read property 'length' of undefined
    at getFrom (/home/ubuntu/protocol/node_modules/hardhat-deploy/src/helpers.ts:1642:14)
    at _deploy (/home/ubuntu/protocol/node_modules/hardhat-deploy/src/helpers.ts:537:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async _deployOne (/home/ubuntu/protocol/node_modules/hardhat-deploy/src/helpers.ts:934:16)
    at DeploymentsManager.executeDeployScripts (/home/ubuntu/protocol/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1232:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
error Command failed with exit code 1.
Dominant language
JavaScript
Stars
155
Forks
50
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from livepeer/protocol

All issues in livepeer/protocol

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.