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

Strongly Typed Ledger Object wrapper for DepositPreAuth #17

Closed
wants to merge 9 commits into from

Conversation

ckeshava
Copy link

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

Test Plan

DepositPreAuth already has unit tests. Since I'm not exposing any new public API endpoints, I'm not sure if/how newer unit tests need to be added.

Future Tasks

I need to organize the DepositPreAuthorize wrapper into a separate file. At the moment, I'm piggy-backing on AccountRoot file, I'll change this after the initial code review.

ckeshava added 3 commits May 17, 2023 15:17
…Keylet is used to distinguish between various other types of SLEs
…t does not apply the new wrapper extensively across the codebase. That would need a closer examination in a separate commit.
@ckeshava
Copy link
Author

I'm aware that I need to organize the wrapper in disparate files. I thought I'll do it after the initial code review

ckeshava added 6 commits May 18, 2023 14:24
…ositPreAuth into the new read, peek functions
…ction calls corresponding to Checks ledger objects
This commit defines and uses a new wrapper for the Offers Ledger Object. It is a sequel to the continuing work in the series of Account, DepositPreauth and Checks.
Existing usages of readSLE and peekSLE relevant to the Offers object have been modified to use read and peek functions respectively. This brings forth the compile-time type checking advantages offered by the proposed Strongly typed wrapper.

As part of future work, DeleteAccount.cpp needs to be updated to ensure that std::shared_ptr<SLE> is removed in favor of the new wrapper. This requires changes to other ledger objects like NFTokens.
This commit introduces a new wrapper for Escrow ledger objects through a strongly-typed Escrow keylet. Existing instances of readSLE and peekSLE pertaining to Escrow objects have been updated to use newly proposed read/peek functions.

The wrapper exposes read APIs into the erstwhile STObject::at(...) interface.
@scottschurr
Copy link
Owner

Superseded by pull request #18.

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.

2 participants