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

Rename QueryHandle and QueryBackend to Provider variants #1665

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

KristianBalaj
Copy link
Collaborator

Closes #1615

Pre-review checklist

  • All code has been formatted using our config (make format)
  • Any new API features or modification of existing behavior are covered with tests
  • The template (templates/ctl-scaffold) has been updated
  • The changelog has been updated under the ## Unreleased header, using the appropriate sub-headings (### Added, ### Changed, ### Removed, ### Fixed), and the links to the appropriate issues/PRs have been included

@@ -91,6 +91,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Changed

- `cardano-serialization-lib` has been updated to `v13.2.0` ([#1656](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1656))
- `QueryHandle` has been renamed to `Provider`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Each changelog entry should include a link to the corresponding pull request or issue. See other entries for reference.

@@ -63,7 +63,7 @@ Lucid, on the other hand, provides a way to get a UTxO that contains a specified

- Both CTL and Lucid support [Blockfrost](./blockfrost.md) and [Kupo+Ogmios](./runtime.md)
- Lucid also supports [Maestro](https://www.gomaestro.org/)
- Both CTL and Lucid allow for custom backends - Lucid via `Provider` interface implementation, and CTL via a custom `QueryHandle`.
- Both CTL and Lucid allow for custom backends - Lucid via `Provider` interface implementation, and CTL via a custom `Provider`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Both CTL and Lucid allow for custom backends - Lucid via `Provider` interface implementation, and CTL via a custom `Provider`.
- Both CTL and Lucid support multiple query backends through a `Provider` interface. Although CTL does not support specifying custom backends without forking, individual queries in the existing backend can still be replaced. Refer to [doc/custom-query-layers.md](./custom-query-layers.md) for more information.

@@ -16,15 +16,15 @@

CTL can be extended with custom (user) query layers if needed. At this moment it can be done by forking.

Every query CTL uses, except of backend-specific ones, goes through a [query handle](https://github.com/Plutonomicon/cardano-transaction-lib/blob/10a88faa2e6237aafc90568e3488f3421517af63/src/Internal/Contract/QueryHandle/Type.purs#L36).
Every query CTL uses, except of backend-specific ones, goes through a [query handle](https://github.com/Plutonomicon/cardano-transaction-lib/blob/10a88faa2e6237aafc90568e3488f3421517af63/src/Internal/Contract/Provider/Type.purs#L36).
Copy link
Collaborator

Choose a reason for hiding this comment

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

goes through a [provider]

@@ -31,19 +31,19 @@ import Effect.Exception (Error)
import Effect.Exception (message) as Error
import Type.Proxy (Proxy(Proxy))

type UtxosAtQuery = Address -> Aff (Either ClientError UtxoMap)
type UtxosAtProvider = Address -> Aff (Either ClientError UtxoMap)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a query, not a provider. Please rename it back to UtxosAtQuery.


type GetUtxoByOrefQuery =
type GetUtxoByOrefProvider =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, should be renamed back to GetUtxoByOrefQuery.

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.

Rename QueryHandle to Provider
2 participants