Skip to content

feat(e2e): add PlutusV3 txInfoProposalProcedures and txInfoVotingProcedures for ParameterChange #49#3

Open
mwihoti wants to merge 1 commit intoCardanoHubNBO:mainfrom
mwihoti:feat/txinfo-proposal-voting-procedures
Open

feat(e2e): add PlutusV3 txInfoProposalProcedures and txInfoVotingProcedures for ParameterChange #49#3
mwihoti wants to merge 1 commit intoCardanoHubNBO:mainfrom
mwihoti:feat/txinfo-proposal-voting-procedures

Conversation

@mwihoti
Copy link

@mwihoti mwihoti commented Feb 28, 2026

Implements the E2E test for PlutusV3's txInfoProposalProcedures and
txInfoVotingProcedures fields using a ParameterChange governance action.

changes made

[Helpers/TypeConverters.hs]

  • Implemented fromLedgerGovernanceAction — previously undefined (runtime
    crash blocker). Now covers all 6 arms: ParameterChange, HardForkInitiation,
    TreasuryWithdrawals, NoConfidence, UpdateCommittee, NewConstitution, InfoAction
  • Added fromCardanoVoter — converts a ledger Voter to PlutusV3.Voter
  • Added fromCardanoGovActionId — converts TxId + index to PlutusV3.GovernanceActionId
  • Added missing imports: Data.Map.Strict, Data.Set, Data.Text.Encoding, Data.Word

[PlutusScripts/Governance/Common.hs]

  • Fixed bug in mkVerifyVotescontextGovActionIds and contextVoteVals
    were reading from the redeemer instead of the ScriptContext TxInfo (silent
    correctness bug allowing tests to pass with wrong on-chain data)

[Spec/ConwayFeatures.hs]

  • Added parameterChangeProposalAndVoteV3TxInfoTest:
    • Tx 1: Proposes ParameterChange. PlutusV3 minting policy checks
      txInfoProposalProcedures for correct ppDeposit, ppReturnAddr and
      GovernanceAction. Token mint proves on-chain check passed.
    • Tx 2: CC votes Yes, DRep votes No (SPO excluded — not permitted for
      ParameterChange). PlutusV3 minting policy checks txInfoVotingProcedures
      for correct voter credentials, GovernanceActionId and vote values.
      Token mint proves on-chain check passed.

[Spec.hs]

  • Enabled registerCommitteeTestInfo (required for CC to be registered before voting)
  • Registered parameterChangeProposalAndVoteV3TxInfoTestInfo in governance test suite

Tests

txInfoProposalProceduresppDeposit | Passed
txInfoProposalProceduresppReturnAddr | Passed
txInfoProposalProceduresParameterChange GovernanceAction | Passed
txInfoVotingProcedures — CC voter + VoteYes | Passed
txInfoVotingProcedures — DRep voter + VoteNo | Passed
txInfoVotingProcedures — GovernanceActionId (txId + index) | Passed
| On-chain proof via token mint | Passed

…edures test for ParameterChange

- Implement fromLedgerGovernanceAction in TypeConverters covering all
  six GovernanceAction arms (ParameterChange, HardForkInitiation,
  TreasuryWithdrawals, NoConfidence, UpdateCommittee, NewConstitution)
- Add top-level fromCardanoVoter and fromCardanoGovActionId converters
- Fix mkVerifyVotes bug: contextGovActionIds and contextVoteVals were
  incorrectly read from the redeemer instead of the ScriptContext TxInfo
- Add parameterChangeProposalAndVoteV3TxInfoTest: two-transaction test
  that verifies txInfoProposalProcedures and txInfoVotingProcedures
  on-chain using PlutusV3 minting policies as proof
Closes IntersectMBO#49
@mwihoti mwihoti changed the title feat(e2e): add PlutusV3 txInfoProposalProcedures and txInfoVotingProc… feat(e2e): add PlutusV3 txInfoProposalProcedures and txInfoVotingProcedures for ParameterChange #49 Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant