I have a program that works fine in Rinkeby and Mainnet but not in Polygon.
The program is to query the burn event of ERC721. I use ethers.js.
const BurnEvent = erc721Contract.filters.Transfer(
ownerAddress,
"0x0000000000000000000000000000000000000000",
tokenId
);
await erc721Contract.attach(lock.nftContractAddress).queryFilter(BurnEvent, 0, "latest");
Is there any difference between Polygon and Rinkeby/Mainnet network?
I have already enabled Polygon extension and registered my credit card.
Also, do I have any mistakes with the command below to query the data below from the curl?
https://explorer-mainnet.maticvigil.com/tx/0xd4fec0e73bda001db13d69e66ae1b79ce7c70aa34b4c3943fec51f15ac2cb3c9/logs
ccurl https://polygon-mainnet.infura.io/v3/<my-key>\
-X POST \
-H "Content-Type: application/json" \ -d
'{"jsonrpc":"2.0","method":"eth_getLogs","params": [{"fromBlock":"0x10000",
"address":"0x5D17AC41E53f80eA28AF53014E474b4F227809ed" , "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000003639f46a7c2060fff60c9020bdcc92055a9af1cc","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000002"]}],"id":1}'
I get this error
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"request failed or timed out"}}curl: (3) URL using bad/illegal format or missing URL