Questions tagged [polygon]

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

Filter by
Sorted by
Tagged with
10 votes
2 answers
3k 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, ...
4 votes
1 answer
12k 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 ...
  • 43
4 votes
1 answer
1k 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 ...
  • 960
4 votes
1 answer
22 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 ...
4 votes
1 answer
219 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 ...
3 votes
1 answer
875 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 ...
  • 960
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 ...
  • 185
3 votes
1 answer
541 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 ...
  • 151
3 votes
0 answers
103 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': {'...
  • 31
3 votes
1 answer
5k 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 = ...
  • 73
3 votes
0 answers
330 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 ...
  • 141
2 votes
3 answers
5k 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 ...
  • 252
2 votes
1 answer
4k 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(...
2 votes
1 answer
186 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 ...
2 votes
1 answer
363 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.", &...
  • 23
2 votes
1 answer
54 views

Why is token URI being updated on chain but not in Alchemy Web3?

I deployed a contract and minted 5 tokens under the ERC-1155 standard. After reading in multiple that you can replace old URI with a new one to update the metadata of a token, I tried to use my setURI ...
  • 21
2 votes
0 answers
340 views

Opensea isApprovedForAll / ProxyRegistry for Ethereum (Rinkeby) and Polygon (Mumbai)

Can somebody explain why there are different implementations suggested by OpenSea for the isApprovedForAll for Ethereum (Rinkeby) and Polygon (Mumbai). The Ethereum (Rinkeby) version from ...
2 votes
0 answers
93 views

Using more than one network in Hardhat script

I need to work with the Tokemak protocol, and some part of the project I'm developing needs to extract information from this contract in the Polygon network, and use it in my contract deployed on ...
2 votes
1 answer
2k views

How to get Görli test ETH? [duplicate]

I want to do some "buy tests" on OpenSea testnet, and it turns out that I need some ETH on the "mumbai" testnet of Polygon!! The official Polygon Faucet doesn't provide testnet ETH,...
  • 131
2 votes
0 answers
690 views

How can I get wrapped Ether on Polygon Mumbai?

how can I get Wrapped ETH (wETH) on Polygon Mumbai (Testnet)? I'd like to have some WETH in PolygonTestnet for further testings on OpenSea (Testnet-stage). How to archive this? The official Polygon ...
  • 124
2 votes
2 answers
968 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 ...
  • 203
2 votes
0 answers
353 views

how Set manual gas limit for specific transaction(using hardhat, polygon test and main network)?

how Set manual gas limit when deploying(mint) for specific transaction(using hardhat, polygon test and main network)?
2 votes
0 answers
747 views

Transfer an NFT token from Polygon to Ethereum - Solidity smart contract

I am new to blockchain development, NFT and Solidity and i need your help. I have fount this twit and this Polygon documentation Most of the assets are pre-existing on Ethereum chain. But new assets ...
2 votes
0 answers
148 views

Connecting to Polygon network with OpenEthereum

Have anyone already managed to connect OpenEthereum node to Polygon (mainnet or Mumbai testnet)? I seems to be technically possible. I need some kind of genesis.json file for these networks along with ...
2 votes
1 answer
595 views

Which contract does Opensea uses for polygon mumbai?

I've been testing buying NFT on Opensea. I've bought nft on rinkeby, which will trigger AtomicMatch of the underlying wyvern exchange contract. However, after I've done the same thing for Opensea ...
  • 309
2 votes
0 answers
381 views

Polygon Network Fraud Proofs - State change reversal

After doing some surface reading about the Polygon L2 side-chain. I was interested in what actually happens if a successful fraud proof is submitted?. To enhance the security of the transactions, ...
  • 1,540
1 vote
2 answers
3k views

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

Im trying to programmatically switch the metamask network of the user. Using wallet_addEthereumChain It's working fine when requesting a network change for Polygon mumbai, however it doesn't work when ...
1 vote
2 answers
2k views

Why is transaction reverting with no additional error details?

I don't understand how people can debug transactions when there are no error details shown. Here is a recent transaction I submitted to Polygon: As you can see, it doesn't in any way indicate what ...
1 vote
3 answers
64 views

NFT on polygon community mint or directly list to secondary market

Guys I am about to release an NFT art collection project with one influencer and his community. I am planning to mint all the 10000 items and list them on opensea (polygon). It will be easier for me ...
  • 73
1 vote
3 answers
1k 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. ...
1 vote
1 answer
400 views

Why would Pending transactions disappear?

I've been working on integrating with the Polygon blockchain programmatically (using Nethereum) but my contract interactions and send transactions all appear to be pending, then when I search for them ...
  • 13
1 vote
1 answer
753 views

Retrieving Matic Reward Rates on AAVE with a Python script

I am trying to build a Python script to retrieve different AAVE rates programmatically (borrow, lending, and rewards), on the Polygon blockchain (will be very similar for Ethereum). I am using Python. ...
1 vote
2 answers
41 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 ...
  • 13
1 vote
2 answers
176 views

How to use an Oracle to get a token value on Polygon? (Using web3.js)

I'm currently developing a simple project. After a payment is done, I call a smart contract to mint some coins and send them to a wallet. All good over there, but I need to know the value in USD of ...
1 vote
1 answer
289 views

How to deploy a contract on Polygon/Ethereum/BSC with shared state?

I would like to deploy an ERC-20 token on multiple chains : Ethereum, Polygon and the Binance Smart Chain while keeping the same address ideally. But I have literally zero idea on how to do that, I ...
1 vote
2 answers
5k 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 ...
  • 153
1 vote
1 answer
52 views

Remix not recognizing WMATIC address in an array

I am stuck trying to compile a contract using Remix. I am initializing an array as follows: address[] public wmaticToUsdcPath =[0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270, ...
  • 113
1 vote
1 answer
2k views

how are we sending funds on polygon through contract

I know it sounds like a basic question (it should be), despite that I could not find any clear reference to that in polygon's (Matic) docs on how does payable(address).call works pragma solidity ^0.7....
1 vote
2 answers
34 views

How to verify in PolygonScan correctly?

I am trying to verify a contract in Polygonscan. I flatten my contract, remove the constructors, compile in REMIX IDE without erros with Petesburg EVM version using enabling optimization (200). The ...
1 vote
1 answer
36 views

trasnsaction not confirmed forever at polygon mumbai

since a few weeks, I tried deploy contract on polygon mumbai by hardhat. but transcaction not confirmed for a while then timed out. so I set higher gas, gasprice, and time out limit. but nothing ...
  • 13
1 vote
1 answer
69 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 ...
  • 31
1 vote
1 answer
24 views

Minting ERC20 on ETH and Polygon

I am looking for creating an ERC20 smart contract on ETH and mapping it to Polygon. The idea is to have 100.000 tokens available in total and allow users to mint from both sides. Is this possible? I ...
1 vote
1 answer
55 views

In Polygon transaction ID of Sync-State transactions does not match Keccak-256(RLP(nonce,gasPrice,gasLimit,to,value,data,v,r,s)

Polygon has special “Sync-State” transactions added to the blocks https://polygonscan.com/address/0x0000000000000000000000000000000000000000 . Transaction hash returned by eth_getBlockByNumber does ...
  • 121
1 vote
2 answers
205 views

How to show my own contract name in Token Tracker field of an ERC1155 Contract?

I am developing an NFT Drop site contract. I want my NFT Contract to be named from ERC1155 to provide a name in the constructor. I have watched and followed many tutorials. They all work the same and ...
1 vote
1 answer
49 views

How I can make nfts fetching faster to show on frontend?

I'm creating a marketplace where at the homepage I need to show up all the nuts at once on the homepage. Is there way I can make loading faster? It takes a lot of time to fetch data from the chain. I'...
1 vote
1 answer
56 views

is there a way to extract smart contract code from bytecode?

I have deployed the smart contract into polygon mainnet but I do not have the smart contract code now, I only had the smart contract address. I have not 'verify and published ' after deploying the ...
1 vote
1 answer
985 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?
  • 1,003
1 vote
2 answers
4k views

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

I am working on DeFi application on Polygon (Mumbai Testnet), and want to integrate stable coin like USDT or USDC. I have looked into the faucet of USDT and USDC, and found none of them on POLYGON ...
1 vote
2 answers
1k 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 ...
1 vote
1 answer
387 views

How to enable meta-transactions for Polygon contract

I am going to enable meta-transactions for my contract (simple ERC1155 contract, truffle project) on Polygon network to be used by OpenSea, checked the following tutorials and contracts and understood ...
  • 31

1
2 3 4 5
7