test(plutus): add Plutus V3 array builtin E2E tests #3268
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
What is the goal of this PR?
Add end-to-end tests for three new Plutus V3 array manipulation builtins (
indexArray,lengthOfArray, andlistToArray) that were introduced in protocol version 11.Why is this change necessary?
These builtins are part of the batch6 enhancements for Plutus V3, enabling more efficient array operations in smart contracts. Without E2E tests, we cannot verify that these builtins work correctly in a real on-chain environment with cardano-node.
Approach
This PR follows the existing Plutus V3 testing pattern:
tests/data/plutus/v3/batch6/1.1.0/plutus_common.pyThe scripts use a succeeding (positive test) approach - they demonstrate that the builtins execute without errors when called with valid inputs.
Changes
Array Builtin Test Scripts
succeedingIndexArrayPolicyScript_V3_110.plutus: TestsindexArraybuiltin for accessing array elements by indexsucceedingLengthOfArrayPolicyScript_V3_110.plutus: TestslengthOfArraybuiltin for determining array sizesucceedingListToArrayPolicyScript_V3_110.plutus: TestslistToArraybuiltin for converting lists to arraysTest Registration
plutus_common.py:490-492: Added three new scripts toSUCCEEDING_BATCH6_SCRIPT_FILES_V3tuple, integrating them with the existing batch6 test suite