It looks like a simple problem where I just used the wrong nonce. But that’s not the case.
As you can see, the wallet currently only has one transaction with a nonce of 0: https://etherscan.io/address/0x65f3ffef2ee2f9c7b5b587625594881c5bdf34bf
But before making that transfer, I needed to send another transaction in block 25180924 (13 blocks before I made the transaction that exists in the wallet)
I sent the transaction as follows:
const req = {
jsonrpc: "2.0",
method: "eth_sendPrivateTransaction",
id: 1,
params: [{
tx: signedTx,
maxBlockNumber: `0x${maxBlockNumber.toString(16)}`,
preferences: {
fast: true,
privacy: {
hints: ["calldata"],
builders: [
"flashbots", "f1b.io", "rsync", "beaverbuild.org", "builder0x69", "Titan", "EigenPhi",
"boba-builder", "Gambit+Labs", "payload", "Loki", "BuildAI", "JetBuilder",
"tbuilder", "penguinbuild", "bobthebuilder", "BTCS", "bloXroute", "Blockbeelder",
"Quasar", "Eureka"
]
}
}
}]
};
const bodyText = JSON.stringify(req);
const messageSignature = await signer.signMessage(ethers.id(bodyText));
const signature = `${signer.address}:${messageSignature}`;
const res = await fetch("https://relay.flashbots.net", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Flashbots-Signature": `${signature}`
},
body: JSON.stringify(req),
});
The transaction was sent, but it returned a “FAILED” status, as you can see https://protect.flashbots.net/tx/0x562cef71e39d7bafbafb73590e041b528913a1655e16fa57d48697c9ffd87d71
SimError shows “NonceTooLow,” but that doesn’t make much sense since nonce 0 was correct (I later tried the initial transaction, and it worked with nonce 0)
Has anyone else experienced this, or do you know what actually causes this type of mismatch error to occur?
Thanks in advance