Skip to content

Commit

Permalink
Fix need for pk (#340)
Browse files Browse the repository at this point in the history
* Remove need for private key if Standalone Contracts aren't used

* release 0.1.2-rc.0-v1
  • Loading branch information
ben-kaufman authored Jul 5, 2020
1 parent 0384674 commit abab52a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions migrate-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ async function migrateDAO ({ arcVersion, web3, spinner, confirm, opts, migration
network = 'mainnet'
}

let adminAddress = web3.eth.accounts.wallet[0].address
let adminAddress

if (migrationParams.StandAloneContracts) {
adminAddress = web3.eth.accounts.wallet[0].address
}

if (network === 'private') {
if (await web3.eth.net.getId() === 100) {
network = 'xdai'
} else if (await web3.eth.net.getId() === 77) {
network = 'sokol'
} else {
web3.eth.accounts.wallet.add(web3.eth.accounts.privateKeyToAccount('0x6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1'))
adminAddress = web3.eth.accounts.wallet[1].address
if (migrationParams.StandAloneContracts) {
web3.eth.accounts.wallet.add(web3.eth.accounts.privateKeyToAccount('0x6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1'))
adminAddress = web3.eth.accounts.wallet[1].address
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@daostack/migration-experimental",
"version": "0.1.2-rc.0-v0",
"version": "0.1.2-rc.0-v1",
"description": "A repo for handling DAOstack contract migrations",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit abab52a

Please sign in to comment.