Skip to content

Commit

Permalink
let's settle on "UTxO"
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoura committed Jun 21, 2022
1 parent d3267ce commit 833deb0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
26 changes: 13 additions & 13 deletions cardano_node_tests/tests/test_plutus_v2_spend_build.py
Expand Up @@ -272,11 +272,11 @@ def test_txout_locking(
tx_file=tx_signed, txins=[t.txins[0] for t in tx_output_redeem.script_txins if t.txins]
)

# check that script address utxo was spent
# check that script address UTxO was spent
script_utxo = f"{script_utxos[0].utxo_hash}#{script_utxos[0].utxo_ix}"
assert (
len(cluster.get_utxo(txin=script_utxo)) == 0
), f"Script address utxo was not spent `{script_utxo}`"
), f"Script address UTxO was not spent `{script_utxo}`"

# check that the value of fee and collaterals are lower when using a reference script
if use_reference_script:
Expand Down Expand Up @@ -520,7 +520,7 @@ def test_reference_multiple_script(
* create the Tx outputs with an inline datum at the script address
* create the Tx outputs with the reference scripts
* spend the locked UTxOs using the reference UTxOs
* check that the UtxOs were correctly spent
* check that the UTxOs were correctly spent
"""
temp_template = common.get_test_id(cluster)

Expand Down Expand Up @@ -659,13 +659,13 @@ def test_reference_multiple_script(
tx_file=tx_signed, txins=[t.txins[0] for t in tx_output_redeem.script_txins if t.txins]
)

# check that script address utxo was spent
# check that script address UTxO was spent
script_utxo1 = f"{script_utxos1[0].utxo_hash}#{script_utxos1[0].utxo_ix}"
script_utxo2 = f"{script_utxos2[0].utxo_hash}#{script_utxos2[0].utxo_ix}"
assert (
len(cluster.get_utxo(txin=script_utxo1)) == 0
and len(cluster.get_utxo(txin=script_utxo2)) == 0
), f"Script addresses utxo was not spent `{script_utxo1}` and `{script_utxo2}`"
), f"Script addresses UTxO was not spent `{script_utxo1}` and `{script_utxo2}`"

@allure.link(helpers.get_vcs_link())
def test_reference_same_script(
Expand All @@ -678,7 +678,7 @@ def test_reference_same_script(
* create the Tx outputs with an inline datum at the script address
* create the Tx output with the reference script
* spend the locked UTxOs using the reference UTxO
* check that the UtxOs were correctly spent
* check that the UTxOs were correctly spent
"""
temp_template = common.get_test_id(cluster)

Expand Down Expand Up @@ -802,13 +802,13 @@ def test_reference_same_script(
tx_file=tx_signed, txins=[t.txins[0] for t in tx_output_redeem.script_txins if t.txins]
)

# check that script address utxo was spent
# check that script address UTxO was spent
script_utxo1 = f"{script_utxos1[0].utxo_hash}#{script_utxos1[0].utxo_ix}"
script_utxo2 = f"{script_utxos2[0].utxo_hash}#{script_utxos2[0].utxo_ix}"
assert (
len(cluster.get_utxo(txin=script_utxo1)) == 0
and len(cluster.get_utxo(txin=script_utxo2)) == 0
), f"Script addresses utxo was not spent `{script_utxo1}` and `{script_utxo2}`"
), f"Script addresses UTxO was not spent `{script_utxo1}` and `{script_utxo2}`"

