doug
@pfeffunit
I have to figure out how to post a batch of assets to Arweave once a year and it's always painful to sort out again. Here's how. If anyone has a better idea please share! 1. Make an Arweave wallet if you don't have one. I guess https://www.wander.app/ is the one. 2. You need $AR. I transfer Eth to Ar via https://simpleswap.io. There's a storage calculator you can use to figure out how much $AR you need at https://ar-fees.arweave.dev/. 3. Install the Arweave CLI: https://github.com/ardriveapp/ardrive-cli 4. You'll need to export that wallet from Wander, you can get a JSON from it. 5. Create a Drive: `ardrive create-drive --wallet-file your-wallet.json --public --drive-name "Lucky Ghouls"` 6. That's going to return a few values including its ID, you need that ID.
2 replies
3 recasts
24 reactions
doug
@pfeffunit
7. Upload your images: `ardrive upload-file --local-path /your-images --parent-folder-id <DRIVE_ID> --wallet-file your-wallet.json` 8. This will put `your-images` in your Drive. 9. Create a Manifest: ardrive create-manifest -f <DRIVE_ID> --wallet-file your-wallet.json Great! Now all your images are accessible in that single directory. e.g, https://zk2wipqvqlavjz3tdh4hz6ibye3w5anz3b7bqbed3oqbzyoqnncq.arweave.net/yrVkPhWCwVTncxn4fPkBwTdugbnYfhgEg9ugHOHQa0U/images/999.png NOW DO THE WHOLE THING AGAIN WITH YOUR JSON, and finally set that root directory as the baseURI on your contract.
1 reply
0 recast
4 reactions
doug
@pfeffunit
Oh and be sure to use the `ar://hash` style in your NFT metadata, not the HTTPS URLs that the manifest gives you. Then the NFT marketplaces know to use the Arweave protocol which is supposed to last forever, rather than just a normal HTTPS gateway that could go away.
3 replies
0 recast
5 reactions
doug
@pfeffunit
ALSO you the ID you upload files to, that's the "rootFolderId" you can get if you run "list-all-drives". I guess you can make multiple folders per drive but i just made a drive for each folder.
0 reply
0 recast
3 reactions
Drew Volpe
@drew
When you write it all down, it’s pretty comical everything you have to get just right to do something very simple.
1 reply
0 recast
3 reactions
JonnieSparkles
@jonniesparkles
This is the way! And we're working to make "ar://" even more robust: https://docs.ar.io/concepts/wayfinder
1 reply
0 recast
0 reaction