-
Notifications
You must be signed in to change notification settings - Fork 8
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
chore: improve contract to contract write #552
chore: improve contract to contract write #552
Conversation
triggered_by=( | ||
self.session.query(Transactions).filter_by(hash=triggered_by_hash).one() | ||
if triggered_by_hash | ||
else None | ||
), |
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.
This query is necessary since SQLAlchemy works with objects, therefore we need to have the object related here
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #552 +/- ##
=======================================
Coverage 16.32% 16.32%
=======================================
Files 111 111
Lines 7843 7843
Branches 184 184
=======================================
Hits 1280 1280
Misses 6488 6488
Partials 75 75 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
c5eed9f
to
c18ff62
Compare
Quality Gate failedFailed conditions |
@@ -155,4 +167,8 @@ def set_transaction_result(self, transaction_hash: str, consensus_data: dict): | |||
transaction.status = TransactionStatus.FINALIZED | |||
transaction.consensus_data = consensus_data | |||
|
|||
self.session.commit() | |||
print( |
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.
@AgustinRamiroDiaz wasn't this moved to the consensus? and why is there a bare print here?
@@ -35,6 +35,11 @@ def _parse_transaction_data(transaction_data: Transactions) -> dict: | |||
"created_at": transaction_data.created_at.isoformat(), | |||
"leader_only": transaction_data.leader_only, | |||
"client_session_id": transaction_data.client_session_id, | |||
"triggered_by": transaction_data.triggered_by_hash, | |||
"triggered_transactions": [ |
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.
@AgustinRamiroDiaz when is this field populated?
🎉 This PR is included in version 0.13.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Extension of #454
What
Adds self relationship to
Transactions
to be able to track the triggered transactionsI'll try adding more tests through the day if I have time
Why
Testing done
Decisions made
In the UI it's just plain text
We could improve this maybe by polling the
triggered_transactions
. But those transactions could trigger even more transactions, so this needs a bit more of definition prior to working on itChecks
Reviewing tips
User facing release notes
You can now see the transactions triggered by your Intelligen Contract when writing to other contracts