four-flap-meme-sdk 1.4.44 → 1.4.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -149,8 +149,9 @@ export async function holdersMaker(params) {
|
|
|
149
149
|
const gasWithBuffer = gasFeePerWallet * BigInt(GAS_BUFFER_MULTIPLIER);
|
|
150
150
|
const transferAmountPerWallet = buyAmountWei + gasWithBuffer;
|
|
151
151
|
console.log(`[HoldersMaker] 每个钱包分发: ${ethers.formatEther(transferAmountPerWallet)} BNB (买入 ${buyAmountPerHolder} + Gas ${ethers.formatEther(gasWithBuffer)})`);
|
|
152
|
-
// 4. 获取 Gas Price
|
|
153
|
-
const
|
|
152
|
+
// 4. 获取 Gas Price(支持小数 Gwei,如 0.1 Gwei)
|
|
153
|
+
const gasPriceWei = BigInt(Math.floor(gasPriceGwei * 1e9));
|
|
154
|
+
const gasPrice = await getOptimizedGasPrice(provider, { minGasPrice: gasPriceWei });
|
|
154
155
|
const bribeAmountWei = ethers.parseEther(String(bribeAmount));
|
|
155
156
|
// 5. 分批处理
|
|
156
157
|
const walletBatches = chunkArray(newWallets, maxWalletsPerBatch);
|