cardano_node_tests.tests.tests_plutus_v2 packageο
Submodulesο
cardano_node_tests.tests.tests_plutus_v2.conftest moduleο
- cardano_node_tests.tests.tests_plutus_v2.conftest.cluster(cluster_manager: ClusterManager) ClusterLib[source]ο
- Return instance of clusterlib.ClusterLib. 
cardano_node_tests.tests.tests_plutus_v2.mint_build moduleο
cardano_node_tests.tests.tests_plutus_v2.mint_raw moduleο
cardano_node_tests.tests.tests_plutus_v2.spend_build moduleο
cardano_node_tests.tests.tests_plutus_v2.spend_raw moduleο
cardano_node_tests.tests.tests_plutus_v2.test_mint_build moduleο
Tests for minting with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_mint_build.TestBuildMinting[source]ο
- Bases: - object- Tests for minting using Plutus smart contracts and transaction build. - test_inline_datum_visibility(cluster: ClusterLib, payment_addrs: list[AddressRecord], scenario: str)[source]ο
- Test visibility of inline datums on reference inputs by a plutus script. - create the necessary Tx outputs 
- mint the token and check that the plutus script have visibility of the inline datum 
- check that the token was minted 
- check that the reference UTxO was not spent 
 
 - test_minting_ref_missing_txout(cluster: ClusterLib, payment_addrs: list[AddressRecord], plutus_version: str)[source]ο
- Test minting a token with reference Plutus script without providing TxOut for the token. - Uses cardano-cli transaction build command for building the transactions. - fund the token issuer and create a UTxO for collateral and reference script 
- check that the expected amount was transferred to token issuerβs address 
- mint the token using a Plutus script 
- check that the token was minted and collateral UTxO was not spent 
 
 - test_minting_ref_one_token(cluster: ClusterLib, payment_addrs: list[AddressRecord], plutus_version: str)[source]ο
- Test minting a token with reference Plutus script. - Uses cardano-cli transaction build command for building the transactions. - fund the token issuer and create a UTxO for collateral and reference script 
- check that the expected amount was transferred to token issuerβs address 
- mint the token using a Plutus script 
- check that the token was minted and collateral UTxO was not spent 
- check expected fees 
- check expected Plutus cost 
 
 - test_reference_inputs_visibility(cluster: ClusterLib, payment_addrs: list[AddressRecord], valid_redeemer: bool)[source]ο
- Test visibility of reference inputs by a plutus script. - create the necessary Tx outputs 
- create the redeemer with the reference input 
- mint the token and check that the plutus script have visibility of the reference input 
- check that the token was minted 
- check that the reference UTxO was not spent 
 
 - test_reference_scripts_visibility(cluster: ClusterLib, payment_addrs: list[AddressRecord], valid_redeemer: bool)[source]ο
- Test visibility of reference inputs by a plutus script. - create needed Tx outputs 
- create the redeemer with the script hash 
- mint the token and check that the plutus script has visibility of the reference script 
- check that the token was minted 
- check that the reference UTxO was not spent 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_mint_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment address. 
cardano_node_tests.tests.tests_plutus_v2.test_mint_negative_build moduleο
Negative tests for minting with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_mint_negative_build.TestNegativeCollateralOutput[source]ο
- Bases: - object- Tests for collateral output that are expected to fail. 
- cardano_node_tests.tests.tests_plutus_v2.test_mint_negative_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment address. 
cardano_node_tests.tests.tests_plutus_v2.test_mint_negative_raw moduleο
Negative tests for minting with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_mint_negative_raw.TestNegativeCollateralOutput[source]ο
- Bases: - object- Tests for collateral output that are expected to fail. - test_minting_with_limited_collateral(cluster: ClusterLib, payment_addrs: list[AddressRecord], plutus_version: str)[source]ο
- Test minting a token with a Plutus script with limited collateral amount. - Expect failure. - fund the token issuer and create a UTxO for collateral 
- check that the expected amount was transferred to token issuerβs address 
- mint the token using a Plutus script while limiting the usable collateral amount 
- check that the minting failed because insufficient collateral amount was provided 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_mint_negative_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment address. 
cardano_node_tests.tests.tests_plutus_v2.test_mint_raw moduleο
Tests for minting with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_mint_raw.TestMinting[source]ο
- Bases: - object- Tests for minting using Plutus smart contracts. - test_datum_hash_visibility(cluster: ClusterLib, payment_addrs: list[AddressRecord], scenario: str)[source]ο
- Test visibility of datum hash on reference inputs by the plutus script. - create needed Tx outputs 
- mint token and check that plutus script have visibility of the datum hash 
- check that the token was minted 
- check that the reference UTxO was not spent 
 
 - test_minting_two_tokens(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_reference_script: bool, plutus_version: str)[source]ο
