Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [polygon]

Questions related to development on the Polygon EVM-enabled sidechain.

Filter by
Sorted by
Tagged with
10 votes
2 answers
4k views

How to properly implement a ContractURI for on-chain NFTs

I am trying to implement contract-level metadata for an NFT collection on OpenSea, However, if I do so with the following code, the contract's metadata won't update on the OpenSea collections' page, ...
Martijn Vissers's user avatar
9 votes
4 answers
6k 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,528
7 votes
2 answers
21k views

Get balance of a specific token in python using web3.py on polygon network

I am trying to get the balance in my wallet of specific tokens with no luck. I have found examples online on how to do this task using web3.js, but the methods used seem to be different. I also found ...
michael's user avatar
  • 73
6 votes
1 answer
2k views

Failed to get EIP-1559 fees error when deploying to ZkEVM polygon using Foundry

I have this error Failed to get EIP-1559 fees after running this command forge script script/BricksCore.s.sol:BricksCoreScript --rpc-url $POLYGON_ZKEVM_RPC_URL --broadcast My script : contract ...
noro meb's user avatar
  • 358
6 votes
4 answers
15k views

Error: network does not support ENS

I am currently trying to build an NFT Marketplace and trying to establish a connection with alchemy-mumbai using JsonRpcProvider. I keep getting this error and can't figure out what i need to do: ...
jf13's user avatar
  • 61
6 votes
0 answers
128 views

Best way to store and verify data onchain for offchain data integrity?

I have a web2 application that stores some information in database rows, however, I would like to store this information on-chain for data integrity, particularly on polygon. What is the best way to ...
Neo's user avatar
  • 161
5 votes
7 answers
18k views

How can I get USDT/USDC for Polygon Mumbai Testnet?

I am working on a DeFi application on Polygon (Mumbai Testnet), and want to integrate stablecoins like USDT or USDC. I have looked for a faucet of USDT and USDC, and found none of them on POLYGON ...
Megabyte's user avatar
5 votes
2 answers
5k views

Listen for all the events of a smart contract with ethers.js polygon

What I would like to know is if there is a way to continuously listen for a single contract and fetch all the events emitted in real time. What I was able to find right now are ways of listening for ...
colo's user avatar
  • 53
5 votes
1 answer
10k views

HardhatError: HH110: Invalid JSON-RPC response received: {"statusCode":404,"error":"Not Found","message":"Not Found"}

i am using hardhat to deploy my contract on matic testnet. its compiling successfully but then give me this error: here is the code require("@nomiclabs/hardhat-waffle"); const fs = ...
stofu's user avatar
  • 93
5 votes
0 answers
598 views

How to use geth devp2p to find nodes on non-ethereum chains?

Non-ethereum chains: other chains use geth such as BSC or ethereum layer2 chains such as Polygon. I can find ethereum nodes with devp2p discv4 crawl -timeout 30m all-nodes.json But can't find Polygon ...
Cloud's user avatar
  • 161
4 votes
1 answer
6k views

Listen to events in the Polygon network using Web3.py

Just started looking at Web3 and I'm currently trying to listen for an event emitted by a smart contract on the Polygon network by using event_filter = contract.events.<MyEvent>.createFilter(...
Semper256's user avatar
  • 131
4 votes
3 answers
6k views

The same wallet address on the Mainnet Ethereum network and on the Polygon network. Are these two different wallets with two different owners?

I want to transfer some matic (Polygon network) to an Ethereum wallet address I know. But I don't know the address of this wallet on the Polygon network, I know its address on the Ethereum Mainnet. ...
solidsnake777's user avatar
4 votes
1 answer
2k views

Does smart contracts "sync" between Polygon and Ethereum?

I'm deploying my ERC721 application on the Ethereum network and, of course, fees are a concern. I'm considering giving my customers the option to execute the contract calls on Polygon as well for ...
sigmaxf's user avatar
  • 1,080
4 votes
2 answers
655 views

What is the difference between "Matic" and "Matic Token"?

I found "Matic Token". Contract Address: 0x0000000000000000000000000000000000001010 PolygonScan Link: https://polygonscan.com/token/0x0000000000000000000000000000000000001010 I have ...
ttt's user avatar
  • 97
4 votes
1 answer
259 views

Polygon mainnet has two official ERC20 Link token contract. Which one DEXs use when on polygon mainnet

I was going through the top erc20 token by marketcap on polygonscan. There I have found these two LINK tokens: https://polygonscan.com/token/0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39 ~ from polygon ...
Rishabh Raghwendra's user avatar
4 votes
2 answers
2k views

Why OpenSea Polygon proxy contract does not have transactions?

