Skip to content

feat(sdk): add query for data contract history - #1787

Merged
markin-io merged 16 commits into
v1.0-devfrom
feat/rs-sdk/endpoints
Apr 25, 2024
Merged

feat(sdk): add query for data contract history#1787
markin-io merged 16 commits into
v1.0-devfrom
feat/rs-sdk/endpoints

Conversation

@markin-io

@markin-io markin-io commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Added data contract history query to rs-sdk

What was done?

  • Added limit query
  • Added test

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@markin-io
markin-io force-pushed the feat/rs-sdk/endpoints branch from a5cf03c to ef36856 Compare April 11, 2024 17:09
@markin-io
markin-io marked this pull request as ready for review April 11, 2024 17:09
@markin-io markin-io added this to the v1.0.0 milestone Apr 11, 2024
@markin-io markin-io changed the title feat(rs-sdk): add query for data contract history feat(sdk): add query for data contract history Apr 11, 2024
@lklimek

lklimek commented Apr 16, 2024

Copy link
Copy Markdown
Contributor

Checklist:

  1. Ensure protobuf messages are defined in packages/dapi-grpc/protos/platform/v0/platform.proto and generated
    correctly in packages/dapi-grpc/src/platform/proto/org.dash.platform.dapi.v0.rs.

  2. In packages/dapi-grpc/build.rs, add Request to VERSIONED_REQUESTS and response Response to VERSIONED_RESPONSES.
    This should add derive of VersionedGrpcMessage (and some more) in org.dash.platform.dapi.v0.rs.

  3. Link request and response type to dapi-client by adding appropriate invocation of impl_transport_request_grpc! macro
    in packages/rs-dapi-client/src/transport/grpc.rs.

  4. If needed, implement new type in packages/rs-drive-proof-verifier/src/types.rs to hide complexity of data structures
    used internally.

    If you intend to implement FetchMany, you should define type returned by fetch_many() using RetrievedObjects
    that will store collection of returned objects, indexd by some key.

  5. Implement FromProof trait for the Object (or type defined in types.rs) in packages/rs-drive-proof-verifier/src/proof.rs.

  6. Implement Query trait for the Request in packages/rs-sdk/src/platform/query.rs.

  7. Implement Fetch\<Request\> trait for the Object (or type defined in types.rs) in packages/rs-sdk/src/platform/fetch.rs.

  8. Implement FetchMany\<Request\> trait for the Object (or type defined in types.rs) in packages/rs-sdk/src/platform/fetch_many.rs.

  9. Add mod ...; clause to packages/rs-sdk/tests/fetch/main.rs

  10. Implement unit tests in packages/rs-sdk/tests/fetch/*object*.rs

  11. Add name of request type to match clause in packages/rs-sdk/src/mock/sdk.rs : load_expectations()

  12. Start local devnet with yarn reset ; yarn setup && yarn start

  13. Generate test vectors with script packages/rs-sdk/scripts/generate_test_vectors.sh

Comment thread packages/rs-sdk/tests/fetch/data_contract.rs
@markin-io
markin-io merged commit 0b4a733 into v1.0-dev Apr 25, 2024
@markin-io
markin-io deleted the feat/rs-sdk/endpoints branch April 25, 2024 10:23
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.

4 participants