Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

#344 changes in 02_send_data.py #345

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/tutorials/02_send_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from pprint import pprint

# Declare an API object
api = Iota('https://nodes.devnet.iota.org:443', devnet=True)
api = Iota('https://nodes.devnet.iota.org:443')

# Prepare custom data
my_data = TryteString.from_unicode('Hello from the Tangle!')

# Generate a random address that doesn't have to belong to anyone
my_address = Address.random()
my_address = Address.random(81)

# Tag is optional here
my_tag = Tag(b'MY9FIRST9TAG')
Expand All @@ -22,7 +22,7 @@
)

# Send the transaction to the network
response = api.send_transfer([tx])
response = api.send_transfer([tx], min_weight_magnitude=9)

pprint('Check your transaction on the Tangle!')
pprint('https://utils.iota.org/transaction/%s/devnet' % response['bundle'][0].hash)
pprint('https://explorer.iota.org/legacy-devnet/transaction/%s' % response['bundle'][0].hash)