@allure.link(helpers.get_vcs_link())
def test_mix_reference_attached_script(
Expand All @@ -821,7 +821,7 @@ def test_mix_reference_attached_script(
* create the Tx output with an attached script
* create the Tx output with the reference script
* spend the locked UTxOs
* check that the UtxOs were correctly spent
* check that the UTxOs were correctly spent
"""
temp_template = common.get_test_id(cluster)

Expand All @@ -833,7 +833,7 @@ def test_mix_reference_attached_script(
assert plutus_op1.datum_file and plutus_op2.datum_file
assert plutus_op1.redeemer_cbor_file and plutus_op2.redeemer_cbor_file

# create the necessary UtxOs
# create the necessary UTxOs

script_fund = 100_000_000

Expand Down Expand Up @@ -949,13 +949,13 @@ def test_mix_reference_attached_script(
tx_file=tx_signed, txins=[t.txins[0] for t in tx_output_redeem.script_txins if t.txins]
)

# check that script address UtxOs were spent
# check that script address UTxOs were spent
script_utxo1 = f"{script_utxos1[0].utxo_hash}#{script_utxos1[0].utxo_ix}"
script_utxo2 = f"{script_utxos2[0].utxo_hash}#{script_utxos2[0].utxo_ix}"
assert (
len(cluster.get_utxo(txin=script_utxo1)) == 0
and len(cluster.get_utxo(txin=script_utxo2)) == 0
), f"Script addresses utxo was not spent `{script_utxo1}` and `{script_utxo2}`"
), f"Script addresses UTxO was not spent `{script_utxo1}` and `{script_utxo2}`"


@pytest.mark.testnets
Expand Down Expand Up @@ -1217,7 +1217,7 @@ def test_v1_attached_v2_reference(
* create the Tx output with an attached V1 script
* create the Tx output with the reference V2 script
* spend the locked UTxOs
* check that the UtxOs were correctly spent
* check that the UTxOs were correctly spent
"""
temp_template = common.get_test_id(cluster)

Expand Down
18 changes: 9 additions & 9 deletions cardano_node_tests/tests/test_plutus_v2_spend_raw.py
Expand Up @@ -558,7 +558,7 @@ def test_reference_multiple_script(
* create the Tx outputs with an inline datum at the script address
* create the Tx outputs with the reference scripts
* spend the locked UTxOs using the reference UTxOs
* check that the UtxOs were correctly spent
* check that the UTxOs were correctly spent
"""
temp_template = common.get_test_id(cluster)
amount = 2_000_000
Expand Down Expand Up @@ -692,13 +692,13 @@ def test_reference_multiple_script(
txins=[t.txins[0] for t in tx_output_redeem.script_txins if t.txins],
)

# check that script address utxo was spent
# check that script address UTxO was spent
script_utxo1 = f"{script_utxos1[0].utxo_hash}#{script_utxos1[0].utxo_ix}"
script_utxo2 = f"{script_utxos2[0].utxo_hash}#{script_utxos2[0].utxo_ix}"
assert (
len(cluster.get_utxo(txin=script_utxo1)) == 0
and len(cluster.get_utxo(txin=script_utxo2)) == 0
), f"Script addresses utxo was not spent `{script_utxo1}` and `{script_utxo2}`"
), f"Script addresses UTxO was not spent `{script_utxo1}` and `{script_utxo2}`"

@allure.link(helpers.get_vcs_link())
def test_reference_same_script(
Expand All @@ -711,7 +711,7 @@ def test_reference_same_script(
* create the Tx outputs with an inline datum at the script address
* create the Tx output with the reference script
* spend the locked UTxOs using the reference UTxO
* check that the UtxOs were correctly spent
* check that the UTxOs were correctly spent
"""
temp_template = common.get_test_id(cluster)
amount = 2_000_000
Expand Down Expand Up @@ -834,13 +834,13 @@ def test_reference_same_script(
txins=[t.txins[0] for t in tx_output_redeem.script_txins if t.txins],
)

# check that script address utxo was spent
# check that script address UTxO was spent
script_utxo1 = f"{script_utxos1[0].utxo_hash}#{script_utxos1[0].utxo_ix}"
script_utxo2 = f"{script_utxos2[0].utxo_hash}#{script_utxos2[0].utxo_ix}"
assert (
len(cluster.get_utxo(txin=script_utxo1)) == 0
and len(cluster.get_utxo(txin=script_utxo2)) == 0
), f"Script addresses utxo was not spent `{script_utxo1}` and `{script_utxo2}`"
), f"Script addresses UTxO was not spent `{script_utxo1}` and `{script_utxo2}`"

@allure.link(helpers.get_vcs_link())
def test_mix_reference_attached_script(
Expand All @@ -853,7 +853,7 @@ def test_mix_reference_attached_script(
* create the Tx output with an attached script
* create the Tx output with the reference script
* spend the locked UTxOs
* check that the UtxOs were correctly spent
* check that the UTxOs were correctly spent
"""
temp_template = common.get_test_id(cluster)
amount = 2_000_000
Expand Down Expand Up @@ -980,13 +980,13 @@ def test_mix_reference_attached_script(
txins=[t.txins[0] for t in tx_output_redeem.script_txins if t.txins],
)

# check that script address utxo was spent
# check that script address UTxO was spent
script_utxo1 = f"{script_utxos1[0].utxo_hash}#{script_utxos1[0].utxo_ix}"
script_utxo2 = f"{script_utxos2[0].utxo_hash}#{script_utxos2[0].utxo_ix}"
assert (
len(cluster.get_utxo(txin=script_utxo1)) == 0
and len(cluster.get_utxo(txin=script_utxo2)) == 0
), f"Script addresses utxo was not spent `{script_utxo1}` and `{script_utxo2}`"
), f"Script addresses UTxO was not spent `{script_utxo1}` and `{script_utxo2}`"


@pytest.mark.testnets
Expand Down

0 comments on commit 833deb0

Please sign in to comment.