Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable loading previous proxy deployments. #5768

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions apps/remix-ide/src/blockchain/blockchain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@ export class Blockchain extends Plugin {
(_) => this.executionContext.currentblockGasLimit()
)
this.txRunner = new TxRunner(web3Runner, {})

this.networkcallid = 0
this.networkStatus = { network: { name: ' - ', id: ' - ' } }
this.registeredPluginEvents = []
this.defaultPinnedProviders = ['vm-cancun', 'vm-mainnet-fork', 'walletconnect', 'injected-MetaMask', 'basic-http-provider', 'hardhat-provider', 'foundry-provider']
this.networkStatus = { network: { name: this.defaultPinnedProviders[0], id: ' - ' } }
this.pinnedProviders = []
this.setupEvents()
this.setupProviders()
Expand Down Expand Up @@ -379,7 +378,7 @@ export class Blockchain extends Plugin {

async saveDeployedContractStorageLayout(contractObject, proxyAddress, networkInfo) {
const { contractName, implementationAddress } = contractObject
const networkName = networkInfo.name === 'custom' ? networkInfo.name + '-' + networkInfo.id : networkInfo.name
const networkName = networkInfo.name === 'custom' ? networkInfo.name + '-' + networkInfo.id : networkInfo.name === 'VM' ? networkInfo.name.toLowerCase() + '-' + this.getCurrentFork() : networkInfo.name
const hasPreviousDeploys = await this.call('fileManager', 'exists', `.deploys/upgradeable-contracts/${networkName}/UUPS.json`)
// TODO: make deploys folder read only.
if (hasPreviousDeploys) {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/run-tab/src/lib/actions/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const setupEvents = (plugin: RunTab) => {

plugin.blockchain.event.register('contextChanged', async (context) => {
dispatch(resetProxyDeployments())
if (!context.startsWith('vm')) getNetworkProxyAddresses(plugin, dispatch)
getNetworkProxyAddresses(plugin, dispatch)
if (context !== 'walletconnect') {
(await plugin.call('manager', 'isActive', 'walletconnect')) && plugin.call('manager', 'deactivatePlugin', 'walletconnect')
}
Expand Down