-
Notifications
You must be signed in to change notification settings - Fork 295
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
build(connector-stellar): add a run soroban transaction endpoint #3296
build(connector-stellar): add a run soroban transaction endpoint #3296
Conversation
83062c7
to
711fa0a
Compare
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.
@fazatti ^^ Please see comments above!
...typescript/integration/plugin-ledger-connector-stellar/run-soroban-transaction/index.test.ts
Outdated
Show resolved
Hide resolved
...typescript/integration/plugin-ledger-connector-stellar/run-soroban-transaction/index.test.ts
Outdated
Show resolved
Hide resolved
...cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-ledger-connector-stellar.ts
Outdated
Show resolved
Hide resolved
packages/cacti-plugin-ledger-connector-stellar/src/main/json/openapi.json
Outdated
Show resolved
Hide resolved
8e25235
to
e1206b0
Compare
Hi @petermetz ! It took me a while to make all the adjustments and add the Rust project of the demo contract, but I've managed to complete it. Would you please have a look and review it whenever you are available? |
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.
@fazzatti Looking good to me, thank you again for the contribution and the updates! :-)
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.
Thanks, looks great ;) I've added a small nitpick but it's optional
...cacti-plugin-ledger-connector-stellar/src/main/typescript/plugin-ledger-connector-stellar.ts
Outdated
Show resolved
Hide resolved
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.
Oh sorry, reverting approval, I've forgot we've merged a change in openapi definitions yesterday (4a9ed0a)
Please apply the changes you've made in openapi.json
to openapi.tpl.json
instead (it's in the same folder), then run the npm run codegen
- this will create the final openapi.json
. In general, all changes should be made to the tpl.json
file from now on :)
f10571f
to
6526e80
Compare
Hi @outSH ! |
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.
LGTM, thank you!
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.
@fazzatti Please resolve the merge conflict in the opanpi.tpl.json file! Let me know if you need any help! See my earlier posts on what the new openapi.tpl.json file is if you aren't sure!
9fcc6a7
to
efb6e13
Compare
@petermetz thank you so much! I took a beating from this last update 🤣 Please let me know if you notice anything I might've missed, or that requires any additional steps. |
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.
@fazzatti No worries, I'm glad it got figured out in the end :-) Please squash the commits together though!
- Add a run soroban transaction endpoint to the Stellar Connector plugin. - Add a Soroban hellow_world contract to the demo-contract folder. **Remarks:** The `runSorobanTransaction` endpoint can be used to make smart contract invocations on the Soroban platform. The endpoint accepts a flag called `readOnly` to indicate when the transaction should not alter ledger state. When `true`, the transaction will only be simulated based on the current ledger state and provide an up-to-date output without registering the transaction to the ledger, ensuring no fees are consumed. When `false`, the transaction will be executed and registered to the ledger even if it doesn't alter the ledger state, incurring fees as usual. More details can be found in the `README.md` file under the connector root directory. Closes hyperledger-cacti#3238 Signed-off-by: Fabricius Zatti <fazzatti@gmail.com>
b94967c
to
fe1bc7b
Compare
Sorry about that, I completely forgot about not using the update branch button 🤦 |
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.
@fazzatti No worries, thank you again for the contribution(s)! :-)
Remarks:
The
runSorobanTransaction
endpoint can be used to make smart contract invocations on the Soroban platform. The endpoint accepts a flag calledreadOnly
to indicate when the transaction should not alter ledger state. Whentrue
, the transaction will only be simulated based on the current ledger state and provide an up-to-date output without registering the transaction to the ledger, ensuring no fees are consumed. Whenfalse
, the transaction will be executed and registered to the ledger even if it doesn't alter the ledger state, incurring fees as usual.More details can be found in the
README.md
file under the connector root directory.Closes #3238
Pull Request Requirements
upstream/main
branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.-s
flag when usinggit commit
command. You may refer to this link for more information.Character Limit
A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.