File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ a stake verification key::
8585An address object could also be created from an address string directly::
8686
8787 >>> address = Address.from_primitive("addr_test1vr2p8st5t5cxqglyjky7vk98k7jtfhdpvhl4e97cezuhn0cqcexl7")
88+ >>> byron_address = Address.from_primitive("Ae2tdPwUPEZFRbyhz3cpfC2CumGzNkFBN2L42rcUc2yjQpEkxDbkPodpMAi")
8889
8990
9091An enterprise address does not have staking functionalities, it is created from a payment verification key only::
Original file line number Diff line number Diff line change @@ -2466,3 +2466,23 @@ def test_skip_utxo_with_script(chain_context):
24662466 tx_builder .add_input_address (addr )
24672467 with pytest .raises (UTxOSelectionException ):
24682468 tx_builder .build ()
2469+
2470+ def test_byron_addr_output (chain_context ):
2471+ tx_builder = TransactionBuilder (chain_context )
2472+ sender = "addr_test1vrm9x2zsux7va6w892g38tvchnzahvcd9tykqf3ygnmwtaqyfg52x"
2473+
2474+ byron1 = "DdzFFzCqrhsxrgB6w6VhgfAqUZ69Va583murc21S4QFTJ6WUHAh4Gk8t1QHofpza5MZxG4dNVQWe8q78h4Utp9MGBQHBLD54rz6CTLsm"
2475+ byron2 = "Ae2tdPwUPEZFRbyhz3cpfC2CumGzNkFBN2L42rcUc2yjQpEkxDbkPodpMAi"
2476+
2477+ # Add sender address as input
2478+ tx_builder .add_input_address (
2479+ sender
2480+ ).add_output (
2481+ TransactionOutput .from_primitive ([byron1 , 500000 ])
2482+ ).add_output (
2483+ TransactionOutput .from_primitive ([byron2 , 1500000 ])
2484+ )
2485+
2486+ tx_body = tx_builder .build ()
2487+ assert str (tx_body .outputs [0 ].address ) == byron1
2488+ assert str (tx_body .outputs [1 ].address ) == byron2
You can’t perform that action at this time.
0 commit comments