i've previously created an Autotask connected to a relayer to process my meta transactions.
It was working properly for around 2 to 3 months than suddenly it started producing errors on each Smart contract method call.
async function relay(forwarder, request, signature) {
console.log('--- Relay started ---');
try {
console.log('relay validation request and sign ', request, signature);
const valid = await forwarder.verify(request, signature);
if (!valid) throw new Error(`Invalid request`);
const gasLimit = (parseInt(request.gas) + 50000).toString();
const tx = await forwarder.execute(request, signature, { gasLimit });
console.log('relay validation success with tx hash', tx.hash);
return tx;
} catch (error) {
console.log('Error in relay: ', error);
throw new Error('Failed to relay transaction');
}
}
In this snippet above, it is throwing an error on this line of code
const valid = await forwarder.verify(request, signature);
The error says:
Error: Unhandled
at DefenderRelayProvider.send (/opt/nodejs/node_modules/defender-relay-client/lib/ethers/provider.js:58:31)
It was working very fine until suddenly this error pops out !!
Any help please !!!