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 sidechain-specific RPCs/sugar #1940

Merged
merged 13 commits into from
Apr 4, 2022
Merged

feat: add sidechain-specific RPCs/sugar #1940

merged 13 commits into from
Apr 4, 2022

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Mar 16, 2022

High Level Overview of Change

This PR:

  • Adds federator_info request and response objects
  • Adds a sugar util method to create a cross-chain payment transaction from a normal payment transaction

Context of Change

xrpl.js sidechain support

Type of Change

  • New feature (non-breaking change which adds functionality)

Before / After

Test Plan

Added tests for the helper method. I'm not sure how to test the RPC call and object, since standalone rippled isn't a federator. CI passes.

@mvadari mvadari marked this pull request as ready for review March 16, 2022 22:23
*
* @category Responses
*/
export interface FederatorInfoResponse extends BaseResponse {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these values have docstrings/comments explaining what they are used for like we do with other requests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes - however, those don't exist yet.

* @throws XrplError - if there are more than 2 memos.
* @category Utilities
*/
export default function createXchainPayment(
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming wise I think it's better to explicitly write "Cross" rather than "X" since X is actually meaningful sometimes in our libraries (Ex. xAddress)

Also, "chain" should be capitalized.

I'd recommend to rename this function to createCrossChainPayment

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree. Let's use "Cross" instead to avoid ambiguity.

Copy link
Collaborator

@khancode khancode left a comment

Choose a reason for hiding this comment

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

Just need to change the "X" wording to "Cross". Otherwise, LGTM!

* @throws XrplError - if there are more than 2 memos.
* @category Utilities
*/
export default function createXchainPayment(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree. Let's use "Cross" instead to avoid ambiguity.

Copy link
Contributor

@JST5000 JST5000 left a comment

Choose a reason for hiding this comment

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

LGTM

@mvadari mvadari merged commit d259059 into main Apr 4, 2022
@mvadari mvadari deleted the sidechain branch April 4, 2022 21:11
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.

3 participants