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

Update create-treasury-withdrawal #914

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Update create-treasury-withdrawal #914

merged 1 commit into from
Sep 25, 2024

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

Copy link
Contributor

@palas palas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@CarlosLopezDeLara CarlosLopezDeLara added this pull request to the merge queue Sep 25, 2024
Merged via the queue into main with commit fef657b Sep 25, 2024
25 checks passed
@CarlosLopezDeLara CarlosLopezDeLara deleted the cl/createtw branch September 25, 2024 16:52
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
2 participants