After deploy a NFT smart contract on Elrond Blockchain, I'm trying to issueToken using snippets:
erdpy --verbose contract call ${ADDRESS} --recall-nonce --pem=${ALICE} --gas-limit=${GAS_LIMIT} \
--function="issueToken" \
--value ${MINT_COST} \
--arguments ${ISSUE_TOKEN_ARGUMENTS} \
--proxy=${PROXY} --chain=${CHAINID} --send \
--outfile="${MY_LOGS}/issueToken.json"
}
but I get the error "invalid token index"
Since the token issue is managed by the smart contract you're calling (because you are calling the
issueToken
endpoint of that contract), the most likely cause is that you're not passing the correct parameters to theissueToken
endpoint.You have to know first what parameters does your contract expect for that endpoint, then pass them hex encoded according to the expected format.
For your specific case, if the endpoint signature looks like this:
then the $ISSUE_TOKEN_ARGUMENTS should contain something like this: