Skip to main content
14 votes
Accepted

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

try to add suffix --legacy in forge script Note The solution works for zkSync as well.
TIROGEN's user avatar
  • 156
11 votes
Accepted

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

I've gotten some assets for polygon mumbai here: https://faucet.paradigm.xyz/ Including DAI/wETH/MATIC. Should be able to trade those for USDC/USDT. From a quick search, can trade for USDT on Mumbai ...
Kyle Baker's user avatar
9 votes
Accepted

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

You need the token's ABI and utilize the function balanceOf. Example snippet below: token = w3.eth.contract(address={token address}, abi={token abi}) # declaring the token contract token_balance = ...
bru53001's user avatar
  • 721
9 votes
Accepted

Listen to events in the Polygon network using Web3.py

For future readers, apparently Polygon does not support eth_newFilter so a way to get events thru Web3 is subscribing to logs (currently available thru Web3.js) or using get_logs (if u wanna do it in ...
Semper256's user avatar
  • 131
8 votes
Accepted

How to properly implement a ContractURI for on-chain NFTs

It seems like my setContractURI function had one encodepacket too much. it looks like it is working now on OpenSea. function setContractURI(string memory contractURI_) public onlyOwner() { ...
Martijn Vissers's user avatar
7 votes

Why is transaction reverting with no additional error details?

"output": "0x4e487b710000000000000000000000000000000000000000000000000000000000000011" 0x01: If you call assert with an argument that evaluates to false. 0x11: If an arithmetic ...
gazoblock's user avatar
  • 346
7 votes
Accepted

Metamask: wallet_addEthereumChain is not working when using polygon mainet but works with polygon mumbai

Try to convert to hex the chainId with web3.utils.toHex() function: chainId = '137'; chainId = web3.utils.toHex(chainId); chainData = [{ chainId: chainId, chainName: 'Matic(Polygon) Mainnet', ...
Extrange planet's user avatar
6 votes
Accepted

Unable to connect to polygon mumbai test network using truffle

After updating the RPC endpoint to https://rpc-mumbai.maticvigil.com from https://rpc-mumbai.matic.today in truffle-config.js it started working fine. It seems that Polygon team updated the RPC ...
metadata's user avatar
  • 260
6 votes

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

Short Answer: Polygon PoS can be considered as a combination of sidechain and layer2 solution because it is a separate chain that has its own consensus mechanism but also uses the main Ethereum layer ...
Rosen Santev's user avatar
5 votes
Accepted

How does polygon deal with Eth values within smart contracts?

So in Solidity programming the term "Ether" mean 10^18 (For example: 5 ETHER = 5*10^18 = 5000000000000000000) So regarding the programming side of things, it does not see Ether as the ...
AvocadoChocolate's user avatar
5 votes
Accepted

Deploying a solidity smart contract to polygon matic

Difference between ETH and Polygon smart contracts There is none. Polygon runs barely modified GoEthereum, same as Ethereum mainnet, which runs EVM virtual machine. Your smart contracts are ...
Mikko Ohtamaa's user avatar
5 votes
Accepted

How to swap wETH for ETH on Polygon network?

First of all, the "eth" asset exists in different forms across Ethereum and Polygon. For each blockchain, we have one utility token and other erc20 compliant tokens (+ other standards). ...
razgraf's user avatar
  • 790
5 votes

Error: network does not support ENS

This might be the same problem here. The address that you use might be invalid (e.g. space/numbers accidentally added to address). In this case, your smartcontract address is invalid
Oracion's user avatar
  • 51
4 votes

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

Since Blockchains are basically closed silos of publicly stored information. They cannot communicate with the outside world using HTTP or other data transfer protocols directly. Someone has to handle ...
Liberalite's user avatar
4 votes
Accepted

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

EDIT: The code below does not work. Due to some networks returning gasPrices with precision in the single wei dimension, just multiplying it by 1.x doesn't give a whole number value as a result. I ...
yspreen's user avatar
  • 171
4 votes

Error: network does not support ENS

I was facing this issue because I was paasing wrong CONTRACT_ADDRESS while creating the contract. Check that you have passed the correct CONTRACT_ADDRESS
byteZorvin's user avatar
4 votes

Error: network does not support ENS

This error can sometimes throw if a contract address you are using contains an erroneous space like so: let CONTRACT_ADDRESS = '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 ';
Barney Chambers's user avatar
4 votes
Accepted

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

A blockchain doesn't exclusively have to be one or the other - it can be both a sidechain and a layer-2. They aren't opposites. A sidechain refers to a blockchain which has it's own consensus ...
Janac Meena's user avatar
4 votes
Accepted

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

Most of the time its same. But not always. Polygon Mainnet have made its own chain, which is seperate from Ethereum chain. When we create wallet by wallet providers like metamask the wallet address of ...
aakash4dev's user avatar
4 votes

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

In Polygon zkEVM the gas fee is calculated by applying a fixed factor over L1 gas fee. That price factor is a fixed value and doesn't change often and it's value is based the rollup's cost to publish ...
Maario's user avatar
  • 198
4 votes

Unable to verify contracts on polygon Amoy testnet

I've asked regarding this issue on OKLink Discord channel, and they've responded. So, the correct configuration to be used in the hardhat.config.js would be: etherscan: { apiKey: { ...
SYED ASAD KAZMI's user avatar
3 votes
Accepted

Why would Pending transactions disappear?

Miners decide how long they keep pending/queued transactions. If they disappear on polygonscan, it only means that polygonscan no longer has it, but other miners could still have them. There are three ...
Undead8's user avatar
  • 3,610
3 votes
Accepted

Retrieving Matic Reward Rates on AAVE with a Python script

So I solved the problem. There were two mistakes: For the "REWARD_DECIMAL" and the "TOKEN_DECIMAL" I should use 10 to the power of the number, and not the numbers themselves. ...
Dji enne's user avatar
3 votes

I wonder where this hack started from

TLDR : cancel your allowance for WETH to contract 0x9bf475e0654ec615b473599c9d39ddd87b01e894 and it wont happen again. https://polygonscan.com/address/0x9bf475e0654ec615b473599c9d39ddd87b01e894#code ...
Foxxxey's user avatar
  • 4,337
3 votes
Accepted

Does smart contracts "sync" between Polygon and Ethereum?

1 - Do I have to redeploy the contract on the Polygon network or does it automatically sync with the Ethereum Mainnet after it is deployed? Polygon and Ethereum are separate blockchains and do not ...
Mikko Ohtamaa's user avatar
3 votes

Metamask: wallet_addEthereumChain is not working when using polygon mainet but works with polygon mumbai

import { utils } from 'ethers'; const networkMap = { POLYGON_MAINNET: { chainId: utils.hexValue(137), // '0x89' chainName: "Matic(Polygon) Mainnet", nativeCurrency: { name: &...
jwu's user avatar
  • 187
3 votes

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

The ABI posted to Mumbai implementation contract is probably lacking. Take transaction 0x32e3230a7478315092a04ef57fc2426947ec5031c6977c7b184e7bcd02be9216 for instance, if you look at Mumbai Explorer ...
Kof's user avatar
  • 2,964
3 votes

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

The only way I found so far is (that still works): Create a developers account on Circle (here) and get an API key Use their demo app to add balance to your account available here or use their ...
Augusto's user avatar
  • 31
3 votes

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

A significant difference between layer 2 and sidechain - Sidechains have security mechanisms of their own. Layer 2 solutions derive their security from their parent blockchain while using their own ...
adiaholic's user avatar
3 votes

How to add a logo or icon for erc20 crypto token?

ERC20 tokens have optional metadata of name, symbol and decimals (for details see: https://eips.ethereum.org/EIPS/eip-20 558). Token icons and any other metadata are not part of the specification. ...
Jeremiah Haremza's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible