We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`const flashbotsProvider = await FlashbotsBundleProvider.create( provider, authSigner, // 使用主网 Flashbots,需要把下面两行删去 'https://relay-sepolia.flashbots.net/', 'sepolia' );
// EIP 1559 transaction const transaction0 = { chainId: 11155111, type: 2, to: "0xC1c4301C5bd4eBe2C04817aC815AaceB4DeDA8DB", value: ethers.utils.parseEther("0.001"), maxFeePerGas: GWEI * 100n }
// 5. 创建交易 Bundle const transactionBundle = [ { signer: wallet, // ethers signer transaction: transaction0 // ethers populated transaction object } // 也可以加入mempool中签名好的交易(可以是任何人发送的) // ,{ // signedTransaction: SIGNED_ORACLE_UPDATE_FROM_PENDING_POOL // serialized signed transaction hex // } ]
// 6. 模拟交易,交易模拟成功后才能执行 // 签名交易 const signedTransactions = await flashbotsProvider.signBundle(transactionBundle) // 设置交易的目标执行区块(在哪个区块执行) const targetBlockNumber = (await provider.getBlockNumber()) + 1 // 模拟 const simulation = await flashbotsProvider.simulate(signedTransactions, targetBlockNumber)`
the resualt log :
body: '{"error":"Internal Server Error"}',
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`const flashbotsProvider = await FlashbotsBundleProvider.create(
provider,
authSigner,
// 使用主网 Flashbots,需要把下面两行删去
'https://relay-sepolia.flashbots.net/',
'sepolia'
);
// EIP 1559 transaction
const transaction0 = {
chainId: 11155111,
type: 2,
to: "0xC1c4301C5bd4eBe2C04817aC815AaceB4DeDA8DB",
value: ethers.utils.parseEther("0.001"),
maxFeePerGas: GWEI * 100n
}
// 5. 创建交易 Bundle
const transactionBundle = [
{
signer: wallet, // ethers signer
transaction: transaction0 // ethers populated transaction object
}
// 也可以加入mempool中签名好的交易(可以是任何人发送的)
// ,{
// signedTransaction: SIGNED_ORACLE_UPDATE_FROM_PENDING_POOL // serialized signed transaction hex
// }
]
// 6. 模拟交易,交易模拟成功后才能执行
// 签名交易
const signedTransactions = await flashbotsProvider.signBundle(transactionBundle)
// 设置交易的目标执行区块(在哪个区块执行)
const targetBlockNumber = (await provider.getBlockNumber()) + 1
// 模拟
const simulation = await flashbotsProvider.simulate(signedTransactions, targetBlockNumber)`
the resualt log :
body: '{"error":"Internal Server Error"}',
The text was updated successfully, but these errors were encountered: