0

I have the following problem:

migrations no. 7: (deploy proxies)

await deployer.deploy(TestProxy);
await ExportUtils.addDeployed(await TestProxy.deployed(), true,
{
    privileges:
    [
        { name:"allowed_to_vote" }
    ]
});

await deployer.deploy(TestProxy);
await ExportUtils.addDeployed(await TestProxy.deployed(), true,
{
});

migrations no. 8: (deploy registry and register all)

deploy Registry contract and add all contract the registry, including both proxies, no need to show it here, it just takes all objects from ExportUtils and registers it. 

migrations no. 9: (setup proxies)

// I need to get FIRST TestProxy
await (await TestProxy.deployed()).updateFactoryAddress((await AdminGroupLogicFactory.deployed()).address, false);
await (await TestProxy.deployed()).upgrade(false);
await (await AdminGroupLogic.at(TestProxy.address)).initProxy([
        accounts[0],
        accounts[1],
        accounts[2]
]);

// I need to get SECOND TestProxy
await (await TestProxy.deployed()).updateFactoryAddress((await ExchangeLogicFactory.deployed()).address, false);
await (await TestProxy.deployed()).upgrade(false);
await (await ExchangeLogic.at(TestProxy.address)).initProxy(
    45,
    2000,
    6,
    32,
    [accounts[3], accounts[4], accounts[5], accounts[6]]
);

I can't setup proxies before registry and can't deploy after registry. It must be like now.

How do I put first and second TestProxy objects to the migrations no.9?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.