Skip to content
New issue

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

Internal Server Error #127

Open
yuzhongrong opened this issue Jan 28, 2024 · 0 comments
Open

Internal Server Error #127

yuzhongrong opened this issue Jan 28, 2024 · 0 comments

Comments

@yuzhongrong
Copy link

yuzhongrong commented Jan 28, 2024

`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"}',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant