Unfortunately, as documented in: https://github.com/IntersectMBO/cardano-ledger/issues/4571 Some Option fields in the script context certificates are going to remain set to None, at least until the next Hard fork. There's a risk that people permanently lock their funds if they expect deposits on registration credentials to ever be `Some`. So, we introduce a special type that emulate an `Option` that can only ever be `None`. We call it `Never` and it is the first type of this kind (i.e. with constructors indexes not starting at 0).  | 
			||
|---|---|---|
| .. | ||
| ctx | ||
| validators | ||
| .gitignore | ||
| README.md | ||
| aiken.lock | ||
| aiken.toml | ||
| plutus.json | ||
| test.sh | ||
		
			
				
				README.md
			
		
		
			
			
		
	
	V3 Script Context Tests
This project contains a few handcrafted Plutus V3 validators and transactions
whose sole purpose is to test the interpretation of the ScriptContext from
within an Aiken's validators.
So validators are meant to work hand-in-hand with an associated context. Because we can't have fully static context (since they contain the validator and its hash), we define templates.
Everything is a bit clunky, but steps have been captured in a test.sh script
for convenience. The test still assumes a few things. For any
VALIDATOR_GROUP:
- 
There's a
ctx/{VALIDATOR_GROUP}/tx.templateandctx/{VALIDATOR_GROUP}/resolved_inputs.templaterespectively. - 
There's a corresponding validator
validators/{VALIDATOR_GROUP}.ak - 
Templates may reference variables using a mustache-template-like syntax
{{ ... }}. Provided variables are:{VALIDATOR_GROUP}.{VALIDATOR_TITLE}.hash{VALIDATOR_GROUP}.{VALIDATOR_TITLE}.cbor
Where
VALIDATOR_TITLEcorresponds to the validator Aiken's name. 
How to use
./test.sh VALIDATOR_GROUP
![TIP] By default, this recompiles the project in --release mode, which can be long when iterating / testing. You can provide a binary to use as a second argument. For a dev build, just do:
./test.sh VALIDATOR_GROUP "cargo run --"
Test Coverage
- 
Purpose
- spend
 - mint
 - withdraw
 - publish
 - voting
 - proposing
 
 - 
Transaction body
- inputs
 - reference inputs
- none
 - some
 
 - outputs
- none
 - some
 
 - fee
 - mint
 - certificates
- none
 - some
- Register credential
- no deposit
 - with deposit
 
 - Unregister credential
- no deposit
 - with deposit
 
 - Delegate
 - Register & delegate credential
 - Register drep
 - Unregister drep
 - Update drep
 - Register pool
 - Retire pool
 - Delegate CC
 - Retire CC
 
 - Register credential
 
 - withdrawals
- none
 - some
 
 - validity range
 - extra signatories
- none
 - some
 
 - redeemers
 - datums
 - votes
- none
 - some
 
 - proposal procedures
- none
 - some
 
 - current treasury
- with
 - without
 
 - treasury donation
- with
 - without
 
 
 - 
Address
- type-0 (key | key)
 - type-1 (script | key)
 - type-2 (key | script)
 - type-3 (script | script)
 - type-4 (key | ptr)
 - type-5 (script | ptr)
 - type-6 (key | ø)
 - type-7 (key | ø)
 
 - 
Value
- only ada
 - multi-assets
 
 - 
Output datum
- none
 - hash
 - inline
 
 - 
Output script
- none
 - inline
 
 - 
Governance Action
- parameter change
- with action id
 - without action id
 
 - hardfork initiation
- with action id
 - without action id
 
 - treasuryWithdrawals
- with constitution
 - without constitution
 
 - no confidence
- with action id
 - without action id
 
 - update committee
- with action id
 - without action id
 
 - new constitution
- with action id
 - without action id
 
 - info action
 
 - parameter change
 - 
Vote
- No
 - Yes
 - Abstain
 
 - 
Voter
- CC
 - DRep
 - SPO
 
 - 
ChangedParameters
- txFeePerByte
 - txFeeFixed
 - maxBlockBodySize
 - maxTxSize
 - maxBlockHeaderSize
 - stakeAddressDeposit
 - stakePoolDeposit
 - poolRetireMaxEpoch
 - stakePoolTargetNum
 - poolPledgeInfluence
 - monetaryExpansion
 - treasuryCut
 - minPoolCost
 - utxoCostPerByte
 - costModels
 - executionUnitPrices
 - maxTxExecutionUnits
 - maxBlockExecutionUnits
 - maxValueSize
 - collateralPercentage
 - maxCollateralInputs
 - poolVotingThresholds
 - dRepVotingThresholds
 - committeeMinSize
 - committeeMaxTermLength
 - govActionLifetime
 - govActionDeposit
 - dRepDeposit
 - dRepActivity
 - minFeeRefScriptCostPerByte
 
 - 
Constitution
- with guardrail script
 - without guardrail script
 
 - 
Credential
- key
 - script
 
 - 
Delegatee
- pool
 - drep
 - pool + drep
 
 - 
DRep
- key
 - script
 - abstain
 - no confidence
 
 - 
Boundary
- closed
 - open