@@ -59,9 +59,7 @@ def test_tx_builder(chain_context):
59
59
TransactionOutput .from_primitive ([sender , 500000 ])
60
60
)
61
61
62
- tx_body = tx_builder .build (
63
- change_address = sender_address , auto_validity = False , auto_required_signers = False
64
- )
62
+ tx_body = tx_builder .build (change_address = sender_address )
65
63
66
64
expected = {
67
65
0 : [[b"11111111111111111111111111111111" , 0 ]],
@@ -102,9 +100,7 @@ def test_tx_builder_with_certain_input(chain_context):
102
100
TransactionOutput .from_primitive ([sender , 500000 ])
103
101
)
104
102
105
- tx_body = tx_builder .build (
106
- change_address = sender_address , auto_validity = False , auto_required_signers = False
107
- )
103
+ tx_body = tx_builder .build (change_address = sender_address )
108
104
109
105
expected = {
110
106
0 : [[b"22222222222222222222222222222222" , 1 ]],
@@ -140,9 +136,7 @@ def test_tx_builder_multi_asset(chain_context):
140
136
)
141
137
)
142
138
143
- tx_body = tx_builder .build (
144
- change_address = sender_address , auto_validity = False , auto_required_signers = False
145
- )
139
+ tx_body = tx_builder .build (change_address = sender_address )
146
140
147
141
expected = {
148
142
0 : [
@@ -186,8 +180,6 @@ def test_tx_builder_raises_utxo_selection(chain_context):
186
180
with pytest .raises (UTxOSelectionException ) as e :
187
181
tx_body = tx_builder .build (
188
182
change_address = sender_address ,
189
- auto_validity = False ,
190
- auto_required_signers = False ,
191
183
)
192
184
193
185
# The unfulfilled amount includes requested (991000000) and estimated fees (161277)
@@ -224,9 +216,7 @@ def test_tx_small_utxo_precise_fee(chain_context):
224
216
225
217
# This will not fail as we replace max fee constraint with more precise fee calculation
226
218
# And remainder is greater than minimum ada required for change
227
- tx_body = tx_builder .build (
228
- change_address = sender_address , auto_validity = False , auto_required_signers = False
229
- )
219
+ tx_body = tx_builder .build (change_address = sender_address )
230
220
231
221
expect = {
232
222
0 : [
@@ -278,9 +268,7 @@ def test_tx_small_utxo_balance_pass(chain_context):
278
268
279
269
# Balance is smaller than minimum ada required in change
280
270
# Additional UTxOs are selected from the input address
281
- tx_body = tx_builder .build (
282
- change_address = sender_address , auto_validity = False , auto_required_signers = False
283
- )
271
+ tx_body = tx_builder .build (change_address = sender_address )
284
272
285
273
expected = {
286
274
0 : [
@@ -315,7 +303,7 @@ def test_tx_builder_mint_multi_asset(chain_context):
315
303
316
304
tx_builder = TransactionBuilder (chain_context )
317
305
sender = "addr_test1vrm9x2zsux7va6w892g38tvchnzahvcd9tykqf3ygnmwtaqyfg52x"
318
- sender_address = Address .from_primitive (sender )
306
+ sender_address : Address = Address .from_primitive (sender )
319
307
320
308
# Add sender address as input
321
309
mint = {policy_id .payload : {b"Token1" : 1 }}
@@ -326,9 +314,7 @@ def test_tx_builder_mint_multi_asset(chain_context):
326
314
tx_builder .native_scripts = [script ]
327
315
tx_builder .ttl = 123456789
328
316
329
- tx_body = tx_builder .build (
330
- change_address = sender_address , auto_validity = False , auto_required_signers = False
331
- )
317
+ tx_body = tx_builder .build (change_address = sender_address )
332
318
333
319
expected = {
334
320
0 : [
@@ -344,14 +330,16 @@ def test_tx_builder_mint_multi_asset(chain_context):
344
330
[
345
331
sender_address .to_primitive (),
346
332
[
347
- 5811267 ,
333
+ 5809683 ,
348
334
{b"1111111111111111111111111111" : {b"Token1" : 1 , b"Token2" : 2 }},
349
335
],
350
336
],
351
337
],
352
- 2 : 188733 ,
338
+ 2 : 190317 ,
353
339
3 : 123456789 ,
340
+ 8 : 1000 ,
354
341
9 : mint ,
342
+ 14 : [sender_address .payment_part .to_primitive ()],
355
343
}
356
344
357
345
assert expected == tx_body .to_primitive ()
@@ -370,9 +358,7 @@ def test_tx_add_change_split_nfts(chain_context):
370
358
TransactionOutput .from_primitive ([sender , 7000000 ])
371
359
)
372
360
373
- tx_body = tx_builder .build (
374
- change_address = sender_address , auto_validity = False , auto_required_signers = False
375
- )
361
+ tx_body = tx_builder .build (change_address = sender_address )
376
362
377
363
expected = {
378
364
0 : [
@@ -804,9 +790,7 @@ def test_excluded_input(chain_context):
804
790
805
791
tx_builder .excluded_inputs .append (chain_context .utxos (sender )[0 ])
806
792
807
- tx_body = tx_builder .build (
808
- change_address = sender_address , auto_validity = False , auto_required_signers = False
809
- )
793
+ tx_body = tx_builder .build (change_address = sender_address )
810
794
811
795
expected = {
812
796
0 : [[b"22222222222222222222222222222222" , 1 ]],
@@ -839,9 +823,7 @@ def test_build_and_sign(chain_context):
839
823
TransactionOutput .from_primitive ([sender , 500000 ])
840
824
)
841
825
842
- tx_body = tx_builder1 .build (
843
- change_address = sender_address , auto_validity = False , auto_required_signers = False
844
- )
826
+ tx_body = tx_builder1 .build (change_address = sender_address )
845
827
846
828
tx_builder2 = TransactionBuilder (
847
829
chain_context , [RandomImproveMultiAsset ([0 , 0 , 0 , 0 , 0 ])]
@@ -852,8 +834,6 @@ def test_build_and_sign(chain_context):
852
834
tx = tx_builder2 .build_and_sign (
853
835
[SK ],
854
836
change_address = sender_address ,
855
- auto_validity = False ,
856
- auto_required_signers = False ,
857
837
)
858
838
859
839
assert tx .transaction_witness_set .vkey_witnesses == [
@@ -910,7 +890,7 @@ def test_tx_builder_exact_fee_no_change(chain_context):
910
890
911
891
tx_builder .add_output (TransactionOutput .from_primitive ([sender , 5000000 ]))
912
892
913
- tx_body = tx_builder .build (auto_validity = False , auto_required_signers = False )
893
+ tx_body = tx_builder .build ()
914
894
915
895
tx_builder = TransactionBuilder (chain_context )
916
896
@@ -924,9 +904,7 @@ def test_tx_builder_exact_fee_no_change(chain_context):
924
904
TransactionOutput .from_primitive ([sender , input_amount - tx_body .fee ])
925
905
)
926
906
927
- tx = tx_builder .build_and_sign (
928
- [SK ], auto_validity = False , auto_required_signers = False
929
- )
907
+ tx = tx_builder .build_and_sign ([SK ])
930
908
931
909
expected = {
932
910
0 : [[b"11111111111111111111111111111111" , 3 ]],
@@ -962,9 +940,7 @@ def test_tx_builder_certificates(chain_context):
962
940
963
941
tx_builder .certificates = [stake_registration , stake_delegation ]
964
942
965
- tx_body = tx_builder .build (
966
- change_address = sender_address , auto_validity = False , auto_required_signers = False
967
- )
943
+ tx_body = tx_builder .build (change_address = sender_address )
968
944
969
945
expected = {
970
946
0 : [[b"11111111111111111111111111111111" , 0 ]],
@@ -1001,9 +977,7 @@ def test_tx_builder_withdrawal(chain_context):
1001
977
withdrawals = Withdrawals ({bytes (stake_address ): 10000 })
1002
978
tx_builder .withdrawals = withdrawals
1003
979
1004
- tx_body = tx_builder .build (
1005
- change_address = sender_address , auto_validity = False , auto_required_signers = False
1006
- )
980
+ tx_body = tx_builder .build (change_address = sender_address )
1007
981
1008
982
expected = {
1009
983
0 : [[b"11111111111111111111111111111111" , 0 ]],
@@ -1038,8 +1012,6 @@ def test_tx_builder_no_output(chain_context):
1038
1012
tx_body = tx_builder .build (
1039
1013
change_address = sender_address ,
1040
1014
merge_change = True ,
1041
- auto_validity = False ,
1042
- auto_required_signers = False ,
1043
1015
)
1044
1016
1045
1017
expected = {
@@ -1070,8 +1042,6 @@ def test_tx_builder_merge_change_to_output(chain_context):
1070
1042
tx_body = tx_builder .build (
1071
1043
change_address = sender_address ,
1072
1044
merge_change = True ,
1073
- auto_validity = False ,
1074
- auto_required_signers = False ,
1075
1045
)
1076
1046
1077
1047
expected = {
@@ -1106,8 +1076,6 @@ def test_tx_builder_merge_change_to_output_2(chain_context):
1106
1076
tx_body = tx_builder .build (
1107
1077
change_address = sender_address ,
1108
1078
merge_change = True ,
1109
- auto_validity = False ,
1110
- auto_required_signers = False ,
1111
1079
)
1112
1080
1113
1081
expected = {
@@ -1140,8 +1108,6 @@ def test_tx_builder_merge_change_to_zero_amount_output(chain_context):
1140
1108
tx_body = tx_builder .build (
1141
1109
change_address = sender_address ,
1142
1110
merge_change = True ,
1143
- auto_validity = False ,
1144
- auto_required_signers = False ,
1145
1111
)
1146
1112
1147
1113
expected = {
@@ -1172,8 +1138,6 @@ def test_tx_builder_merge_change_smaller_than_min_utxo(chain_context):
1172
1138
tx_body = tx_builder .build (
1173
1139
change_address = sender_address ,
1174
1140
merge_change = True ,
1175
- auto_validity = False ,
1176
- auto_required_signers = False ,
1177
1141
)
1178
1142
1179
1143
expected = {
0 commit comments