Irys-xyz / arweave-js-sdk

JS SDK for Irys on Arweave
111 stars 96 forks source link

Can't fund uploads on Boba Rinkeby test network #36

Closed giraffekey closed 2 years ago

giraffekey commented 2 years ago

When using this code:

const provider = new ethers.providers.Web3Provider(window.ethereum)
const bundlr = new WebBundlr(
      "https://devnet.bundlr.network",
      "boba",
      provider,
      { providerUrl: "https://rinkeby.boba.network" },
)
await bundlr.ready()
const price = await bundlr.getPrice(file.size)
await bundlr.fund(price)

MetaMask will request you to send testnet ETH to an address. This transaction will confirm and deplete ETH from your account, however, one of two errors will normally cause the code to fail at bundlr.fund.

One error is "Tx 0x2a994320700ca1597f8d838fac282017094832b900d214cc085c66ca2f2cd497 didn't finalize after 30 seconds".

The other error is "HTTP Error: Posting transaction 0x7b1d1f6bc857cae8d82563ff1749fa1dcb2bdf4e75befd78893164624c7bb2df information to the bundler: 400 Invalid tx"

If you check here or here you will see the transactions actually did go through.

Attempting to create a Bundlr transaction will always result in an error saying there are not enough funds, even though funds are being removed from the user's account. So this seems to be an issue with the devnet RPC. Perhaps it's checking transactions from the wrong RPC or block explorer?

joshbenaron commented 2 years ago

What version of the client are you using? There were some changes made in 0.7.0

joshbenaron commented 2 years ago

Note if you're using boba ETH then you should pass in "boba-eth". If you're using the BOBA token then pass in "boba"

giraffekey commented 2 years ago

Hi I just had to upgrade the client from 0.6.4 to 0.7.1 and change to "boba-eth" and it worked.