This repository has been archived by the owner on Mar 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arnaud Schenk
committed
Mar 6, 2020
1 parent
fd0036e
commit 5563495
Showing
8 changed files
with
47 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/protocol/migrations/18_deploy_accountRegistryBehaviour20200305.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* global artifacts */ | ||
const dotenv = require('dotenv'); | ||
|
||
dotenv.config(); | ||
const AccountRegistryBehaviour20200305 = artifacts.require('./AccountRegistry/epochs/20200305/Behaviour20200305'); | ||
const AccountRegistryManager = artifacts.require('./AccountRegistry/AccountRegistryManager'); | ||
|
||
module.exports = (deployer, network) => { | ||
return deployer.deploy(AccountRegistryBehaviour20200305).then(async (behaviourContract) => { | ||
const isLocal = network === 'development' || network === 'test'; | ||
|
||
// Get the manager contract instance | ||
let managerContract; | ||
if (isLocal) { | ||
managerContract = await AccountRegistryManager.deployed(); | ||
} else { | ||
managerContract = await AccountRegistryManager.at(AccountRegistryManager.address); | ||
} | ||
|
||
// Perform the upgrade | ||
await managerContract.upgradeAccountRegistry(behaviourContract.address); | ||
|
||
// Get the proxy contract instance | ||
const proxyAddress = await managerContract.proxyAddress(); | ||
const proxyContract = await AccountRegistryBehaviour20200305.at(proxyAddress); | ||
|
||
// Set the GSN signer address | ||
await proxyContract.setGSNSigner(); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters