{"id":19358532,"url":"https://github.com/paritytech/nfts-campaign-runner","last_synced_at":"2026-02-07T16:31:16.970Z","repository":{"id":42005545,"uuid":"472178800","full_name":"paritytech/nfts-campaign-runner","owner":"paritytech","description":"a cli tool to automate running NFT airdrop campaign workflows for substrate-uniques-pallet in bulk","archived":false,"fork":false,"pushed_at":"2024-07-19T07:11:24.000Z","size":668,"stargazers_count":17,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-28T00:33:01.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-21T03:53:50.000Z","updated_at":"2024-02-29T13:11:13.000Z","dependencies_parsed_at":"2025-04-23T11:43:26.783Z","dependency_job_id":null,"html_url":"https://github.com/paritytech/nfts-campaign-runner","commit_stats":null,"previous_names":["paritytech/nfts-campaign-runner"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paritytech/nfts-campaign-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fnfts-campaign-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fnfts-campaign-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fnfts-campaign-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fnfts-campaign-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/nfts-campaign-runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fnfts-campaign-runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29199743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T16:28:23.579Z","status":"ssl_error","status_checked_at":"2026-02-07T16:28:22.566Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T07:12:12.318Z","updated_at":"2026-02-07T16:31:16.946Z","avatar_url":"https://github.com/paritytech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nfts-campaign-runner\n\nThis CLI tool allows to mint NFTs in bulk and creates NFT gift secret codes which can be claimed using the [NFTs claim app](https://github.com/paritytech/claim-nft) \non [Kusama](https://claimnft.kusama.network) or [Polkadot](https://claimnft.polkadot.network).\n\n## Install\n\nTo install the tool, clone this repo:\n\n```bash\n# Clone the repository\ngit clone https://github.com/paritytech/nfts-campaign-runner.git\ncd nfts-campaign-runner\n```\n\nand install the npm package from the project directory.\n\n```bash\nnpm install -g .\n```\n\n## Define a workflow\n\nTo define a workflow you need to provide the cli with a workflow `.json` file which can be created based on the following template:\n\n```json\n{\n  \"network\": {\n    \"provider\": \"\u003cprovider e.g. wss://polkadot-asset-hub-rpc.polkadot.io\u003e\",\n    \"accountSeed\": \"\u003cthe minter/admin account seed\u003e\",\n    \"proxiedAddress\": \"\u003cin case the account is a proxy for another account, the address of the proxied/primary account\u003e\"\n  },\n  \"pinata\": {\n    \"apiKey\": \"\u003cPinataApiKey\u003e\",\n    \"secretApiKey\": \"\u003cPinataSecretApiKey\u003e\"\n  },\n  \"collection\": {\n    \"id\": \"\u003cleave an empty string to create a new collection or put the collection's id to continue minting into that collection\u003e\",\n    \"startItemId\": 0,\n    \"metadata\": {\n      \"imageFile\": \"\u003cPath to the image file that is used for collection metadata\u003e\",\n      \"videoFile\": \"\u003cPath to the video file that is used for collection metadata\u003e\",\n      \"name\": \"\u003cthe value for the name field in collection metadata\u003e\",\n      \"description\": \"the value for the description field in collection metadata\"\n    }\n  },\n  \"item\": {\n    \"data\": {\n      \"csvFile\": \"\u003ca csv file that contains the items data\u003e\",\n      \"offset\": \"\u003cthe row offset, if not specified it starts from row 0\u003e\",\n      \"count\": \"\u003cthe number of rows to be used after offset, if not specified it will count up to the last row.\u003e\"\n    },\n    \"batchSize\": \"\u003cthe number of transactions that are being sent in a batch. default to 100 if not specified\u003e\",\n    \"metadata\": {\n      \"imageFile\": \"\u003cthe full path to the media file that contains the NFT image file\u003e\",\n      \"videoFile\": \"\u003cthe full path to the media file that contains the NFT video file\u003e\",\n      \"name\": \"the value for the name field in the item metadata\",\n      \"description\": \"the value for the description field in the item metadata\"\n    }\n  }\n}\n```\n\nNote:\n\n- the _proxiedAddress_ is optional, and if is provided the account that is derived from the _accountSeed_ will act as a proxy account for that address and all the extrinsic calls will be sent as a proxy call on behalf of the _proxiedAddress_.\n- The data file specified by `item.data.csvFile` is a csv file, which the number of rows in the file specifies the maximum number of items that will be minted. If specified, the combination of offset and count determines the actual number of items that are going to be minted.\n- The offset specifies the first row number in the csv datafile that the items will be minted from that row up to the specified count.\n- If the calculated row numbers fall outside of the number of rows in the csv file (e.x. `offset+count-1 \u003e last_row_number_in_the_file`) the minting will stop after the last row number.\n- The `item.metadata.imageFile` specifies the file path that contains the media file that is going to be minted.\n- The `item.metadata.videoFile` specifies the file path that contains the video file that is going to be minted. Has the same naming format as `item.metadata.imageFile`.\n- the values surrounded by `\u003c\u003c` and `\u003e\u003e` will be filled from the columns of the data `.csv` file. e.g. for the\n  path example: `/Users/user/nfts/\u003c\u003cimage name\u003e\u003e.png` the `\u003c\u003cimage name\u003e\u003e` will be replaced with the value from the \"image name\" column for each row in the csv datafile.\n  Additionally, you can use an empty template: `/Users/user/nfts/\u003c\u003c\u003e\u003e.png` in which the `\u003c\u003c\u003e\u003e` will be replaced with the row numbers for each row.\n\n## Using the CLI\n\n### Running a workflow\n\nTo run the workflow you need to execute the cli with `run ` subcommand while passing a workflow configuration as a `.json` file to the command.\n\n```\nuniqcamp run \u003cpath to workflow.json\u003e\nor\nnpm run uniqcamp -- run \u003cpath to workflow.json\u003e\n```\n\nThere is also an optional parameter available for the dry-run. It will validate the workflow without running the workflow and submitting transactions.\n\n```\nuniqcamp run --dry-run \u003cpath to workflow.json\u003e\n```\n\nAfter the minting process is complete a final `.csv` data file will be generated at the same path as input datafile (specified by `item.data.csvFile`), This final data file will include the gift secret codes as well some more information.\n\n### Minting to a known address list\n\nFor cases when we don't want to generate and pre-fund new accounts, there is an option to mint to a predetermined receivers list.\n\n```\nuniqcamp run --with-preset-address \u003cpath to workflow.json\u003e\nor\nnpm run uniqcamp -- run --with-preset-address \u003cpath to workflow.json\u003e\n```\n\n### Setting or changing the item metadata\n\nIn some cases, it might be needed to set or change the metadata for the items after the collection items are minted. For those cases, the cli also provides an `update-metadata` subcommand. This subcommand is very similar to the `run` subcommand as it also takes the path to a workflow .json file as argument, but unlike the `run` subcommand that goes through the whole workflow, `update-metadata` only sets the metadata based on the information specified in the workflow, assuming the collection and items are already created.\n\n### burn-reap\n\nThis command can be used to burn the unclaimed NFTs and reap the initial funds from unclaimed secrets and transfer the funds back to the original account. The command basically goes through all the gift secrets listed in the `.csv` file that is specified by the `item.data.csvFile` in the workflow, and for each unclaimed secret (secrets that their recipient has not claimed its NFT) it will burn the unclaimed NFTs. It will also transfer all the funds from that gift secret to the original account that is specified by `network.accountSeed`.\n\n## Checkpoints\n\nThe workflow is checkpointed at each step, in case it is halted at any point during the process due to any failures, you can take it from where you left and continue it from the last successful checkpoint by running the cli again.\n\n# examples\n\nFor sample workflows check the example folder.\n\n- The _simple_ folder includes a csv with no information and mints 10 NFTs with no customized metadata.\n- The advanced folder includes a csv with multiple columns and uses the data from csv columns to create customized NFTs, with customized metadata and different images and videos for each NFT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fnfts-campaign-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fnfts-campaign-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fnfts-campaign-runner/lists"}