Skip to content

Commit

Permalink
release 0.0.1-rc.55-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-kaufman committed Dec 30, 2020
1 parent 1ac2b7a commit ae964c2
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 78 deletions.
28 changes: 28 additions & 0 deletions migrate-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ async function migrateDAO ({ arcVersion, web3, spinner, confirm, opts, migration
GenericScheme,
GenericSchemeMultiCallFactory,
ContinuousLocking4ReputationFactory,
CompetitionFactory,
GenesisProtocol,
GlobalConstraintRegistrar,
UpgradeScheme
Expand Down Expand Up @@ -130,6 +131,15 @@ async function migrateDAO ({ arcVersion, web3, spinner, confirm, opts, migration
)
}

let competitionFactory
if (getArcVersionNumber(arcVersion) >= 55) {
competitionFactory = new web3.eth.Contract(
utils.importAbi(`./${contractsDir}/${arcVersion}/CompetitionFactory.json`).abi,
CompetitionFactory,
opts
)
}

let randomName = utils.generateRnadomName()

if (deploymentState.orgName !== undefined) {
Expand Down Expand Up @@ -877,6 +887,24 @@ async function migrateDAO ({ arcVersion, web3, spinner, confirm, opts, migration
schemeParamsHash = '0x0000000000000000000000000000000000000000000000000000000000000000'
tx = (await sendTx(createCL4R, `Deploying ContinuousLocking4Reputation with Factory...`)).receipt
await logTx(tx, `Deployed ContinuousLocking4Reputation with Factory.`)
} else if (customeScheme.schemeName === 'ContributionRewardExt') {
console.log(schemeParams)
const createCompetition = competitionFactory.methods.createCompetition(...schemeParams)
const competitionFactoryAddresses = await createCompetition.call()
const competitionAddress = competitionFactoryAddresses['0']
const creAddress = competitionFactoryAddresses['1']
schemeContract = new web3.eth.Contract(abi, creAddress, opts)
schemeParamsHash = '0x0000000000000000000000000000000000000000000000000000000000000000'
tx = (await sendTx(createCompetition, `Deploying ContinuousLocking4Reputation with Factory...`)).receipt
deploymentState.StandAloneContracts.push(
{
name: 'Competition',
alias: 'Competition',
address: competitionAddress,
arcVersion: (customeScheme.arcVersion ? customeScheme.arcVersion : arcVersion)
}
)
await logTx(tx, `Deployed ContinuousLocking4Reputation with Factory.`)
} else {
continue
}
Expand Down
Loading

0 comments on commit ae964c2

Please sign in to comment.