Skip to content

Commit

Permalink
Allow private key overrides in local and fork mode (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
justin j. moses authored Jun 23, 2021
1 parent 9cbc686 commit e5c3ae7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion publish/src/Deployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class Deployer {
this.provider.web3 = new Web3(new Web3.providers.HttpProvider(providerUrl));
this.provider.ethers.provider = new ethers.providers.JsonRpcProvider(providerUrl);

if (useFork || (!privateKey && network === 'local')) {
// use the default owner when in a fork or in local mode and no private key supplied
if ((useFork || network === 'local') && !privateKey) {
this.provider.web3.eth.defaultAccount = getUsers({ network, user: 'owner' }).address; // protocolDAO

this.provider.ethers.defaultAccount = getUsers({ network, user: 'owner' }).address; // protocolDAO
Expand Down

0 comments on commit e5c3ae7

Please sign in to comment.