arweave-nft-uploader is a Python tool to improve the experience of uploading NFTs to the Arweave storage for use with the Metaplex Candy Machine.

Overview

arweave-nft-uploader

arweave-nft-uploader is a Python tool to improve the experience of uploading NFTs to the Arweave storage for use with the Metaplex Candy Machine.

The tool has an additional (optional) feature to manage complex NFTs with multiple asset files (e.g. a PNG and an SVG). See more about it in this section.

This tool is for experienced users. I decline any responsibility for unneeded expenses caused by the incorrect usage of this tool. Read this guide carefully before using it.

Prerequisites

Installing

To install this tool run:

pip install -U git+https://github.com/0xEnrico/arweave-nft-uploader.git

Creating the Metaplex Candy Machine

The Metaplex Candy Machine can be created in the standard way, with a few differences in the command line and the asset folder, since we will manage the upload ourselves:

  • Prepare a which should contain only the first asset: 0.json and 0.png. Do NOT put other assets in that directory.
  • Initialize the Candy Machine program with the addition of the -n switch that specifies the total number of NFTs that will be uploaded, with a command line like this (for other command line options please refer to the Metaplex Candy Machine documentation):
ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts upload <single asset directory> -n <total number of NFTs> --keypair <Solana keypair file> --env <Solana cluster env name>

Uploading assets to Arweave

From the same folder where you run candy-machine-cli.ts, you can invoke this command to start the upload from the which should contain ALL assets to be uploaded:

arweave-nft -e <Solana env name> -k <Arweave wallet json file> <full assets dir>

e.g.:

arweave-nft -e mainnet-beta -k my_arweave_wallet.json /path/to/my/asset/dir

Invoke arweave-nft -h to get a full list of the available options:

usage: arweave-nft [-h] [-e ENV] [-k KEYPAIR] [-v] [-c CACHE_NAME] [--force-upload] [--assets-from-json] directory

positional arguments:
  directory             Directory containing images named from 0-n

optional arguments:
  -h, --help            show this help message and exit
  -e ENV, --env ENV     Solana cluster env name (default: "devnet")
  -k KEYPAIR, --keypair KEYPAIR
                        Arweave wallet location (default: "--keypair not provided")
  -v, --verbose         increase output verbosity
  -c CACHE_NAME, --cache-name CACHE_NAME
                        Cache file name (default: "temp")
  --force-upload        Force upload all assets, even the ones that have already been uploaded
  --assets-from-json    If this flag is specified, assets file names are read from properties.files.uri/type (e.g. for
                        uploading both png and svg), instead of the default pair NNN.json/NNN.png

In case you get an error like this at the end, it could be caused by upload errors or invalid asset structure in the json file:

WARNING There have been 6 upload errors. Please review them and retry the upload with the same command

Please review the preceeding errors, fix the json files content if needed, then run arweave-nft again with the same command line to retry.

At the end, you should get this message, and you can proceed to the next section:

INFO Upload complete! Now you can update the index with 'candy-machine-cli.ts upload' using the full assets directory (see documentation)

Rebuilding the Candy Machine index

After the upload has completed successfully, you need to rebuild the Candy Machine index.

This time you have to run candy-machine-cli.ts upload using the :

ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts upload <full assets directory> -n <total number of NFTs> --keypair <Solana keypair file> --env <Solana cluster env name>

⚠️ When you run this command, the command prompt MUST be in the same folder where you ran it previously to create the Candy Machine. ⚠️

Failure to do this will incur in unneeded expenses as you will recreate the Candy Machine and start upload assets through the Candy Machine itself.

The only thing you need to change is the argument of the command from to .

If you have done everything correctly at this point, it will not re-upload.

You will see a very quick Processing file log:

Processing file: 0
Processing file: 50
Processing file: 100
...
Processing file: 850
Processing file: 900
Processing file: 950

Then a slower set of Writing indices lines:

Writing indices 0-9
Writing indices 10-19
Writing indices 20-29
...
Writing indices 970-979
Writing indices 980-989
Writing indices 990-999
Done. Successful = true.

At this point the process is complete, and you can run candy-machine-cli.ts verify:

ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts verify --keypair <Solana keypair file> --env <Solana cluster env name>

If you have followed everything correctly, verify will succeed for all files, and your upload will be done!

Complex NFTs with multiple asset files

You can upload complex NFTs with multiple asset files using the --assets-from-json option.

Your json files must contain a files section like the one below, where you specify the asset files (in this example 0.png and 0.svg, which must be in the same directory as the json file) in the uri fields and the corresponding MIME type in the type fields:

"properties": {
    "files": [
        {
            "uri": "0.png",
            "type": "image/png"
        },
        {
            "uri": "0.svg",
            "type": "image/svg+xml"
        }
    ],
...

arweave-nft-uploader will manage the upload of all the referenced files and will create a correct json file on the Arweave blockchain with all the links.

Donations

If this project provides you a smoother experience while uploading your NFT assets to Arweave, I will appreciate a small donation to my Arweave wallet :)

