CLI Introduction

The CLI tools is a standard Node CLI program which you can install using the npm package manager. It is best to install it globally by:

npm install elven-tools -g

What is it?

  • The CLI tool helps to:
    • deploy the NFT or SFT minter Smart Contract on the MultiversX blockchain
    • interact with the NFT or SFT minter Smart Contract on the MultiversX blockchain

For now it is designed to deploy contracts:

How does it work?

General how to:

  • npm install elven-tools -g
  • elven-tools --version or elvent-tools -v
  • elven-tools --help or elven-tools -h - for getting the commands on the root level
  • elven-tools nft-minter --help or elven-tools sft-minter -h - for getting all the commands for the subcommand

Steps for deploying and interacting with the Smart Contract:

Check the detailed steps here: Jump start section.

Be aware that, by default, all will happen on the devnet. See here how to change it.

Check all commands here

Custom configuration options

All of the configuration options are set by default, so you don't have to configure them if you will accept the defaults.

Below is an example of a .elventoolsrc config file with default values. You don't have to change the config.ts file. It is for library usage. .elventoolsrc is the only config file that should be used. It is not required if you will work on the devnet. In other cases, you would need to have it. It should be located in the same directory from which the elven-tools commands are triggered. The same directory as the one where the walletKey.pem file is located. Again, remember that you don't need to provide all these values. They are defaults. You need to provide values when you want to overwrite something.

