Is there any guidance on how much buffer we should allow when applying funding before sending transactions? In particular, the following does not seem sufficient:
const bytes = bundlrTransactions.reduce((c, d) => c + d.data.length, 0);
const cost = await bundlr.utils.getPrice('solana', bytes);
await bundlr.fund(cost.toNumber());
for (const tx of bundlrTransactions) {
await tx.upload();
}
The upload will fail with Not enough funds to send data in @bundlr-network/client/build/src/upload.js:221:23 and no other diagnostics
In my particular test, the number of bytes was small (<50kb) and multiplying the cost (<1e-5 SOL) by 2 was sufficient but it would be great to have specifics. Thanks!
Bundlr nodes update their price information multiple times a minute, so applying an extra ~20% of the value (for smaller amounts) to account for value volatility should be sufficient in most cases
Is there any guidance on how much buffer we should allow when applying funding before sending transactions? In particular, the following does not seem sufficient:
The upload will fail with
Not enough funds to send data
in@bundlr-network/client/build/src/upload.js:221:23
and no other diagnosticsIn my particular test, the number of bytes was small (<50kb) and multiplying the cost (<1e-5 SOL) by 2 was sufficient but it would be great to have specifics. Thanks!