Environment
Polygon Mainnet with MATICDetails
Code to reproduce
Environment
Polygon Mainnet with MATICDetails
Code to reproduce
Hi @krcnow,
Could you share the error you are getting?
Having the same issue. Except my problem is with Polygon Mumbai.
Did you ever figure out what the problem was?
Hi @mpaler,
Are you using the relayer via the API or from with an Autotask? Do you mind sharing your code also?
Hi @dylkil
I was trying to use Alchemy as a provider as follows:
// Entrypoint for the Autotask
export async function handler(event) {
// Pull in alchemy node api key from Defender secrets store.
// const { alchemyMumbai } = event.secrets;
// Initialize defender relayer provider and signer
//const provider = new ethers.providers.AlchemyProvider(network="maticmum", alchemyMumbai);
// Uncomment to use the native defender provider, instead of Alchemy or Infura.
const provider = new DefenderRelayProvider(event);
const signer = new DefenderRelaySigner(event, provider, { speed: 'fast' });
return main(signer);
}
It worked locally when I upped the local version of Ethers.
I'm almost certain the problem was with the Ethers version provided by OZ Defender.
Please compare the versions alchemy-provider.js
OZ Defender version 5.0.13
Current Ethers release 5.5.3
Hope that helps.
Thanks for sharing your code and doing some digging, it does look like ethers version is whats causing your issue. We will look into bumping it to latest.
@dylkil curious if you have an update on the status of this?
@mpaler this issue should be resolved now, apologies for not getting back sooner
From the error message, it seems like there might be an issue with the authentication process for the API key. Have you checked that the API key is valid and properly authorized for the Polygon Mainnet environment?
In terms of testing, try implementing UAT (User Acceptance Testing) to ensure that your code works properly before deploying it to the live environment. what is uat testing? UAT testing involves testing your software in a real-world scenario with end-users to ensure that it meets their needs and expectations. It can help to identify issues and improve the overall user experience.
Hi @dylkil I am facing same issue.. we are on free tier.. created a new relayer for Amoy testnet, deployed contracts, added api keys and secrets, but we get
raised a new forum thread here -