Questions tagged [layer-2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

How to calculate "amountOutMin" on some DEX-es?

There's a function in a contract on HOT-protocol exchange sendToL2( uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee ) ...
Kyell's user avatar
  • 91
0 votes
1 answer
14 views

Polygon (MATIC) is a Coin or Token?

If polygon is a Layer-2 solution is built upon Ethereum then why it is listed as Coin in coinmarketcap intead of as Token ?
Surajkumarrr's user avatar
0 votes
0 answers
9 views

Ethereum Bridges , Layer-2 , Sidechain ,Offchain ,Crosschain Interoperability

I'm confused with all these terms Bridges , Layer-2 , Sidechain ,Offchain ,Crosschain Interoperability .Are these the scaling solutions for Ethereum ?
Surajkumarrr's user avatar
1 vote
0 answers
14 views

How to transfer coins between L1 and L2 via web3.js or ethers.js?

How to do it? Programmatically. Does it always require a bridge? Or can it be done in other way too? I haven't found any difinitive answer to this anywhere.
Nondi's user avatar
  • 11
1 vote
1 answer
30 views

How does one create and send TXs on L2 - Arbitrum and others?

In ethers.js or web3.js How does one create and send TXs on L2 - Arbitrum and others? Is the algorithm absolutely identical to the one on L1, or not? How does one transfer ETH between L1 and L2?
Kyell's user avatar
  • 91
0 votes
2 answers
40 views

Differences between on zkEVM and zkSync ERA

Are polygon zkEVM and zkSync ERA somehow different? If yes then how?
Hacek 's user avatar
  • 595
1 vote
0 answers
19 views

Am i right on this? [closed]

Do I just need to deploy my contract on Base chain testnet to use its layer2 solution? Or there is other steps? It is too confusing for me, Please guide me on this.
Hacek 's user avatar
  • 595
1 vote
2 answers
51 views

Queries on Base Chain layer 2

I am a web3 developer and want to use Base Chain layer 2 solution for my contract, but i am little confused. Does just deploying on base testnet enables all benefit of layer2? How to use Base ...
Hacek 's user avatar
  • 595
1 vote
1 answer
8 views

Need advice on using layer 2 in dex

I have created a Dex, I want to use its swap and providing liquidity functionality through layer 2, how to do that? If u answer with code example then it will be very helpful for me, I can understand ...
Hacek 's user avatar
  • 595
1 vote
0 answers
6 views

I need help on using Base chain by coinbase

I wanna use Base chain in my dapp, but i could not get the documentation handy, I did not understand how i use the bridge contract address. Does configuring my hardhat.config.js as advised in ...
Hacek 's user avatar
  • 595
1 vote
0 answers
13 views

Both L2 and gasless

I need a network that is both L2 (Validium or ZK-rollups) and provides a gasless platform (for the L2 smart contracts). Which L2 networks provide such the capability?
porton's user avatar
  • 1,704
0 votes
0 answers
13 views

How to store temporary state change without committing to block?

I want your suggestion.. I want to inject (using python for e.g.) a transactions every 10 seconds. function makeTransaction (uint _value) I am externally interacting with the contract... ...
Yash Madhwal's user avatar
0 votes
0 answers
17 views

How to run a permissioned/private L2?

I am looking for a low-effort way to run a private/permissioned L2 that allows me to issue ERC-20 tokens privately. Then, occasionally, I want to bridge those to L1. Any projects out the to help with ...
tired-bankster's user avatar
0 votes
0 answers
9 views

use of operator contract in ZK rollups

i understood why 2 smart contracts are deployed in mainnet, but don't understood why an operator contract is deployed in layer 2 chain in ZK rollups. what does this smart contract do exactly ?
aakash4dev's user avatar
0 votes
0 answers
25 views

works of sequencer in rollups blockchain aka layer 2. does sequencer and relayer are same ? how to make decetralised sequencer?

I guess, the work of sequencer of L2 rollup chain is to minify transactions and sends them to L1. What are the other works of sequencer and how does it exactly works where is it hosted. I gues ...
aakash4dev's user avatar
1 vote
1 answer
13 views

are there any other off-chain scaling solution then layer-2?

I was reading this: https://ethereum.org/en/developers/docs/scaling/#off-chain-scaling my doubt is: are there any other off-chain scaling solutions then layer-2. Can a centralised, non-blockchain ...
aakash4dev's user avatar
0 votes
0 answers
12 views

What is the best L2 solutions for zero value data addition transactions?

I am looking for a rollup (or any other L2) solution that supports simple data addition transactions for a Ethereum Smart Contract. The smart contract just maintains a table and we have addRow and a ...
Sam11's user avatar
  • 53
0 votes
0 answers
21 views

Getting {"code":500000} in response of LoopringAPI.userAPI.submitInternalTransfer #64

sdk` and following the doc for transfer-erc20. When transferring the eth using the mock accounts LOOPRING_EXPORTED_ACCOUNT its working fine but when I am using mainnet eth accounts I am getting the ...
Zeeshan Ahmad Khalil's user avatar
1 vote
0 answers
29 views

Arbitrum: Mapping L2 blocks to L1 batches using RPCs

I'm looking for a way to programmatically map L2 blocks to their corresponding rollup batches in L1 using RPCs. Is there a way to do this, and if so, what would be the best approach? Any help or ...
Lucas Pecina's user avatar
1 vote
0 answers
22 views

Sign and send signed transaction in L2 zk-Rollup

I own an ERC20 token on the Ethereum mainnet but as everyone knows the fees are very high would it be possible use L2 zk-Rollup with this methods below? Example transfer(), estimateGas(), ...
Gabriel's user avatar
  • 111
0 votes
0 answers
7 views

How much ether should a bridge hold in reserve to cover gas costs?

DeFi bridges often run non-profit like the Matic bridge, which bridges Ethereum layer-1 to Polygon layer-2. Some bridges like zk roll-ups that bundle transactions together even cover the gas fees for ...
user610620's user avatar
  • 1,406
1 vote
1 answer
24 views

How can privacy roll-ups like Aztec make my transfer cheaper?

Aztec or zk.money, a Layer-2 roll-up, claims to make transactions not only private but also cheaper. If I send 1 eth on L1 mainnet, all I pay is one gas txn to send it. If I instead use Aztec's ...
user610620's user avatar
  • 1,406
2 votes
2 answers
88 views

Will Layer-2s and zk roll-ups become redundant once Eth 2.0 sharding and scaling arrives?

Millions of VC funding dollars are going into Layer-2 solutions like Optimism, Arbitrum and Polygon to allow users to side-step mainnet Layer-1 and process transactions at a thousandth of the cost and ...
user610620's user avatar
  • 1,406
1 vote
0 answers
45 views

How does one get the balance of an ETH address on Arbitrum or other L2's using eth-cli commands?

Using eth-cli how do I access the balance of an address on L2's such as Arbitrum, Polygon, etc....
Patoshi パトシ's user avatar
0 votes
3 answers
255 views

How to deploy smart contracts to any arbitrary available address like it was done through a regular transaction on Optimism?

Well, I’m not talking about the mainnet but an ᴇᴠᴍ compatible ʟ2 still using an Ethereum smart‑contract for storing its state : Optimistic Ethereum. A recent contract creation on Optimism seems to ...
user2284570's user avatar
1 vote
1 answer
48 views

What is difference between ZK Rollups and Polygon?

ZK Rollups and Polygon mainnet are both layer 2 solution built for ethereum scaling solution. So what's the difference between these two solutions and which one to prefer?
Rishabh Raghwendra's user avatar
0 votes
0 answers
15 views

Is there a way to identify in real time if the Optimism bridge is working effectively or not?

If so, what all on-chain data/events would be the most important to listen to?
millers.planet's user avatar
0 votes
0 answers
49 views

How to extract Arbitrum or Optimism data

How can I ETL the data for Arbitrum and Optimism? I'm trying to find a tool like ethereum-etl to extract their data. Guide me to a tool or a way to extract Arbitrum and Optimism transactions, ...
Mutaz Kasem's user avatar
1 vote
0 answers
179 views

How do I calculate the transaction fee on the Optimism network

I have this transaction hash https://optimistic.etherscan.io/tx/0x9b8f0d63adb5c633baff74b642331d0015ea207134bd3f7f526a9b89d5dfae27 How did optimism calculate the 0.05c USD transaction fee Can someone ...
Khandkar Islam's user avatar
1 vote
1 answer
53 views

is layer0 and layer-1 blockchain both mainnet?

I want to ask here a fundamental question about the difference between layer 0 and layer 1 for my understanding. i have read you can create main blockchains on layer 1 which lacks scaling. while the ...
maztt's user avatar
  • 113
1 vote
2 answers
122 views

web3js returns empty array on getPastEvents on polygon, optimism and arbitrum

I have a problem getting past events of a contract on polygon, Optimism and Arbitrum. the same code works perfectly on ethereum but for some reason i cant get it to work on polygon, OP and ARB. I have ...
Mostafa's user avatar
  • 41
0 votes
0 answers
16 views

Can you make one transaction on mainnet that initiates a transaction on a layer 2?

I was going through some grants/RFPs and I noticed an interesting request. They are looking for a solution that allows a user to make a single transaction on mainnet to deposit funds into a protocol ...
soyboy's user avatar
  • 63
0 votes
0 answers
4 views

Can we move data between sidechain and layer 1 ? How? [duplicate]

In ZK Rollups and the optimistic rollups the transaction done in them will reflect on Layer 1 at later stage ( Correct me If I'm wrong ). So In case of side chains will the transaction done will ...
Shubham Kumar's user avatar
0 votes
0 answers
12 views

Optimisim/Arbitrum dispute resolution transactions inspection

We all know both Optimism and Arbitrum deploys fraud-proof mechanism on L2 to resolve any dispute-related issues but are there any dispute-related transactions that occurred on a chain? Any way we can ...
mohammad obaid's user avatar
1 vote
0 answers
17 views

How can i retrieve the list of ERC20 tokens bridged to other evm chains?

Is there is a way (preferably not relying on an external API) to retrieve a list of tokens bridged to L2 or other EVM chains corresponding to a token on the Ethereum mainnet. I thought of parsing ...
David Van Isacker's user avatar
0 votes
0 answers
78 views

Calling a Get Function of a mainnet contract from an Arbitrum contract

Is it possible for me to call a get function of a public variable of a contract published on the mainnet, from a function in a contract published on Arbitrum's L2? How could I do this?
Nuno's user avatar
  • 1
2 votes
1 answer
28 views

Where are layer 2 transactions (e.g. on Loopring Exchange) actually processed?

If you transact directly on Ethereum network - I get that your transaction is (eventually) processed by the 'world computer' of a load of miners running the Ethereum node software. If you do a ...
a_former_scientist's user avatar
1 vote
0 answers
22 views

Understanding data availability for zk rollups

My understanding is that if a zkrollup operator suddenly ceases operation, you have to sync the rollup’s history from genesis to get the current state. In other words, if the transaction data has been ...
Zingo's user avatar
  • 11
2 votes
1 answer
76 views

What is the current state of zkEVM development?

What is the current state of zkEVM? That is - a general-purpose (not specialized like Loopring or Immutable), EVM-compatible, Solidity-compatible zk-rollup layer 2. To my knowledge they are still ...
sentiinex's user avatar
1 vote
3 answers
433 views

Transferring weth from my contract to an other wallet address on polygon without using bridges

I have a requirement where we are building a platform that receives funds on Ethereum L1 and sends that fund back to the same address on polygon L2. I know bridges are there to transfer funds from l1 ...
Naveed Ali's user avatar
0 votes
0 answers
21 views

What will data availability sampling mean for Dapp developers?

I have heard a lot recently about data availability sampling that will be implemented on Ethereum 2 in the near future. It seems like a great idea to help with the scalability of the network, but I ...
Paul's user avatar
  • 55
0 votes
1 answer
55 views

Sending message/instruction from a governance system on Arbitrum to mint tokens on mainnet using Gnosis Zodiac Bridge

I am working with a DAO that has their governance/voting system on Arbitrum, and their Gnosis Safe treasury wallet on mainnet. The Gnosis Safe on mainnet contains minting keys to mint their native ...
Yuval's user avatar
  • 1
0 votes
3 answers
113 views

call a view function from a L1 contract in a L2 contract

I'm wondering is there a way to read a view function that is deployed on L1(Ethereum) on L2(e.g. Optimism) and vice-versa pragma solidity ^0.8.0; // pretend this is on L1 contract L1_contract { ...
sciNFTist.eth's user avatar
1 vote
0 answers
60 views

Does a Rollup transaction need the parameter 'nonce'?

Recently I am learning Rollups, and one thing makes me confused is that, Does the compressed transaction in a batch need the parameter nonce? Here in on-chain-scaling-to-potentially-500-tx-sec-through-...
shiiu akiyama's user avatar
5 votes
4 answers
3k views

Is Polygon (Matic) a layer-2 or a sidechain?

People are calling Polygon both a layer-2 and a sidechain even though these are 2 different concepts. Which one is it?
user610620's user avatar
  • 1,406
0 votes
1 answer
132 views

Questions regarding Polygon Network Mapping

In order to map (to Ethereum) ERC721 Tokens that have been minted with my Smart Contract deployed on the Polygon Network: Do I need to deploy my Smart Contract on both networks (Polygon and Ethereum)?...
JF0001's user avatar
  • 281
0 votes
0 answers
271 views

Sending WETHs instead of MATIC Tokens in Function Calls on Polygon Network

I had initially developed a Smart Contract for the Ethereum Blockchain. Within my Dapp, I would have called a mint function found in my Smart Contract using the function below. This function would ...
JF0001's user avatar
  • 281
1 vote
1 answer
124 views

Can you use Ethereum wallet to receive/send tokens of layer 2 blockchains?

If I create a wallet for Ethereum blockchain, can I use the same wallet (and accounts) for layer 2 Ethereum based blockchains (like Polygon and MATIC coin) as well? Side note: I've created a wallet ...
MehmedB's user avatar
  • 212
1 vote
0 answers
76 views

zk-rollups library

Is there already a zk-rollups library that can execute contract code? I read about zkSync, Aztec, STARKWARE, polygon etc. But they are only for token transfert and none execute contract code.
anonym_rider's user avatar
2 votes
1 answer
29 views

Is ETH 2.0 going to have many L2 layers running with it?

Is it true that ETH 2.0 will just have many L2 layers running with it, such as Polygon, so ETH 2.0 needs these L2 layers These L2 layers are not going to go away just because of ETH 2.0 rolling out ?...
nonopolarity's user avatar