- Test minting two tokens with a single Plutus script. - fund the token issuer and create a UTxO for collateral and possibly reference script 
- check that the expected amount was transferred to token issuerβs address 
- mint the tokens using a Plutus script 
- check that the tokens were minted and collateral UTxO was not spent 
 
 - test_missing_builtin(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test builtins added to PlutusV2 from PlutusV3. - fund the token issuer and create a UTxO for collateral 
- check that the expected amount was transferred to token issuerβs address 
- try to mint the tokens using a Plutus script 
- check that the tokens were minted and collateral UTxO was not spent -OR- check the expected failure 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_mint_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment address. 
cardano_node_tests.tests.tests_plutus_v2.test_mint_secp256k1_build moduleο
SECP256k1 tests for minting with Plutus using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_mint_secp256k1_build.TestSECP256k1[source]ο
- Bases: - object- test_negative_secp_builtin_functions(cluster: ClusterLib, payment_addrs: list[AddressRecord], test_vector: str, algorithm: str, plutus_version: str)[source]ο
- Try to mint a token with invalid test vectors. - Expect failure. 
 - test_use_secp_builtin_functions(cluster: ClusterLib, payment_addrs: list[AddressRecord], algorithm: str, plutus_version: str)[source]ο
- Test that is possible to use the two SECP256k1 builtin functions. - fund the token issuer 
- mint the tokens using a Plutus script with a SECP256k1 function 
- check that the token was minted 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_mint_secp256k1_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment address. 
cardano_node_tests.tests.tests_plutus_v2.test_mint_secp256k1_raw moduleο
SECP256k1 tests for minting with Plutus using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_mint_secp256k1_raw.TestSECP256k1[source]ο
- Bases: - object- test_negative_secp_builtin_functions(cluster: ClusterLib, payment_addrs: list[AddressRecord], test_vector: str, algorithm: str, plutus_version: str)[source]ο
- Try to mint a token with invalid test vectors. - Expect failure. 
 - test_use_secp_builtin_functions(cluster: ClusterLib, payment_addrs: list[AddressRecord], algorithm: str, plutus_version: str)[source]ο
- Test that is possible to use the two SECP256k1 builtin functions. - fund the token issuer 
- mint the tokens using a Plutus script with a SECP256k1 function 
- check that the token was minted 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_mint_secp256k1_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment address. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_build moduleο
Tests for spending with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_build.TestBuildLocking[source]ο
- Bases: - object- Tests for Tx output locking using Plutus V2 functionalities and transaction build. - test_min_required_utxo(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_inline_datum: bool, use_token: bool, use_reference_script: bool, request: FixtureRequest)[source]ο
- Test minimum required UTxO in different scenarios with v2 functionalities. - create the necessary Tx outputs 
- check the min required UTxO 
 
 - test_txout_locking(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_inline_datum: bool, use_reference_script: bool)[source]ο
- Test combinations of inline datum and datum file + reference script and script file. - create the necessary Tx outputs 
- spend the locked UTxO 
- check that the expected UTxOs were correctly spent 
- (optional) check transactions in db-sync 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_collateral_build moduleο
Tests for collateral while spending with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_collateral_build.TestCollateralOutput[source]ο
- Bases: - object- Tests for Tx output locking using Plutus with collateral output. - test_collateral_with_tokens(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_return_collateral: bool)[source]ο
- Test failing script using collaterals with tokens. - create the token 
- fund the script address and create a UTxO for collateral 
- spend the locked UTxO 
- check that the expected amount of collateral was spent 
 
 - test_with_total_return_collateral(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_return_collateral: bool, use_total_collateral: bool)[source]ο
- Test failing script with combination of total and return collateral set. - fund the script address and create a UTxO for collateral 
- spend the locked UTxO 
- check that the expected amount of collateral was spent 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_collateral_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_collateral_raw moduleο
Tests for collateral while spending with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_collateral_raw.TestCollateralOutput[source]ο
- Bases: - object- Tests for Tx output locking using Plutus with collateral output. - test_collateral_with_tokens(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test failing script using collaterals with tokens. - create the token 
- fund the script address and create a UTxO for collateral 
- spend the locked UTxO 
- check that the expected amount of collateral was spent 
 
 - test_with_total_return_collateral(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_return_collateral: bool, use_total_collateral: bool)[source]ο
- Test failing script with combination of total and return collateral set. - fund the script address and create a UTxO for collateral 
- spend the locked UTxO 
- check that the expected amount of collateral was spent 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_collateral_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_compat_build moduleο
Compatibility tests for spending with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_compat_build.TestCompatibility[source]ο
- Bases: - object- Tests for checking compatibility with previous Tx eras. - test_inline_datum_old_tx_era(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with an inline datum using old Tx era. - Expect failure with Alonzo-era Tx. 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_compat_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_compat_raw moduleο
Compatibility tests for spending with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_compat_raw.TestCompatibility[source]ο
- Bases: - object- Tests for checking compatibility with previous Tx eras. - test_inline_datum_old_tx_era(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with an inline datum using old Tx era. - Expect failure with Alonzo-era Tx. 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_compat_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_datum_build moduleο
Tests for datum while spending with Plutus using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_datum_build.TestInlineDatum[source]ο
- Bases: - object- Tests for Tx output with inline datum. - test_check_inline_datum_cost(cluster: ClusterLib)[source]ο
- Check that the min UTxO value with an inline datum depends on the size of the datum. - calculate the min UTxO value with a small datum, using both inline and hash 
- calculate the min UTxO value with a big datum, using both inline and hash 
- check that the min UTxO value with an inline datum depends on datum size 
 
 
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_datum_build.TestNegativeInlineDatum[source]ο
- Bases: - object- Tests for Tx output with inline datum that are expected to fail. - pbt_script_address(cluster: ClusterLib) str[source]ο
- Get Plutus script address. - Meant for property-based tests, so this expensive operation gets executed only once. 
 - test_lock_tx_big_datum(cluster: ClusterLib, payment_addrs: list[AddressRecord], pbt_script_address: str) None[source]ο
- Test locking a Tx output with a datum bigger than the allowed size. - Expect failure on node version < 1.36.0. 
 - test_lock_tx_datum_as_witness(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test unlock a Tx output with a datum as witness. - Expect failure. 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_datum_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_datum_raw moduleο
Tests for datum while spending with Plutus using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_datum_raw.TestNegativeInlineDatum[source]ο
- Bases: - object- Tests for Tx output with inline datum that are expected to fail. - pbt_highest_utxo(cluster: ClusterLib, payment_addrs: list[AddressRecord]) UTXOData[source]ο
- Get UTxO with highest amount of Lovelace. - Meant for property-based tests, so this expensive operation gets executed only once. 
 - pbt_script_address(cluster: ClusterLib) str[source]ο
- Get Plutus script address. - Meant for property-based tests, so this expensive operation gets executed only once. 
 - test_lock_tx_big_datum(cluster: ClusterLib, payment_addrs: list[AddressRecord], pbt_highest_utxo: UTXOData, pbt_script_address: str) None[source]ο
- Test locking a Tx output with a datum bigger than the allowed size. - Expect failure on node version < 1.36.0. 
 - test_lock_tx_datum_as_witness(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test unlock a Tx output with a datum as witness. - Expect failure. 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_datum_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_raw moduleο
Tests for spending with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_raw.TestLockingV2[source]ο
- Bases: - object- Tests for Tx output locking using Plutus V2 smart contracts. - test_datum_bytes_in_dbsync(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test that datum bytes in db-sync corresponds to original datum. - create a Tx output with an inline datum at the script address 
- double-check that the UTxO datum hash corresponds to the datum CBOR file 
- check that datum from db-sync produces the original datum hash 
- check that datum bytes in db-sync corresponds to the original datum 
 
 - test_txout_locking(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_inline_datum: bool, use_reference_script: bool)[source]ο
- Test combinations of inline datum and datum file + reference script and script file. - create the necessary Tx outputs 
- check that the expected amount was locked at the script address 
- spend the locked UTxO 
- check that the expected UTxOs were correctly spent 
- (optional) check transactions in db-sync 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_build moduleο
Tests for ro reference inputs while spending with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_build.TestNegativeReadonlyReferenceInputs[source]ο
- Bases: - object- Tests for Tx with readonly reference inputs that are expected to fail. - test_reference_input_without_spend_anything(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test using a read-only reference input without spending any UTxO. - Expect failure. 
 
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_build.TestReadonlyReferenceInputs[source]ο
- Bases: - object- Tests for Tx with readonly reference inputs. - test_reference_input_non_plutus(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test using a read-only reference input in non-Plutus transaction. - use a reference input in normal non-Plutus transaction 
- check that the reference input was not spent 
- (optional) check transactions in db-sync 
 
 - test_same_input_as_reference_input(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test use a reference input that is also a regular input of the same transaction. - create the necessary Tx outputs 
- use a reference input that is also a regular input and spend the locked UTxO 
- check that input was spent 
- check βtransaction viewβ 
 
 - test_use_reference_input(cluster: ClusterLib, payment_addrs: list[AddressRecord], reference_input_scenario: str)[source]ο
- Test use a reference input when unlock some funds. - create the necessary Tx outputs 
- use a reference input and spend the locked UTxO 
- check that the reference input was not spent 
- (optional) check transactions in db-sync 
 
 - test_use_same_reference_input_multiple_times(cluster: ClusterLib, cluster_manager: ClusterManager, payment_addrs: list[AddressRecord])[source]ο
- Test 2 transactions using the same reference input in the same block. - create the UTxO that will be used as readonly reference input 
- create the transactions using the same readonly reference input 
- submit both transactions 
- check that the readonly reference input was not spent 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_raw moduleο
Tests for ro reference inputs while spending with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_raw.TestNegativeReadonlyReferenceInputs[source]ο
- Bases: - object- Tests for Tx with readonly reference inputs that are expected to fail. - test_reference_input_without_spend_anything(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test using a read-only reference input without spending any UTxO. - Expect failure. 
 
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_raw.TestReadonlyReferenceInputs[source]ο
- Bases: - object- Tests for Tx with readonly reference inputs. - test_reference_input_non_plutus(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test using a read-only reference input in non-Plutus transaction. - use a reference input in normal non-Plutus transaction 
- check that the reference input was not spent 
- (optional) check transactions in db-sync 
 
 - test_same_input_as_reference_input(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test use a reference input that is also a regular input of the same transaction. - create the necessary Tx outputs 
- use a reference input that is also a regular input and spend the locked UTxO 
- check that the input was spent 
- check βtransaction viewβ 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_inputs_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_build moduleο
Tests for reference scripts while spending with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_build.TestNegativeReferenceScripts[source]ο
- Bases: - object- Tests for Tx output with reference scripts that are expected to fail. - test_lock_byron_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with a Plutus V2 reference script on Byron address. - Expect failure. 
 - test_lock_tx_v1_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with a Plutus V1 reference script. - Expect failure. 
 - test_not_a_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with an invalid reference script. - Expect failure. 
 - test_two_scripts_one_fail(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking two Tx with different Plutus reference scripts in single Tx, one fails. - Expect failure. 
 - test_v1_attached_v2_reference(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with an attached V1 script and one using reference V2 script. - 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 
 
 
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_build.TestReferenceScripts[source]ο
- Bases: - object- Tests for Tx output locking using Plutus smart contracts with reference scripts. - test_mix_reference_attached_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with an attached V2 script and one using reference V2 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 
 
 - test_reference_multiple_script(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_same_script: bool)[source]ο
- Test locking two Tx output with a V2 reference script and spending it. - 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 
 
 - test_reference_same_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking two Tx output with the same V2 reference script and spending it. - 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 
 
 - test_spend_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord], plutus_version: str, address_type: str)[source]ο
- Test spending a UTxO that holds a reference script. - create a Tx output with reference script (reference script UTxO) 
- check that the expected amount was transferred 
- spend the UTxO 
- check that the UTxO was spent 
 
 - test_spend_regular_utxo_and_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord], plutus_version: str)[source]ο
- Test spend an UTxO and use a reference a script on the same transaction. - create the reference script UTxO with the βALWAYS_FAILSβ script to have confidence that the script was not being executed 
- spend a regular UTxO and reference the script at the same transaction 
- check that the destination UTxO have the right balance 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_raw moduleο
Tests for reference scripts while spending with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_raw.TestNegativeReferenceScripts[source]ο
- Bases: - object- Tests for Tx output with reference scripts that are expected to fail. - test_lock_byron_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with a Plutus V2 reference script on Byron address. - Expect failure. 
 - test_lock_tx_v1_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with a Plutus V1 reference script. - Expect failure. 
 - test_not_a_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with an invalid reference script. - Expect failure. 
 
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_raw.TestReferenceScripts[source]ο
- Bases: - object- Tests for Tx output locking using Plutus smart contracts with reference scripts. - test_mix_reference_attached_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking a Tx output with an attached V2 script and one using reference V2 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 
 
 - test_reference_multiple_script(cluster: ClusterLib, payment_addrs: list[AddressRecord], use_same_script: bool)[source]ο
- Test locking two Tx output with a V2 reference script and spending it. - 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 
 
 - test_reference_same_script(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test locking two Tx output with the same V2 reference script and spending it. - 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 
 
 - test_reference_script_byron_address(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]ο
- Test creating reference script UTxO on Byron address. - create a Byron address 
- create a reference script UTxO on Byron address with the βALWAYS_FAILSβ script to have confidence that the script was not being executed 
 
 - test_spend_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord], plutus_version: str, address_type: str)[source]ο
- Test spending a UTxO that holds a reference script. - create a Tx output with reference script (reference script UTxO) 
- check that the expected amount was transferred 
- spend the UTxO 
- check that the UTxO was spent 
 
 - test_spend_regular_utxo_and_reference_script(cluster: ClusterLib, payment_addrs: list[AddressRecord], plutus_version: str)[source]ο
- Test spend an UTxO and use a reference a script on the same transaction. - create the reference script UTxO with the βALWAYS_FAILSβ script to have confidence that the script was not being executed 
- spend a regular UTxO and reference the script at the same transaction 
- check that the destination UTxO have the right balance 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_ref_scripts_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_secp256k1_build moduleο
SECP256k1 tests for spending with Plutus V2 using transaction build.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_secp256k1_build.TestSECP256k1[source]ο
- Bases: - object- build_fund_script_secp(cluster: ClusterLib, payment_addrs: list[AddressRecord], request: SubRequest) tuple[str, list[UTXOData], list[UTXOData], UTXOData][source]ο
- Fund a Plutus script and create the necessary Tx outputs. 
 - test_overspending_execution_budget(cluster: ClusterLib, payment_addrs: list[AddressRecord], build_fund_script_secp: tuple[str, list[UTXOData], list[UTXOData], UTXOData]) None[source]ο
- Try to build a transaction with a plutus script that overspend the execution budget. - Expect failure. 
 - test_use_secp_builtin_functions(cluster: ClusterLib, payment_addrs: list[AddressRecord], build_fund_script_secp: tuple[str, list[UTXOData], list[UTXOData], UTXOData])[source]ο
- Test that it is possible to spend a locked UTxO by a script that uses a SECP function. - create the necessary Tx outputs 
- spend the locked UTxO 
- check that script address UTxO was spent 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_secp256k1_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses. 
cardano_node_tests.tests.tests_plutus_v2.test_spend_secp256k1_raw moduleο
SECP256k1 tests for spending with Plutus V2 using transaction build-raw.
- class cardano_node_tests.tests.tests_plutus_v2.test_spend_secp256k1_raw.TestSECP256k1[source]ο
- Bases: - object- fund_script_secp(cluster: ClusterLib, payment_addrs: list[AddressRecord], request: SubRequest) tuple[str, list[UTXOData], list[UTXOData]][source]ο
- Fund a Plutus script and create the necessary Tx outputs. 
 - test_use_secp_builtin_functions(cluster: ClusterLib, payment_addrs: list[AddressRecord], fund_script_secp: tuple[str, list[UTXOData], list[UTXOData]])[source]ο
- Test that it is possible to spend a locked UTxO by a script that uses a SECP function. - create the necessary Tx outputs 
- spend the locked UTxO 
- check that script address UTxO was spent 
 
 
- cardano_node_tests.tests.tests_plutus_v2.test_spend_secp256k1_raw.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord][source]ο
- Create new payment addresses.