aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/migrations/5_transfer_ownership.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/migrations/5_transfer_ownership.ts')
-rw-r--r--packages/contracts/migrations/5_transfer_ownership.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/contracts/migrations/5_transfer_ownership.ts b/packages/contracts/migrations/5_transfer_ownership.ts
new file mode 100644
index 000000000..ee879e2b6
--- /dev/null
+++ b/packages/contracts/migrations/5_transfer_ownership.ts
@@ -0,0 +1,25 @@
+import {Artifacts} from '../util/artifacts';
+import {ContractInstance} from '../util/types';
+const {
+ TokenTransferProxy,
+ MultiSigWalletWithTimeLock,
+ TokenRegistry,
+} = new Artifacts(artifacts);
+
+let tokenRegistry: ContractInstance;
+module.exports = (deployer: any, network: string) => {
+ if (network !== 'development') {
+ deployer.then(async () => {
+ return Promise.all([
+ TokenTransferProxy.deployed(),
+ TokenRegistry.deployed(),
+ ]).then((instances: ContractInstance[]) => {
+ let tokenTransferProxy: ContractInstance;
+ [tokenTransferProxy, tokenRegistry] = instances;
+ return tokenTransferProxy.transferOwnership(MultiSigWalletWithTimeLock.address);
+ }).then(() => {
+ return tokenRegistry.transferOwnership(MultiSigWalletWithTimeLock.address);
+ });
+ });
+ }
+};