Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding support for script stake credentials and stake address in create-treasury-withdrawal #913

Closed
wants to merge 6 commits into from

Conversation

CarlosLopezDeLara
Copy link
Contributor

Changelog

- description: |
    Adding support for script stake credentials and stake address in `create-treasury-withdrawal` and improving help text. New options are: `--funds-receiving-stake-script-file` and `--funds-receiving-stake-address` 
     
# uncomment types applicable to the change:
  type:
   - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
   - documentation  # change in code docs, haddocks...

Context

Resolves #898 originally raised by @Crypto2099.

How to trust this PR

cardano-cli conway governance action create-treasury-withdrawal \
--testnet --governance-action-deposit 50000000000 \
--deposit-return-stake-verification-key-file example/utxo-keys/stake1.vkey \
--anchor-url https://tinyurl.com/3wrwb2as \
-anchor-data-hash 52e69500a92d80f2126c836a4903dc582006709f004cf7a28ed648f732dff8d2 \
--funds-receiving-stake-script-file scriptrewardsaccount/stake.script \
--transfer 97893290 \ 
--constitution-script-hash fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64 \
--out-file example/transactions/treasury.action

after submitting that in a transaction we see

[
  {
    "actionId": {
      "govActionIx": 0,
      "txId": "940469d7a02f3022c0062ab93f10fd39b8f07959a3d930a818b5b86eceeb400c"
    },
    "committeeVotes": {},
    "dRepVotes": {},
    "expiresAfter": 6,
    "proposalProcedure": {
      "anchor": {
        "dataHash": "52e69500a92d80f2126c836a4903dc582006709f004cf7a28ed648f732dff8d2",
        "url": "https://tinyurl.com/3wrwb2as"
      },
      "deposit": 50000000000,
      "govAction": {
        "contents": [
          [
            [
              {
                "credential": {
                  "scriptHash": "96ec5e35abc0970316947ca6d8ea28d0dba9f4023db9a4fb0057e20c"
                },
                "network": "Testnet"
              },
              97893290
            ]
          ],
          "fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64"
        ],
        "tag": "TreasuryWithdrawals"
      },
      "returnAddr": {
        "credential": {
          "keyHash": "c209926b297f9bb72142cdf02aba43bac174ef8141183be7da1ac3b8"
        },
        "network": "Testnet"
      }
    },
    "proposedIn": 3,
    "stakePoolVotes": {}
  }
]

After enactment of the action by yes votes from CC and DReps:

cardano-cli conway query stake-address-info --address stake_test17ztwch3440qfwqckj372dk829rgdh205qg7mnf8mqpt7yrqfvnvwr
[
    {
        "address": "stake_test17ztwch3440qfwqckj372dk829rgdh205qg7mnf8mqpt7yrqfvnvwr",
        "delegationDeposit": 2000000,
        "rewardAccountBalance": 97893290,
        "stakeDelegation": null,
        "voteDelegation": null
    }
]

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

When updating the help text for `pTransferAmt` in the context of create-treasury-withdrawal noticed that the parser `pTransferAmt` is shared with previous eras MIR certificates (not fully removed from CLI yet).  Modifying the text was not ideal. Therefore, I'm creating the new parser `pTreasuryWithdrawalAmt` with better help text for its use in create-treasury-withdrawal.
Adding support for `script stake credentials` and `stake address` in --funds-receiving-stake...
@CarlosLopezDeLara CarlosLopezDeLara marked this pull request as draft September 25, 2024 09:37
@CarlosLopezDeLara CarlosLopezDeLara deleted the cl/helptext branch September 25, 2024 10:27
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.

[FEATURE] - improve help text in create-treasury-withdrawal
1 participant