Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Implement upload #7

Closed
3 of 10 tasks
MantisClone opened this issue Oct 11, 2022 · 0 comments · Fixed by #19 or #45
Closed
3 of 10 tasks

Implement upload #7

MantisClone opened this issue Oct 11, 2022 · 0 comments · Fixed by #19 or #45
Assignees

Comments

@MantisClone
Copy link
Owner

MantisClone commented Oct 11, 2022

Try to upload the file without storing to filesystem. Should stream it ideally.

When user calls upload assume that they've already approved our EOA to withdraw WETH from their account.

Required Workflow

  1. Validate upload request
  2. Validate quote ID, nonce, and signature
  3. Double-check that quote is still valid by calling Bundlr.price(bytes)
  4. Return 200
  5. Set quote status to 2
  1. Fund our EOA's Bundlr Account using Bundlr.fund()
  2. Set quote status to 3
  3. Set quote status to 4
  4. Download the file(s) from the URI(s)
  5. Upload the file(s) to Arweave using Bundlr.upload(file)
  1. Set quote status to 5

Note
Update quote status in database throughout.

Note
Consider combining step 4 and 5. Stream downloaded file straight into Bundlr

Failure Modes

  • Invalid Upload request
  • Price to upload exceeds quote
  • File length exceeds quote
  • approval amount too low
  • Node RPC not reachable
  • File size exceeds Bundlr funds
  • ...

Stretch Goal: Withdraw leftover funds after upload.
See for details: https://github.com/users/MantisClone/projects/1/views/1

@MantisClone MantisClone moved this from Todo to In Progress in Arweave Upload Microservice Oct 17, 2022
@MantisClone MantisClone linked a pull request Oct 18, 2022 that will close this issue
@MantisClone MantisClone self-assigned this Oct 18, 2022
@MantisClone MantisClone linked a pull request Oct 20, 2022 that will close this issue
Repository owner moved this from In Progress to Done in Arweave Upload Microservice Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
2 participants