Skip to content

Commit

Permalink
docs: Reference scripts impl - publication of a script (#4086) <!-- D…
Browse files Browse the repository at this point in the history
…etail in a few bullet points the work accomplished in this PR. Before you submit, don't forget to: CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE MAINTAINERS.md README.md cabal.project default.nix docker-compose.yml docs flake.lock flake.nix floskell.json fourmolu.yaml hie-direnv.yaml justfile lib nix prototypes reports scripts shell.nix specifications test touch.me.CI weeder.dhall Make sure the GitHub PR fields are correct: ✓ Set a good Title for your PR. ✓ Assign yourself to the PR. ✓ Assign one or more reviewer(s). ✓ Link to a Jira issue, and/or other GitHub issues or PRs. ✓ In the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE MAINTAINERS.md README.md cabal.project default.nix docker-compose.yml docs flake.lock flake.nix floskell.json fourmolu.yaml hie-direnv.yaml justfile lib nix prototypes reports scripts shell.nix specifications test touch.me.CI weeder.dhall Don't waste reviewers' time: ✓ If it's a draft, select the Create Draft PR option. ✓ Self-review your changes to make sure nothing unexpected slipped through. CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE MAINTAINERS.md README.md cabal.project default.nix docker-compose.yml docs flake.lock flake.nix floskell.json fourmolu.yaml hie-direnv.yaml justfile lib nix prototypes reports scripts shell.nix specifications test touch.me.CI weeder.dhall Try to make your intent clear: ✓ Write a good Description that explains what this PR is meant to do. ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding Jira ticket. ✓ Highlight what Testing you have done. ✓ Acknowledge any changes required to the Documentation. --> - [x] logic in `constructTransaction` on api and `Cardano.Wallet` level - [x] extension of `TransactionCtx` - [x] use the added field in `mkUnsignedTx` - [x] fix `toCardanoTxOut` - [x] adjust fee when reference script is present - [x] integration test showing reference script publication ### Comments PR tackles publication of reference script to be used in later transactions by using reference inputs when minting/burning. Script is propagated in blockchain in the first of TxOut of a given transaction. It is shown in integration tests that construction/signing/submitting of such a transaction works, plus when decoding transaction a script is present in witness count as expected. <!-- Additional comments, links, or screenshots to attach, if any. --> ### Issue Number https://cardanofoundation.atlassian.net/browse/ADP-3090 <!-- Reference the Jira/GitHub issue that this PR relates to, and which requirements it tackles. Note: Jira issues of the form ADP- will be auto-linked. --> Source commit: d6ef2b1
  • Loading branch information
Cardano Wallet Documentation Bot committed Sep 12, 2023
1 parent cd60390 commit 3f309dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/edge/mint-burn.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Specifically:

1. Creation of a transaction output that contains a minting script and is suitable for use as reference input.

In the `reference_policy_script_template` field, you can optionally add a script template. The HTTP endpoint will map this script template into a script using the wallet's policy public key, and this script will be included in the first transaction output (i.e. at index `0`) of the transaction.
In the `reference_policy_script_template` field, you can optionally add a script template. The HTTP endpoint will map this script template into a script using the wallet's policy public key, and this script will be included in the first transaction output (i.e. at index `0`) of the transaction. For Shelley-style wallets, the script template must contain a single cosigner only, but it may include time locks.

Example `POST` data for the endpoint:

Expand Down
2 changes: 1 addition & 1 deletion api/edge/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2657,7 +2657,6 @@ components:
coin_selection: *ApiCoinSelection
fee: *amount


ApiInputsGeneral: &ApiInputsGeneral
<<: *transactionInputsGeneral
description: |
Expand Down Expand Up @@ -3691,6 +3690,7 @@ components:
In future transactions, the reference script can be used
by any wallet multiple times
by referencing the current transaction `id` and `index = 0`.
The script template must contain a single cosigner only, but it may include time locks.
encoding:
type: string
enum: ["base16", "base64"]
Expand Down

0 comments on commit 3f309dc

Please sign in to comment.