-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add support for Preview 10 operations when assembling Soroban transactions. #108
Conversation
const invokeOp: Operation.InvokeHostFunction = raw.operations[0]; | ||
txnBuilder.addOperation( | ||
Operation.invokeHostFunction({ | ||
source: invokeOp.source, |
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.
note that previously we weren't copying the source
src/transaction.ts
Outdated
|
||
case "bumpFootprintExpiration": | ||
const bumpOp: Operation.BumpFootprintExpiration = raw.operations[0]; | ||
txnBuilder.addOperation( |
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.
since this and restore case are not merging any data from simulation, can it reduce to txnBuilder.addOperation(raw.operations[0])
, or I may be missing a subtlety.
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.
I thought so, too, but kept getting some TypeScript errors... tried it again in ea8ccb3 and it worked 🤦 Great call, thank you!
* Add test case for #108 * Upgrade all dependencies to their latest minor versions
This builds on #107 to allow
BumpFootprintExpirationOp
s andRestoreFootprintOp
s to be assembled when users callsimulateTransaction
andprepareTransaction
.