fix proxy contract pinning

pull/4629/head
aniket-engg 8 months ago committed by Aniket
parent 24d53edcaf
commit 4978a30b81
  1. 4
      apps/remix-ide/src/app/udapp/run-tab.js
  2. 4
      apps/remix-ide/src/blockchain/blockchain.tsx
  3. 4
      libs/remix-ui/run-tab/src/lib/actions/events.ts

@ -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) {

@ -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)
}

@ -83,8 +83,8 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
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) => {

Loading…
Cancel
Save