Skip to content

[Horizon] Stage 1 upgrade #296

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

Open
wants to merge 96 commits into
base: master
Choose a base branch
from

Conversation

juanmardefago
Copy link
Collaborator

No description provided.

juanmardefago and others added 23 commits May 19, 2025 03:00
feat: invert cuts to keep meaning consistent with pre-horizon
…cy-locked-tokens

feat: added legacy fields for locked tokens and lockedUntil
…ute-period

feat: added DisputePeriodSet handler
…ing-until

feat: adding latest value for thawingUntil on Indexer and Provision
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
fix: added cancellableAt and LegacyDispute
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
let payer = createOrLoadPayer(event.params.payer)
let receiver = createOrLoadReceiver(event.params.receiver)
let escrow = createOrLoadEscrowAccount(event.params.payer, event.params.dataService, event.params.receiver)
escrow.balance = escrow.balance.minus(event.params.tokens)
Copy link
Member

Choose a reason for hiding this comment

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

I think we should update the escrow as part of the payments escrow handlers, specifically in EscrowCollected handler as that is where the actual state is changed.

Copy link
Member

Choose a reason for hiding this comment

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

And we should add tokensCollected to the graph tally global state

Copy link
Member

Choose a reason for hiding this comment

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

Good point. My initial implementation was updating the balance in EscrowCollected, but that event doesn't have the collectionId so I changed it to PaymentCollected. But we can split it up, create the transaction here and update the escrow balance separately.

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.

4 participants