Moralis giving cors policy error after WalletConnect v2 update


After the WalletConnect v1 was closed I updated the project with the code update in your link. However, after this code, when I want to communicate with any SmartContract using fetch code from useWeb3ExecuteFunction in react-moralis library, I constantly get the following error;

Access to XMLHttpRequest at '' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I’ve read other posts on the forum, but haven’t been able to find the right solution. Can you help me?

Note: My project’s database is still on Moralis and I’m still using moralis-v1.

Hi, this might happen when you hit the rate limit. To avoid errors like this you can add your own node in the configs

What is rate limit? How do I find out how much I’ve used? Is it calculated monthly or daily? When I auth with metamask through the browser, I have no problems. But why can’t I run the same smartcontract functions when I auth with walletconnect?

PS: I only have this info in moralis panel: “99.99% CU Remaining”. I am a pro plan user on moralis.

It isn’t really a rate limit issue, the rate limit is per minute, that wallet connect endpoint is limited to work only for auth now, not also for smart contract interactions.

If you replace the RPC url with a different RPC url, even a public one, then it may work to also call smart contract functions.