diff --git a/apps/remix-ide/src/app/udapp/run-tab.js b/apps/remix-ide/src/app/udapp/run-tab.js index 43ea55d6ec..166ac7a42b 100644 --- a/apps/remix-ide/src/app/udapp/run-tab.js +++ b/apps/remix-ide/src/app/udapp/run-tab.js @@ -85,8 +85,8 @@ export class RunTab extends ViewPlugin { this.emit('clearAllSavedInstancesReducer') } - addInstance(address, abi, name) { - this.emit('addInstanceReducer', address, abi, name) + addInstance(address, abi, name, contractData) { + this.emit('addInstanceReducer', address, abi, name, contractData) } addSavedInstance(address, abi, name, savedOn, filePath) { diff --git a/apps/remix-ide/src/blockchain/blockchain.tsx b/apps/remix-ide/src/blockchain/blockchain.tsx index 8095777a00..d0eba12fc7 100644 --- a/apps/remix-ide/src/blockchain/blockchain.tsx +++ b/apps/remix-ide/src/blockchain/blockchain.tsx @@ -287,7 +287,7 @@ export class Blockchain extends Plugin { await this.saveDeployedContractStorageLayout(implementationContractObject, address, networkInfo) this.events.emit('newProxyDeployment', address, new Date().toISOString(), implementationContractObject.contractName) _paq.push(['trackEvent', 'blockchain', 'Deploy With Proxy', 'Proxy deployment successful']) - this.call('udapp', 'addInstance', addressToString(address), implementationContractObject.abi, implementationContractObject.name) + this.call('udapp', 'addInstance', addressToString(address), implementationContractObject.abi, implementationContractObject.name, implementationContractObject) } this.runTx(args, confirmationCb, continueCb, promptCb, finalCb) @@ -337,7 +337,7 @@ export class Blockchain extends Plugin { } await this.saveDeployedContractStorageLayout(newImplementationContractObject, proxyAddress, networkInfo) _paq.push(['trackEvent', 'blockchain', 'Upgrade With Proxy', 'Upgrade Successful']) - this.call('udapp', 'addInstance', addressToString(proxyAddress), newImplementationContractObject.abi, newImplementationContractObject.name) + this.call('udapp', 'addInstance', addressToString(proxyAddress), newImplementationContractObject.abi, newImplementationContractObject.name, newImplementationContractObject) } this.runTx(args, confirmationCb, continueCb, promptCb, finalCb) } diff --git a/libs/remix-ui/run-tab/src/lib/actions/events.ts b/libs/remix-ui/run-tab/src/lib/actions/events.ts index 75374e30cf..ab2188847b 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -83,8 +83,8 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch) => { dispatch(clearAllSavedInstances()) }) - plugin.on('udapp', 'addInstanceReducer', (address, abi, name) => { - addInstance(dispatch, { abi, address, name }) + plugin.on('udapp', 'addInstanceReducer', (address, abi, name, contractData?) => { + addInstance(dispatch, { contractData, abi, address, name }) }) plugin.on('udapp', 'addSavedInstanceReducer', (address, abi, name, savedOn, filePath) => {