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

feat: add icrc3_get_transactions #41

Merged
merged 32 commits into from
Sep 14, 2023
Merged

feat: add icrc3_get_transactions #41

merged 32 commits into from
Sep 14, 2023

Conversation

MarioDfinity
Copy link
Contributor

@MarioDfinity MarioDfinity commented Aug 31, 2023

  1. add the icrc3_get_transactions endpoint following the ICRC-3 standard
  2. add tests against the endpoint that cover the single range query case

@MarioDfinity MarioDfinity requested a review from a team as a code owner August 31, 2023 13:09
cycles-ledger/src/storage.rs Outdated Show resolved Hide resolved
Comment on lines 1442 to 1443
// Replacing expected blocks with the actual blocks is needed because only actual
// blocks have the timestamp
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment is a bit confusing, at least to me.
Effectively, you are extracting the actual block because it has the timestamp set, which you need to compute the correct hash, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. The timestamp cannot be computed so I need to fetch it. I could just change the timestamp field of the block instead to make it more clear.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Updating the comment to make it clearer or changing the timestamp field, either way works for me. You choose! :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've done both with c65cad0. I set the timestamp and I changed the description to explain why I do it. Is it better?

Comment on lines 1464 to 1465
// Replacing expected blocks with the actual blocks is needed because only actual
// blocks have the timestamp
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.

cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
MarioDfinity and others added 7 commits September 1, 2023 10:04
Co-authored-by: Thomas Locher <[email protected]>
Co-authored-by: Thomas Locher <[email protected]>
Co-authored-by: Thomas Locher <[email protected]>
Co-authored-by: Thomas Locher <[email protected]>
Co-authored-by: Thomas Locher <[email protected]>
Co-authored-by: Thomas Locher <[email protected]>
cycles-ledger/cycles-ledger.did Show resolved Hide resolved
cycles-ledger/cycles-ledger.did Show resolved Hide resolved
cycles-ledger/cycles-ledger.did Show resolved Hide resolved
@THLO
Copy link
Collaborator

THLO commented Sep 1, 2023

The PR is missing a description. Could you add one, please?
It is especially useful to describe what the PR covers and what it does not cover (such as additional testing that will follow later).

@MarioDfinity
Copy link
Contributor Author

The PR is missing a description. Could you add one, please? It is especially useful to describe what the PR covers and what it does not cover (such as additional testing that will follow later).

Done!

cycles-ledger/src/endpoints.rs Outdated Show resolved Hide resolved
cycles-ledger/src/storage.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
cycles-ledger/tests/tests.rs Outdated Show resolved Hide resolved
@MarioDfinity MarioDfinity merged commit d2577ac into main Sep 14, 2023
1 check passed
@MarioDfinity MarioDfinity deleted the FI-771-icrc-3 branch September 14, 2023 15:04
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.

5 participants