Skip to content

add sdk examples to send transaction#709

Merged
ElliotFriend merged 2 commits into
stellar:mainfrom
Myestery:expand-send-transaction
Jun 24, 2024
Merged

add sdk examples to send transaction#709
ElliotFriend merged 2 commits into
stellar:mainfrom
Myestery:expand-send-transaction

Conversation

@Myestery
Copy link
Copy Markdown
Contributor

@briwylde08
Added SDK examples to sendTransaction Page to close #622

@Myestery
Copy link
Copy Markdown
Contributor Author

@briwylde08
This is ready for review

@briwylde08
Copy link
Copy Markdown
Contributor

Thank you for the contribution! We'll get it reviewed and get back to you with an approval or follow-up questions!

@briwylde08 briwylde08 requested a review from ElliotFriend June 21, 2024 15:21
@ElliotFriend
Copy link
Copy Markdown
Contributor

Hi, @Myestery! Thanks (again lol) for contributing! I'll get to reviewing it first thing next week.

Copy link
Copy Markdown
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

Hi, @Myestery! This is a really good start! I do have a couple changes I'd love to see. I'm curious (and this isn't a blocker, just my own question), why you went the route of creating the transaction's source account manually with the public key and sequence number? Often, I'll see people in the ecosystem use the server's built-in getAccount('G...') function to grab the account's current sequence number from the ledger. Was that a choice you were making, or just incidental? (Like I said, that's not a blocker, just wondering if there was a reason.)

I'm also a little conflicted a little about the transactions you're sending in the different examples:

  • On the one hand, I think it's generally good practice to construct and send the same transaction in each of the languages for these kind of examples. This could help folks more clearly understand finer differences between each language's SDK. Might also make maintaining and updating them easier?
  • On the other hand, it can be nice to demonstrate how to build different transactions, a little like a "bonus example" lol.

I'm on the fence, though. @briwylde08 Do you have any thoughts about that?

Comment thread docs/data/rpc/api-reference/methods/sendTransaction.mdx
Comment thread docs/data/rpc/api-reference/methods/sendTransaction.mdx Outdated
Comment thread docs/data/rpc/api-reference/methods/sendTransaction.mdx
Comment thread docs/data/rpc/api-reference/methods/sendTransaction.mdx
Comment thread docs/data/rpc/api-reference/methods/sendTransaction.mdx Outdated
Comment thread docs/data/rpc/api-reference/methods/sendTransaction.mdx
Comment thread docs/data/rpc/api-reference/methods/sendTransaction.mdx
@Myestery
Copy link
Copy Markdown
Contributor Author

Hi, @Myestery! This is a really good start! I do have a couple changes I'd love to see. I'm curious (and this isn't a blocker, just my own question), why you went the route of creating the transaction's source account manually with the public key and sequence number? Often, I'll see people in the ecosystem use the server's built-in getAccount('G...') function to grab the account's current sequence number from the ledger. Was that a choice you were making, or just incidental? (Like I said, that's not a blocker, just wondering if there was a reason.)

I'm also a little conflicted a little about the transactions you're sending in the different examples:

  • On the one hand, I think it's generally good practice to construct and send the same transaction in each of the languages for these kind of examples. This could help folks more clearly understand finer differences between each language's SDK. Might also make maintaining and updating them easier?
  • On the other hand, it can be nice to demonstrate how to build different transactions, a little like a "bonus example" lol.

I'm on the fence, though. @briwylde08 Do you have any thoughts about that?

I will go with your thoughts on these
Its nice to use the standard functions and maintain uniformity across the languages

@Myestery
Copy link
Copy Markdown
Contributor Author

@ElliotFriend
This is ready for re-review

Copy link
Copy Markdown
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks so much @Myestery

Really helpful stuff you've provided!

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.

Expand on the sendTransaction RPC method with SDK tutorials and examples

3 participants