{
response: {
status: 400,
statusText: 'Bad Request',
data: {
message: 'Insufficient funds: 0.048 ETH required but -0.23780863393604 ETH are available.'
}
},
message: 'Request failed with status code 400',
request: { path: '/txs', method: 'POST' }
}
Above mentioned error is received when trying to make a transaction through the Relay on Goerli test network. (usually works but error is thrown often at unpredictable intervals).
Official docs say " Relayers on the Goerli and Rinkeby networks will be automatically funded with test ETH upon creation, and will be topped up when they run low on funds."
(https://docs.openzeppelin.com/defender/relay)
Ideally the relay should not run out of gas.
Environment
Openzepplin Relay (Goerli test network)
Details
Code to reproduce
import {
DefenderRelaySigner,
DefenderRelayProvider,
} from "defender-relay-client/lib/ethers";
const relayCredentials = {
apiKey: getenv.string("RELAY_API_KEY"),
apiSecret: getenv.string("RELAY_API_SECRET"),
};
const relayProvider = new DefenderRelayProvider(relayCredentials);
const relaySigner = new DefenderRelaySigner(relayCredentials, relayProvider, {
speed: "fastest",
});
const contract = new ethers.ContractFactory(
abi,
bytecode,
relaySigner
).attach(address);
const tx = await contract.function(params);