WA-238 FIX creating master copy if contract has not been deployed
This commit is contained in:
parent
b5bafe2baa
commit
7f53e43fe9
|
@ -53,30 +53,34 @@ const createMasterCopies = async () => {
|
||||||
|
|
||||||
// Create ProxyFactory Master Copy
|
// Create ProxyFactory Master Copy
|
||||||
const ProxyFactory = getCreateProxyFactoryContract(web3)
|
const ProxyFactory = getCreateProxyFactoryContract(web3)
|
||||||
|
try {
|
||||||
proxyFactoryMaster = await ProxyFactory.deployed()
|
proxyFactoryMaster = await ProxyFactory.deployed()
|
||||||
if (!proxyFactoryMaster) {
|
} catch (err) {
|
||||||
proxyFactoryMaster = await ProxyFactory.new({ from: userAccount, gas: '5000000' })
|
proxyFactoryMaster = await ProxyFactory.new({ from: userAccount, gas: '5000000' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create AddExtension Master Copy
|
// Create AddExtension Master Copy
|
||||||
const CreateAndAddExtension = getCreateAddExtensionContract(web3)
|
const CreateAndAddExtension = getCreateAddExtensionContract(web3)
|
||||||
|
try {
|
||||||
createAndAddExtensionMaster = await CreateAndAddExtension.deployed()
|
createAndAddExtensionMaster = await CreateAndAddExtension.deployed()
|
||||||
if (!createAndAddExtensionMaster) {
|
} catch (err) {
|
||||||
createAndAddExtensionMaster = await CreateAndAddExtension.new({ from: userAccount, gas: '5000000' })
|
createAndAddExtensionMaster = await CreateAndAddExtension.new({ from: userAccount, gas: '5000000' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize safe master copy
|
// Initialize safe master copy
|
||||||
const GnosisSafe = getGnosisSafeContract(web3)
|
const GnosisSafe = getGnosisSafeContract(web3)
|
||||||
|
try {
|
||||||
safeMaster = await GnosisSafe.deployed()
|
safeMaster = await GnosisSafe.deployed()
|
||||||
if (!safeMaster) {
|
} catch (err) {
|
||||||
safeMaster = await GnosisSafe.new({ from: userAccount, gas: '5000000' })
|
safeMaster = await GnosisSafe.new({ from: userAccount, gas: '5000000' })
|
||||||
safeMaster.setup([userAccount], 1, 0, 0, { from: userAccount, gas: '5000000' })
|
safeMaster.setup([userAccount], 1, 0, 0, { from: userAccount, gas: '5000000' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize extension master copy
|
// Initialize extension master copy
|
||||||
const DailyLimitExtension = getCreateDailyLimitExtensionContract(web3)
|
const DailyLimitExtension = getCreateDailyLimitExtensionContract(web3)
|
||||||
|
try {
|
||||||
dailyLimitMaster = await DailyLimitExtension.deployed()
|
dailyLimitMaster = await DailyLimitExtension.deployed()
|
||||||
if (!dailyLimitMaster) {
|
} catch (err) {
|
||||||
dailyLimitMaster = await DailyLimitExtension.new({ from: userAccount, gas: '5000000' })
|
dailyLimitMaster = await DailyLimitExtension.new({ from: userAccount, gas: '5000000' })
|
||||||
dailyLimitMaster.setup([], [], { from: userAccount, gas: '5000000' })
|
dailyLimitMaster.setup([], [], { from: userAccount, gas: '5000000' })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue