-
Notifications
You must be signed in to change notification settings - Fork 117
Condition and fulfillment in escrow #698
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
Open
ckeshava
wants to merge
12
commits into
XRPLF:main
Choose a base branch
from
ckeshava:conditionalEscrow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1e39a97
utility function to generate condition and fulfillment for conditiona…
ckeshava f9c260e
include conditional escrow test case in snippets
ckeshava f2a3517
update CL
ckeshava 154ab1a
Merge branch 'main' into conditionalEscrow
ckeshava 1b14e39
include the new poetry.lock, to be consistent with the pyproject.toml…
ckeshava 111a6ff
Merge branch 'conditionalEscrow' of https://github.com/ckeshava/xrpl-…
ckeshava b60cf13
import TypedDict from typing_extensions, instead of importing from ty…
ckeshava 93fc134
Merge branch 'main' into conditionalEscrow
ckeshava 8f78931
Update lock file
ckeshava 1255d5d
Update escrow snippet: Use rippled API v2 format
ckeshava 6385918
Update xrpl/models/transactions/escrow_create.py
ckeshava 0c4115e
rectify the invocaton of CC serialize_binary method
ckeshava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Import is correctly structured, but function needs to be exposed
Based on the verification:
generate_escrow_cryptoconditionsfunction is defined inxrpl/models/transactions/escrow_create.pyxrpl/models/transactions/__init__.pyTo make this function properly accessible for external usage, it should be:
xrpl/models/transactions/__init__.py__all__list in the same file🔗 Analysis chain
Verify import accessibility.
Ensure
generate_escrow_cryptoconditionsis properly exposed in the package’s__init__.pyif needed for external usage.Let me gather more information about the package structure and imports.
Let me check one more thing to verify if this is a newly added function.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 2311
Script:
Length of output: 8835
Script:
Length of output: 6651
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Developers can use the new function as
from xrpl.models.transactions.escrow_create import generate_escrow_cryptoconditions.Is it really necessary to expose this function through the
__init__.pyfile? Would that have any costs in terms of the size of the xrpl-py python package?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ckeshava, exposing functions in
__init__.pydoes not significantly increase package size unless you're re-exporting many large modules. Typically, it’s more about how you want users to discover and import functionality. If you feel comfortable directing developers toescrow_create, you can certainly leave it out of__init__.py. However, adding a single function there will have a negligible impact on package size; it mainly offers discoverability and an implicit statement that this function is part of the “official” public API.