I am trying to implement flashbots when sending transactions and I am getting: the method eth_callBundle does not exist/is not available. This when I use https://builder0x69.io/ as my relay.
When I use https://relay.flashbots.net I get: Request failed with status 400 (URL: https://relay.flashbots.net): {“error”:“unable to decode txs”}
This is where I am setting it up:
async function initializeFlashbotsProvider() {
const flashbotsProvider = await FlashbotsBundleProvider.create(
provider,
signer,
‘https://builder0x69.io/’,
‘mainnet’
);
return flashbotsProvider;
}
const signedBundle = await flashbotsProvider.signBundle([
{
chainID: 1,
signer: signer,
transaction: {
to: contractAddress,
data: contract.interface.encodeFunctionData(‘sendTran’, [
token,
token 2
]),
gasLimit: gasLimit,
maxPriorityFeePerGas: ethers.parseUnits(“55”, “gwei”),
maxFeePerGas: ethers.parseUnits(“55”, “gwei”),
},
},
]);
const blockNumber = await provider.getBlockNumber();
console.log("This part works 1")
const simulation = await flashbotsProvider.simulate(signedBundle, blockNumber + 1);
Please help