{
  "chain": "devnet",
  "apiProviderEndpoint": "https://devnet-api.multiversx.com",
  "gatewayProviderEndpoint": "https://devnet-gateway.multiversx.com",
  "txWatcherTimeout": 90000,
  "txWatcherPatience": 0,
  "nftMinterSc": {
    "version": "{tag version here or branch name, for example: v1.2.0}",
    "deployNftMinterSC": "<nft_minter_smart_contract_address_here> when you want to switch between chains or you want to use the cli as buyer",
    "tokenSellingPrice": "<price_of_the_nft_here> when you want to switch between chains or you want to use the cli as buyer",
    "deployGasLimit": 80000000,
    "issueCollectionTokenGasLimit": 80000000,
    "issueValue": "0.05",
    "assignRolesGasLimit": 80000000,
    "issueTokenFnName": "issueToken",
    "setLocalRolesFnName": "setLocalRoles",
    "mintBaseGasLimit": 12500000,
    "mintFnName": "mint",
    "giveawayBaseGasLimit": 12100000,
    "giveawayFnName": "giveaway",
    "setDropFnName": "setDrop",
    "setUnsetDropGasLimit": 5000000,
    "unsetDropFnName": "unsetDrop",
    "pauseUnpauseGasLimit": 4500000,
    "pauseMintingFnName": "pauseMinting",
    "unpauseMintingFnName": "startMinting",
    "setNewPriceGasLimit": 4500000,
    "setNewPriceFnName": "setNewPrice",
    "shuffleFnName": "shuffle",
    "shuffleGasLimit": 5000000,
    "getTotalTokensLeftFnName": "getTotalTokensLeft",
    "getProvenanceHashFnName": "getProvenanceHash",
    "getDropTokensLeftFnName": "getDropTokensLeft",
    "getNftPriceFnName": "getNftPrice",
    "getNftTokenIdFnName": "getNftTokenId",
    "getNftTokenNameFnName": "getNftTokenName",
    "getCollectionTokenNameFnName": "getCollectionTokenName",
    "getMintedPerAddressTotalFnName": "getMintedPerAddressTotal",
    "getTokensLimitPerAddressTotalFnName": "getTokensLimitPerAddressTotal",
    "getMintedPerAddressPerDropFnName": "getMintedPerAddressPerDrop",
    "getTokensLimitPerAddressPerDropFnName": "getTokensLimitPerAddressPerDrop",
    "changeBaseCidsFnName": "changeBaseCids",
    "changeBaseCidsGasLimit": 5000000,
    "setNewTokensLimitPerAddressFnName": "setNewTokensLimitPerAddress",
    "setNewTokensLimitPerAddressGasLimit": 5000000,
    "claimScFundsFnName": "claimScFunds",
    "claimScFundsGasLimit": 6000000,
    "allowlistBatchSize": 320,
    "populateAllowlistFnName": "populateAllowlist",
    "populateAllowlistBaseGasLimit": 6000000,
    "getAllowlistFnName": "getAllowlistSize",
    "isAllowlistEnabledFnName": "isAllowlistEnabled",
    "getAllowlistAddressCheckFn": "getAllowlistAddressCheck",
    "enableAllowlistFnName": "enableAllowlist",
    "disableAllowlistFnName": "disableAllowlist",
    "enableDisableAllowlistGasLimit": 6000000,
    "isDropActiveFunctionName": "isDropActive",
    "tokensPerOneTx": 95,
    "tokensPerOneGiveawayTx": 98,
    "clearAllowlistFnName": "clearAllowlist",
    "clearAllowlistBaseGasLimit": 5000000,
    "removeAllowlistAddressFnName": "removeAllowlistAddress",
    "removeAllowlistAddressLimit": 5000000,
    "isMintingPausedFnName": "isMintingPaused",
    "getTotalSupplyFnName": "getTotalSupply",
    "getTotalSupplyOfCurrentDropFnName": "getTotalSupplyOfCurrentDrop"
  },
  "sftMinterSc": {
    "version": "{tag version here or branch name, for example: v0.1.0}",
    "deployNftMinterSC": "<nft_minter_smart_contract_address_here> when you want to switch between chains or you want to use the cli as buyer",
    "deployGasLimit": 40000000,
    "issueTokenFnName": "issueToken",
    "issueCollectionTokenGasLimit": 60000000,
    "issueValue": "0.05",
    "setLocalRolesFnName": "setLocalRoles",
    "assignRolesGasLimit": 60000000,
    "createGasLimit": 20000000,
    "createTokenFnName": "createToken",
    "buyGasLimit": 20000000,
    "buyTokenAmountFnName": "buy",
    "setNewPriceFnName": "setNewPrice",
    "setNewPriceGasLimit": 4500000,
    "tokenSellingPrice": "<price_of_the_amount_of_1_for_sft_here> when you want to switch between chains or you want to use the cli as buyer",
    "getTokenDisplayFnName": "getTokenDisplayName",
    "getPriceFnName": "getPrice",
    "getMaxAmountPerAddressFnName": "getMaxAmountPerAddress",
    "getCollectionTokenNameFnName": "getCollectionTokenName",
    "getCollectionTokenIdFnName": "getCollectionTokenId",
    "startSellingFnName": "startSelling",
    "startSellingGasLimit": 3000000,
    "pauseSellingFnName": "pauseSelling",
    "pauseSellingGasLimit": 3000000,
    "setNewAmountLimitPerAddressFnName": "setNewAmountLimitPerAddress",
    "setNewAmountLimitPerAddressGasLimit": 3000000,
    "getIsPausedFnName": "isPaused",
    "getAmountPerAddressTotalFnName": "getAmountPerAddressTotal",
    "getSftMintFnName": "mint",
    "mintGasLimit": 3000000,
    "getSftBurnFnName": "burn",
    "burnGasLimit": 3000000,
    "giveawayBaseGasLimit": 3500000,
    "giveawayFnName": "giveaway",
  },
  "minterDapp": {
    "version": "{tag version here, for example: v1.0.3}"
  },
  "collectionNftOwners": {
    "apiCallsPerSecond": 5
  },
  "distributeToOwners": {
    "apiCallsPerSecond": 5
  }
}

Whole config with default values: config.ts

Remember, you don't have to change the config.ts file. It is for library usage. You don't have to clone the repository to change the configuration. .elventoolsrc is the only config file that should be used.

Limitations and caveats

  • there are main limitations related to the Smart Contract. Remember that it is most likely that this CLI tool won't be used only in a way that everyone would want to, be aware that you can always change the names of the endpoints in the Smart Contract. Then you can also use the config file and change them here in the CLI
  • Smart Contract in version 1 doesn't have many mechanisms which will strongly limit unwanted behaviors. It only implements random minting, but in version 2, there will be more mechanisms for fair launches.

Issues and ideas

Please post issues and ideas here.

Contact

Contents