|
|
|
@ -122,7 +122,10 @@ export class OpenZeppelinProxy extends Plugin { |
|
|
|
|
}, |
|
|
|
|
useCall: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// re-use implementation contract's ABI for UI display in udapp and change name to proxy name.
|
|
|
|
|
newImplementationContractObject.contractName = newImplementationContractObject.name |
|
|
|
|
newImplementationContractObject.implementationAddress = newImplAddress |
|
|
|
|
newImplementationContractObject.name = proxyName |
|
|
|
|
await this.blockchain.runTx(args, () => { }, () => { }, () => { }, async (error, txResult, _address, returnValue) => { |
|
|
|
|
if (error) { |
|
|
|
|
throw new Error(`error: ${error.message ? error.message : error}`) |
|
|
|
@ -142,10 +145,6 @@ export class OpenZeppelinProxy extends Plugin { |
|
|
|
|
dataHex: fnData.replace('0x', '') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// re-use implementation contract's ABI for UI display in udapp and change name to proxy name.
|
|
|
|
|
newImplementationContractObject.contractName = newImplementationContractObject.name |
|
|
|
|
newImplementationContractObject.implementationAddress = newImplAddress |
|
|
|
|
newImplementationContractObject.name = proxyName |
|
|
|
|
this.blockchain.upgradeProxy(proxyAddress, newImplAddress, data, newImplementationContractObject) |
|
|
|
|
} else { |
|
|
|
|
const fnData = await this.blockchain.getEncodedFunctionHex([newImplAddress], UUPSupgradeAbi) |
|
|
|
@ -158,10 +157,7 @@ export class OpenZeppelinProxy extends Plugin { |
|
|
|
|
linkReferences: {}, |
|
|
|
|
dataHex: fnData.replace('0x', '') |
|
|
|
|
} |
|
|
|
|
// re-use implementation contract's ABI for UI display in udapp and change name to proxy name.
|
|
|
|
|
newImplementationContractObject.contractName = newImplementationContractObject.name |
|
|
|
|
newImplementationContractObject.implementationAddress = newImplAddress |
|
|
|
|
newImplementationContractObject.name = proxyName |
|
|
|
|
|
|
|
|
|
this.blockchain.upgradeProxy(proxyAddress, newImplAddress, data, newImplementationContractObject) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|