bxQ7fygEV2meOp_z_3TZyy-VWbSCuzYRWnIE0FANQZo
Owner
0xEnrico
Old school developer in crypto space
0xEnrico
Bot Maker For Discord - Python Edition

BMFD-PE Bot Maker For Discord - Python Edition BMFD-PE is a new version of BMFD write in Python The Version of BMFD-PE is : alpha0.1 Longer support :

Téo 2 Dec 22, 2021
Thread-safe Python RabbitMQ Client & Management library

AMQPStorm Thread-safe Python RabbitMQ Client & Management library. Introduction AMQPStorm is a library designed to be consistent, stable and thread-sa

Erik Olof Gunnar Andersson 167 Nov 20, 2022
A Open source Discord Token Grabber with several very useful features coded in python 3.9

Kiwee-Grabber A Open source Discord Token Grabber with several very useful features coded in python 3.9 This only works on any python 3.9 versions. re

Vesper 40 Jan 01, 2023
A python bot that will allow you to have maximum luck during Veve drops.

VeveBot You can follow me here Github | Twitter Features: - Click on the purchase at the time of the drop. - Be able to choose to do more than one tes

Rodz 1 Dec 04, 2021
Barbot is a discord bot made from discord.py and python, barbot is most to fun and roleplay for servers!

BarBot Main source of barbot Overview Barbot is a discord bot made from discord.py and python, barbot is most to fun and roleplay for servers! Links i

AlexyDaCoder 3 Nov 28, 2021
Telegram Bot to store Posts and Documents and it can Access by Special Links.

File-sharing-Bot Telegram Bot to store Posts and Documents and it can Access by Special Links. I Guess This Will Be Usefull For Many People..... 😇 .

Code X Botz 1.2k Jan 08, 2023
A Telegram bot written in python.

telegram_bot This bot is currently a beta project. Features A telegram bot which can: Send current COVID-19 cases/stats of Germany Send current worth

HuhnCares 1 Jan 11, 2022
A simple python discord bot with commands for moderation and utility.

Discord Bot A simple python discord bot with commands for moderation, utility and fun. Moderation $kick user reason - Kick a user from the server

syn 3 Feb 06, 2022
This discord bot will help you to control your target through PickleC2

PickleC2-Bot This discord bot will help you to control your target through PickleC2 WHAT's a PickleC2? PickleC2 is a simple C2 framework written in py

4 Jun 25, 2022
We propose the adversarial blur attack (ABA) against visual object tracking.

ABA We propose the adversarial blur attack (ABA) against visual object tracking. The ICCV link: https://arxiv.org/abs/2107.12085 and, https://openacce

Qing Guo 13 Dec 01, 2022
Free and Open Source Machine Translation API. 100% self-hosted, no limits, no ties to proprietary services. Built on top of Argos Translate.

LibreTranslate Try it online! | API Docs Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it doesn't rely on pro

UAV4GEO 3.5k Jan 03, 2023
Buy early bsc gems with custom gas fee, slippage, amount. Auto approve token after buy

Buy early bsc gems with custom gas fee, slippage, amount. Auto approve token after buy. Sell buyed token with custom gas fee, slippage, amount. And more.

Jesus Crypto 206 May 01, 2022
Mark Sullivan 66 Dec 13, 2022
An Anime Theme Telegram group management bot. With lot of features.

Emilia Project Emilia-Prjkt is a modular bot running on python3 with anime theme and have a lot features. Easiest Way To Deploy On Heroku This Bot is

ZenitsuID #M•R•T™ 3 Feb 03, 2022
CloudFormation Drift Remediation - Use Cloud Control API to remediate drift that was detected on a CloudFormation stack

CloudFormation Drift Remediation - Use Cloud Control API to remediate drift that was detected on a CloudFormation stack

Cloudar 36 Dec 11, 2022
Telegram Bot to learn English by words and more.. ( in Arabic )

Get the mp3 files Extract the mp3.rar on the same file that bot.py on install requirements pip install -r requirements.txt #Then enter you bot token

Plugin 10 Feb 19, 2022
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources.

A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.

Donne Martin 11.1k Jan 04, 2023
SEMID - OSINT module with lots of discord functions

SEMID Framework About Semid is a framework with different Discord functions and

Hima 20 Sep 23, 2022
Desktop Backup Client for Borg

Vorta Backup Client Vorta is a backup client for macOS and Linux desktops. It integrates the mighty BorgBackup with your desktop environment to protec

BorgBase.com 1.5k Jan 03, 2023
Okaeri Robot: a modular bot running on python3 with anime theme and have a lot features

OKAERI ROBOT Okaeri Robot is a modular bot running on python3 with anime theme a

Dream Garden (rey) 2 Jan 19, 2022