Aller au contenu principal

๐Ÿš€ Token Airdrop

๐Ÿšจ Read Before ๐Ÿšจโ€‹

Create Tokenโ€‹

from lunespy.tx.issue import issue_token_factory
from lunespy.wallet import wallet_factory

sender = wallet_factory()

tx = issue_token_factory(
description="This Token Is Not Real, Only Test",
sender_public_key=sender.public_key,
timestamp=1650250375987,
name="My Test Token",
reissuable=True,
quantity=10000,
decimals=8
)

Sign Transactionโ€‹

tx.sign(sender.private_key)

Broadcast Transactionโ€‹

tx.broadcast()

Full Exampleโ€‹

from lunespy.tx.issue import issue_token_factory
from lunespy.wallet import wallet_factory

sender = wallet_factory()

tx = issue_token_factory(
# public key of sender
sender_public_key=sender.public_key,
# discription about your token, max size of 1000 char
description="This Token Is Not Real, Only Test",
# name of your Token
name="My Test Token",
# total supply of this token
quantity=10000,
# token fractionability, default is 8 (0.00000001)
decimals=8,
# pass True if you want to reissue more of this token in the future
reissuable=True,
# if you want to send a different fee amount, the default is 100000000 (1 Lunes)
fee=100000000
)

tx.sign(
# private key of sender for sign the transaction
sender.private_key
)

tx.broadcast(
# url or ip:port of the node that will broadcast the transaction,
# (MAINNET) is https://lunesnode.lunes.io (defaul)
# (TESTNET) https://lunesnode-testnet.lunes.io
node = "https://my-full-node.com"
)