Skip to content

Commit bb91b6b

Browse files
authored
release 0.1.1-rc.23-v4 (#337)
* release 0.1.1-rc.23-v4 * release 0.1.1-rc.23-v4
1 parent 775736b commit bb91b6b

File tree

5 files changed

+35
-27
lines changed

5 files changed

+35
-27
lines changed

migrate-dao.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ async function migrateDAO ({ arcVersion, web3, spinner, confirm, opts, migration
77
network = 'mainnet'
88
}
99

10+
let adminAddress = web3.eth.accounts.wallet[0].address
11+
1012
if (network === 'private') {
1113
if (await web3.eth.net.getId() === 100) {
1214
network = 'xdai'
1315
} else if (await web3.eth.net.getId() === 77) {
1416
network = 'sokol'
17+
} else {
18+
web3.eth.accounts.wallet.add(web3.eth.accounts.privateKeyToAccount('0x6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1'))
19+
adminAddress = web3.eth.accounts.wallet[1].address
1520
}
1621
}
1722

@@ -150,7 +155,7 @@ async function migrateDAO ({ arcVersion, web3, spinner, confirm, opts, migration
150155
let createStandAloneProxyInstance = daoFactory.methods.createInstance(
151156
[0, 1, getArcVersionNumber(standAlone.arcVersion ? standAlone.arcVersion : arcVersion)],
152157
standAlone.name,
153-
web3.eth.accounts.wallet[0].address,
158+
adminAddress,
154159
contractInitParams
155160
)
156161
tx = (await sendTx(createStandAloneProxyInstance, `Creating ${standAlone.name} Proxy Instance...`)).receipt
@@ -362,7 +367,7 @@ async function migrateDAO ({ arcVersion, web3, spinner, confirm, opts, migration
362367
deploymentState.StandAloneContracts[i].address,
363368
opts
364369
)
365-
tx = (await sendTx(standaloneContractProxy.methods.changeAdmin(deploymentState.Avatar), 'Transferring Standalone Proxy Ownership...')).receipt
370+
tx = (await sendTx(standaloneContractProxy.methods.changeAdmin(deploymentState.Avatar), 'Transferring Standalone Proxy Ownership...', adminAddress, 100000)).receipt
366371
await logTx(tx, 'Transferred Standalone Proxy Ownership.')
367372
}
368373
}

migrate.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,23 +181,26 @@ const wrapCommand = fn => async options => {
181181
getArcVersionNumber: function getArcVersionNumber (arcVersion) {
182182
return Number(arcVersion.split('rc.')[1])
183183
},
184-
sendTx: async function sendTx (tx, msg, from = web3.eth.defaultAccount) {
184+
sendTx: async function sendTx (tx, msg, from = web3.eth.defaultAccount, manualGas = -1) {
185185
spinner.start(msg)
186186
let gas = 0
187187
let nonce = await web3.eth.getTransactionCount(from)
188188
const blockLimit = (await web3.eth.getBlock('latest')).gasLimit
189-
try {
190-
gas = (await tx.estimateGas())
191-
if (gas * 1.1 < blockLimit - 10000) {
192-
gas *= 1.1
193-
gas = parseInt(gas)
194-
} else {
189+
if (manualGas === -1) {
190+
try {
191+
gas = (await tx.estimateGas())
192+
if (gas * 1.1 < blockLimit - 10000) {
193+
gas *= 1.1
194+
gas = parseInt(gas)
195+
} else {
196+
gas = blockLimit - 10000
197+
}
198+
} catch (error) {
195199
gas = blockLimit - 10000
196200
}
197-
} catch (error) {
198-
gas = blockLimit - 10000
201+
} else {
202+
gas = manualGas
199203
}
200-
201204
let result = tx.send({ from, gas, nonce })
202205
let receipt = await new Promise(resolve => result.on('receipt', resolve).on('error', async error => {
203206
spinner.fail('Transaction failed: ' + error)

migration.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -162,56 +162,56 @@
162162
"dao": {
163163
"0.1.1-rc.23": {
164164
"name": "My DAO",
165-
"Avatar": "0x86723520CfF2D1E532D4F6e22cfdd84D76aB5D0b",
166-
"DAOToken": "0xa33Dc908e9b26E3c69B7aeCEDA134782B75CcC51",
167-
"Reputation": "0x26aFf68278F12eeB8378107c2C582F2fDBE23988",
168-
"Controller": "0x54ce40dee051F7A1C99403aF2b905016fF761bD0",
165+
"Avatar": "0xA26ba3f02cE548338820AB556a920f6640394183",
166+
"DAOToken": "0xB7d2dE9352c1524A1be13ABa68E7f9834C062100",
167+
"Reputation": "0xEac1B1f3B63913bB09A9DBec5510fdEc2A245d4E",
168+
"Controller": "0x42783B49FD10b9F2946A81e1870870eD1D81F840",
169169
"Schemes": [
170170
{
171171
"name": "ContributionReward",
172172
"alias": "ContributionRewardAlias",
173-
"address": "0x25C91D8323eFe51da746218da13EbEe092635bFb"
173+
"address": "0x7eE4919E2Cc29d4865a94A8d78CA7187F2BAe679"
174174
},
175175
{
176176
"name": "SchemeRegistrar",
177177
"alias": "SchemeRegistrarAlias",
178-
"address": "0x7De0C44E2094d5243368C47108329A7eB894B31d"
178+
"address": "0x06B9944C656b1686ea98c873aA3621Ba8700B1d4"
179179
},
180180
{
181181
"name": "UpgradeScheme",
182182
"alias": "UpgradeSchemeAlias",
183-
"address": "0xC32427f155ceF70597542BF442A21cA0Dee4697E"
183+
"address": "0x3aF09be413393Ca300690fA4CEA0E625Cae913A8"
184184
},
185185
{
186186
"name": "GenericScheme",
187187
"alias": "GenericSchemeAlias",
188-
"address": "0x17C9EA3eEd28F70851c36712d813de7f205ce047"
188+
"address": "0x1FdEA2d3B279A74578f4D49FED447efE4ed650d1"
189189
},
190190
{
191191
"name": "ContributionRewardExt",
192192
"alias": "ContributionRewardExt",
193-
"address": "0x3FcE5A99519fDD6bc9ed8fBf3A76DcA5b3e7c543"
193+
"address": "0x935CBd9fa6C00d405f78f1DF25Df9de0cC66085F"
194194
},
195195
{
196196
"name": "SchemeFactory",
197197
"alias": "SchemeRegistrarAlias",
198-
"address": "0x56A3Db23B8382CC3E88Fc3E184348dd9D8dB4c2a"
198+
"address": "0xC960814DaDDD5f88C0eF3789bBF6CDBE82B78267"
199199
},
200200
{
201201
"name": "JoinAndQuit",
202202
"alias": "JoinAndQuitAlias",
203-
"address": "0xB224bD269727E7aaC8EB09A5fDeCcafc0b76aa1e"
203+
"address": "0xCBbf83116959326cdc47eAa48b488d1DF8965843"
204204
},
205205
{
206206
"name": "FundingRequest",
207207
"alias": "FundingRequestAlias",
208-
"address": "0x383cD7281570edBaD63092bfb159a3a00A8BAEc7"
208+
"address": "0x69f6723F401cA05b8a70005f571fAb380856a21d"
209209
}
210210
],
211211
"StandAloneContracts": [
212212
{
213213
"name": "Wallet",
214-
"address": "0x5064A8C4111Fc206BF3DDeA121481a664F4a595c",
214+
"address": "0xa8960C1b61Fa6AAbc8B86e8C1B8D9873d1d0B8EE",
215215
"arcVersion": "0.1.1-rc.23"
216216
}
217217
],

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@daostack/migration-experimental",
3-
"version": "0.1.1-rc.23-v3",
3+
"version": "0.1.1-rc.23-v4",
44
"description": "A repo for handling DAOstack contract migrations",
55
"main": "index.js",
66
"bin": {

0 commit comments

Comments
 (0)