Skip to content

[Horizon] Stage 1 upgrade#296

Merged
tmigone merged 106 commits intomasterfrom
juanmardefago/horizon-stage-1-signed
Sep 24, 2025
Merged

[Horizon] Stage 1 upgrade#296
tmigone merged 106 commits intomasterfrom
juanmardefago/horizon-stage-1-signed

Conversation

@juanmardefago
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/mappings/graphTallyCollector.ts Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/mappings/graphTallyCollector.ts Outdated
Comment thread src/mappings/graphTallyCollector.ts Outdated
Maikol and others added 13 commits June 24, 2025 14:38
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
…phprotocol/graph-network-subgraph into juanmardefago/horizon-stage-1-signed
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
@tmigone tmigone merged commit 5b6c220 into master Sep 24, 2025
2 checks passed
@tmigone tmigone deleted the juanmardefago/horizon-stage-1-signed branch September 24, 2025 15:18
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