OpenSea basic integration tutorial for Polygon recommends to override the isApprovedForAll() function of ERC-721 contracts to this: /** * Override isApprovedForAll to auto-approve OS's proxy ...
GuiTeK's user avatar
  • 233
4 votes
4 answers
2k views

Can people do Sandwich Attack (MEV) on Polygon?

Can people do Sandwich Attack (MEV) on Polygon? I know that people use Flashbots to do MEV on ETH layer 1. But Flashbots is not available on L2 or other side chains. Can people actually do similar ...
Nick's user avatar
  • 75
4 votes
1 answer
291 views

How to prove root chain (Ethereum) NFT ownership from L2 (Polygon/Matic) Contract

I'm building a system that allows a user to "claim" a ERC1155 NFT on Polygon/Matic if they own a certain ERC1155 NFT on the root network (ethereum). My current solution works off-chain, by ...
turtlesoupy's user avatar
3 votes
3 answers
8k views

Unable to connect to polygon mumbai test network using truffle

I'm trying to use Polygon test network with truffle and I followed this document and youtube video to configure Polygon network for truffle. But when I'm trying to execute truffle deploy --network ...
metadata's user avatar
  • 260
3 votes
3 answers
736 views

How do nework bridges work e.g. ethereum to polygon/matic bridge

I understand what a bridge does but I 'm interested in knowing how it works under the hood. How does it work when transferring assets from one network to another. Lets take for example the ethereum to ...
rjs's user avatar
  • 131
3 votes
1 answer
2k views

Deploying a solidity smart contract to polygon matic

I'm new to blockchain development and smart contracts. I've learned to create smart contracts with Solidity and deploy them on the Ethereum network. I'm planning to transition to polygon because of ...
vajad57's user avatar
  • 205
3 votes
1 answer
1k views

How does polygon deal with Eth values within smart contracts?

I want to deploy a Smart Contract to Polygon. My contract takes 0.01 eth to pay for some digital goods. When deploying to Polygon, the native currency of the chain is not Eth anymore, but Matic, so if ...
sigmaxf's user avatar
  • 1,080
3 votes
1 answer
1k views

Is there an Ethers.js equivalent of Low, Medium, High gas preferences?

I'm finding polygon main network transfers to be quite slow, taking ~5 minutes on average. If I execute them on polygonscan directly, I can speed them up by setting the gas preference slider to High ...
yspreen's user avatar
  • 171
3 votes
1 answer
859 views

Native coin MATIC has a Contract Address on the Polygon Network?

I am currently developing a donation smart contract for the Polygon blockchain. The donation contract should receive many types of coins like (MATIC, USDT, USDC, etc.). I first made the donate ...
azvast's user avatar
  • 141
3 votes
1 answer
191 views

What real EIP-1559 base fee on polygon chain?

When I call the fee_history method from the web3 library, the polygon node returns a non-null EIP-1559 base fee. Request on eth_feeHistory returns response: {'jsonrpc': '2.0', 'id': 0, 'result': {'...
FRiMN's user avatar
  • 131
3 votes
0 answers
600 views

How to set manual gas limit for a specific transaction (using hardhat, polygon test and main network)?

How to set manual gas limit when deploying(mint) in case of a specific transaction (using hardhat, polygon test and main network)?
naive2022's user avatar
2 votes
2 answers
162 views

Extract the amounts(t0, t1) for non-current tick from Uniswap v3 Pool

I want to get the amounts of the tokens for a tick range which is higher or lower than the current tick. For example I have current tick: -282986 with range [-282990, -282980], I want to get the ...
KunLun's user avatar
  • 197
2 votes
1 answer
294 views

How to estimate gas cost for a polygon zk evm transaction?

I understand how to estimate gas cost for L2s like Arbitrum and Optimism because their documents provide some details, e.g. total gas cost = L1 poster fee + L2 network fee. But I really cannot find ...
Felix's user avatar
  • 21
2 votes
2 answers
5k views

How can I decode the event log I receive in my txn where there more than 1 smart contract involved and the emitted event cannot be found in ABI

I'm trying to build a dapp using the lens protocol and I'm struggling to find the right way to decode the event logs. Scenario: I'm trying to publish the post using the POST method in the proxy ...
Harrish Selvarajah's user avatar
2 votes
3 answers
1k views

What is the current size of a copy of the entire Polygon Mainnet chain?

I want to know the total size (in GB or TB) of the database on a node that has a copy of the entire Polygon Mainnet chain, so I can allocate resources for a production instance. How can I know that? I ...
Falcon Stakepool's user avatar
2 votes
2 answers
224 views

Reading events from layer 2 blockchains

I'm planning to query a tx using a tx hash on Ethereum and get the events/logs to find out the recipient and sender of the ETH. Is it possible to do so for L2 blockchains like Optimism, ZkSync, ...
att's user avatar
  • 165
2 votes
1 answer
1k views

How to get gas estimate and gas price on Polygon Mumbai Chain using web3.py?

I have deployed a contract on Goerli test net and used the following to get the estimated gas and current gas price. contract = web3.eth.contract(address=contract_address, abi=contract_abi) ...
Sam11's user avatar
  • 63
2 votes
2 answers
353 views

USDC EIP-3009 Ethereum and Polygon code mismatches

We're implementing gasless transactions and we need eip3009 transfer With Authorisation call. We're interested in USDC. I see some mismatches in USDC code on ethereum and polygon. To be accurate in ...
Oleh's user avatar
  • 23
2 votes
2 answers
182 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,528
2 votes
1 answer
2k views

Alchemy - replacement transaction underpriced

SC: 0x3c445903aCa6c4d1B55357Fb9F8e22252899478A I simply try to mint() on Polygon Mumbai but I had to workaround "replacement transaction underpriced", I still can't see any pending/unmined ...
ibox's user avatar
  • 61
2 votes
4 answers
443 views

How to deploy a contract in Rinkeby, Ehereum, Polygon and Fantom with the same address?

I have noticed by doing some tests that when I publish the same contract on different networks, the address is the same. Then, the "Etherscan" of each network show a link to blockscan.com ...
Extrange planet's user avatar
2 votes
3 answers
1k views

Unable to get events in Polygon's test network

I want to get the address of an event for a contract I created in mumbai test network, but I get the following error Error: Internal JSON-RPC error. { "message": "Blockheight too far ...
Piesuke's user avatar
  • 21
2 votes
2 answers
7k views

Are Ethereum Addresses the same as Polygon?

On OpenSea, I can sell my NFTs on Polygon (MATIC) to lower gas fees. Whenever the NFT is resold, I can specify a royalty to be received by certain wallets. When I create a collection, it prompts me ...
EllipticalInitial's user avatar
2 votes
1 answer
301 views

Is there a tool to verify that the metadata of my NFT is correct?

I am creating a collection of NFTs and I want to test that the metadata and the media files are correct. I am setting tokenURI on chain. How can I do this? I am using Polygon Mumbai.
Falcon Stakepool's user avatar
2 votes
1 answer
63 views

How can I show Nfts minted in other contracts in my NFT Marketplace?

I want to create a NFT Marketplace website where people can list and buy NFTs. It will be multi-chain supporting both Polygon and Ethereum chains. It will accept both ERC721 & ERC1155 tokens. I ...
Nirban Chakraborty's user avatar
2 votes
1 answer
3k views

How to get the private key from seed phrase and account number generated by Coinbase Commerce?

I have: my 12-word seed phrase an account address (0x..) associated with this seed phrase I don't, however, have the private key to that specific account. Is there any way to retrieve the private ...
Shanzid Shaiham's user avatar
2 votes
1 answer
318 views

Deploying one smart contract to two blockchains (ethereum and polygon)

I am thinking to deploy one smart contract to two blockchains(polygon and ethereum) because I want the minter to be able to select a blockchain on my website. What will happen to the collection on ...
engr.kristian's user avatar
2 votes
1 answer
1k views

Web3.py Transaction with hash ХХХ not found

I have a issues. I need to receive a receipt for transaction "0x7a695820b6491b767308c45776e1da5445c7a2edac29aa14d916bda834d47c31" on Polygon, in which the Klima Token contract was created. ...
Denis's user avatar
  • 31
2 votes
1 answer
435 views

Trying to switch dapp to MATIC

I'm trying to switch a dapp to MATIC/Polygon. I get this strange error: Something went wrong: Error: Internal JSON-RPC error. { "details": "Unauthorized method: net_listening.", &...
Dugu's user avatar
  • 23
2 votes
1 answer
243 views

What's Wrong With My Polygon Mainnet Aave Flashloan Script? - Fail with error '27' & Fail with error 'ERC20: transfer amount exceeds balance'

I have successfully deployed and executed a flashloan on the Polygon network in testnet and have since adapted it for mainnet. On Mainnet it compiles and gets deployed with no problem, but when I ...
Peter's user avatar
  • 23
2 votes
0 answers
258 views

How can I create a one-off address to receive a USDT payment on the BSC or MATIC network?

I want people on my Node.js website to be able to buy my products with USDT, so I'm trying to set it up with web3.js. When users want to make a payment, I want them to select a network (such as BSC or ...
Dunskie Ogorskie's user avatar
2 votes
1 answer
28 views

An event with unclear purpose and data emitted in transactions

I've observed this in multiple txs I've looked at, so, here's a random one on Polygon Mumbai: link. It contains several emitted events, the last of which is this: What is this event and how to ...
Iaroslav's user avatar
  • 365
2 votes
0 answers
78 views

Confidential Transactions on Polygon Network

I can see that Polygon Network has integrated zero knowledge proof based rollup technology using Hermez Network. I can also understand that Polygon is working on zkEVM based prover and verifier system....
Gokul Alex's user avatar
2 votes
0 answers
572 views

Polygon Marlin MEV don't work with python

I'm trying to send 3 transections with MEV Marlin using web3-flashbots. But if i'm trying to use example.py code from here(https://github.com/flashbots/web3-flashbots), i have a error with web3....
404's user avatar
  • 33
2 votes
1 answer
208 views

Base fee determination in Polygon / tâtonnement

I am currently stuck in my understanding of the base fee pricing. According to the [wiki](https://ethereum.org/en/developers/docs/gas/#block-sizestrong text) of the Ethereum mainnet, the base fee is ...
aimbotter21's user avatar

1
2 3 4 5
10