question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Optimism Network

See original GitHub issue

I want to deploy a proxy contract at optimism network,but it not work.

My code like:

 let WePiggyPriceOracleV1 = await l2ethers.getContractFactory("WePiggyPriceOracleV1", {
        signer: (await ethers.getSigners())[0]
    });
    let wepiggy_price_oracle_v1 = await upgrades.deployProxy(WePiggyPriceOracleV1);
    await wepiggy_price_oracle_v1.deployed();

and the result is:

  ganache Optional dependencies installed; exporting ganache-core with native optional dependencies. +0ms
  ganache Optional dependencies installed; exporting ganache-core with native optional dependencies. +0ms
  hardhat:core:hre Creating HardhatRuntimeEnvironment +0ms
  hardhat:core:hre Creating provider for network optimism +76ms
  @openzeppelin:upgrades:core fetching deployment of implementation 2f3b6eebb3cb5fdeebbe55176512a04c88e435fb352f67e540dcfdacef496e4c +0ms
  @openzeppelin:upgrades:core deployment of implementation 2f3b6eebb3cb5fdeebbe55176512a04c88e435fb352f67e540dcfdacef496e4c not found +1ms
  @openzeppelin:upgrades:core initiated deployment 0xc55a7af276d3f972e8eb2b6b27bdecaab32763fa2ff8eb5c9eeb940a38f52255 +12s
  @openzeppelin:upgrades:core verifying deployment tx mined 0xc55a7af276d3f972e8eb2b6b27bdecaab32763fa2ff8eb5c9eeb940a38f52255 +6ms
  @openzeppelin:upgrades:core succeeded verifying deployment tx mined 0xc55a7af276d3f972e8eb2b6b27bdecaab32763fa2ff8eb5c9eeb940a38f52255 +1s
  @openzeppelin:upgrades:core fetching deployment of proxy admin +2s
  @openzeppelin:upgrades:core deployment of proxy admin not found +1ms
  @openzeppelin:upgrades:core initiated deployment 0x58b4d994dbe5956f35a0fc073c42376e80e58cb873b79f57856dba3fffd64c79 +10s
  @openzeppelin:upgrades:core verifying deployment tx mined 0x58b4d994dbe5956f35a0fc073c42376e80e58cb873b79f57856dba3fffd64c79 +1ms
  @openzeppelin:upgrades:core succeeded verifying deployment tx mined 0x58b4d994dbe5956f35a0fc073c42376e80e58cb873b79f57856dba3fffd64c79 +1s
{ Error: Invalid deployment with address 0xeB4cbbCE5B52ca1b167898dac418da2C68ca9c01 and txHash 0x58b4d994dbe5956f35a0fc073c42376e80e58cb873b79f57856dba3fffd64c79
    at Object.waitAndValidateDeployment (/Users/dev/piggy/piggy-contract/node_modules/@openzeppelin/upgrades-core/src/deployment.ts:77:4)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  deployment:
   { address: '0xeB4cbbCE5B52ca1b167898dac418da2C68ca9c01',
     txHash:
      '0x58b4d994dbe5956f35a0fc073c42376e80e58cb873b79f57856dba3fffd64c79' } }

And I found this code at @openzeppelin/hardhat-upgrades/src/proxy-factory.ts

import AdminUpgradeabilityProxy from '@openzeppelin/upgrades-core/artifacts/contracts/proxy/AdminUpgradeabilityProxy.sol/AdminUpgradeabilityProxy.json';
import ProxyAdmin from '@openzeppelin/upgrades-core/artifacts/contracts/proxy/ProxyAdmin.sol/ProxyAdmin.json';

but the optimism use AdminUpgradeabilityProxy-ovm.json and ProxyAdmin-ovm.json . Is it a bug ?

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
frangiocommented, Oct 21, 2021

I’m going to assume the plugins will work as-is on Optimism v2. If someone runs into any problems please create a new issue.

1reaction
frangiocommented, Mar 16, 2021

We have some other things with more priority in the immediate roadmap but it would be nice to support Optimism.

How does one detect that the current network is on Optimism? Is it a different chain id?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimism
Optimism is a Layer 2 Optimistic Rollup network designed to utilize the strong ... Join us on Discord and help build the future...
Read more >
Optimism network troubleshooting - Exodus Support
Questions? Need more assistance? Send us an email at support@exodus.com. We promise quick human help! Did this answer your question?
Read more >
Network profile: Optimism - MetaMask Support - Zendesk
Network profile: Optimism ... Also known as Optimistic Ethereum, Optimism is a layer 2 (L2) rollup helping to scale Ethereum. Let's unpack how...
Read more >
What Is Optimism? The Optimism Layer 2 Solution ... - CoinDesk
As more and more users join Ethereum, the network becomes more ... Optimism supports a bunch of decentralized finance (DeFi) wallets, ...
Read more >
Coinbase Assets on Twitter: "New Asset: Coinbase will add ...
New Asset: Coinbase will add support for Optimism (OP) on the Optimism network only. Do not send this asset over Ethereum or other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found