IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
39 stars 15 forks source link

[FR] - Build and build-raw to include interface for Voting and Proposal script (guardrails-script) to be used as reference script. #809

Closed CarlosLopezDeLara closed 1 month ago

CarlosLopezDeLara commented 3 months ago

Internal/External Internal if an IOHK staff member.

Area Conway - Guardrails script PV3

Describe the feature you'd like Right now the only way to use the voting and proposal script (guardrails script) is by using the script file directly with --proposal-script-file , it would be very useful to have options like --proposal-tx-in-reference and --vote-tx-in-reference

Might be good idea to rename the flag to guardrail-script or constitution-script , so it would be

--guardrails-script-file
--guardrails-tx-in-reference 
...

OR

--constitution-script-file
--constitution-tx-in-reference 
...

Additional context / screenshots The guardrails script is available here: https://github.com/IntersectMBO/constitution-priv

Still a private repo, so copying the description below:

Being a smart contract, the constitution script is a validator function of the form:

const_script :: BuiltinData -> BuiltinUnit The sole argument to this function is the BuiltinData-encoded V3.ScriptContext. Note the absence of the 2 extra arguments, previously known as Datum argument and the Redeemer argument. Since V3 and CIP-69, the Datum and Redeemer values are not passed anymore as separate function arguments, but embedded inside the V3.ScriptContext argument. The "proposal under investigation" is also embedded inside the ScriptContext.

Datum is not provided for the "constitution script", since it is not a spending validator. Redeemer will be provided to the "constitution script", but the current script implementations ignore any value given to it (see Clause D).

Jimbo4350 commented 3 months ago

https://github.com/IntersectMBO/cardano-cli/pull/822

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

CarlosLopezDeLara commented 1 month ago

Resolved by https://github.com/IntersectMBO/cardano-cli/pull/822