0 votes
1 view
in Blockchain by (12.8k points)

from __future__ import print_function

import time

import swagger_client

from swagger_client.rest import ApiException

from pprint import pprint

# create an instance of the API class

api_instance = swagger_client.TestnetNTP1Api()

body = swagger_client.IssueTokenRequest() # IssueTokenRequest | Object representing the token to be created


    # Builds a transaction that issues a new NTP1 Token






    body.metadata({"token_name": "STST", "issuer": "Septio", "description": "Septio_Test"})    

    api_response = api_instance.testnet_issue_token(body)


except ApiException as e:

    print("Exception when calling NTP1Api->issue_token: %s\n" % e)

Im trying to have fun testing possibilities of NEBL, issuing tokens and stuff like that. What am I doing wrong?

I get such error:

raise ValueError("Invalid value for issue_address, must not be  None") # noqa: E501

ValueError: Invalid value for issue_address, must not be None

1 Answer

0 votes
by (29.8k points)

Hi, what you need is Metadata naming the tokens and the API docs need to be updated to reflect this.

You want something like this:

body = swagger_client.IssueTokenRequest(
    issue_address = "TUfp4Ss95xaKQPNGpbiZDsMPe4NR16CDiL",
    amount = 10000,
    divisibility = 0,
    fee = 1000030000,
    reissuable = False,
    metadata = swagger_client.IssueTokenRequestMetadata(
        token_name = "TEST",
        issuer = "Me",
        description = "My test token"
)  # IssueTokenRequest | Object representing the token to be created

Welcome to Intellipaat Community. Get your technical queries answered by top developers !