Skip to content

feat: implement on-chain collect for DIPs agreements - #1185

Merged
Maikol merged 4 commits into
main-dipsfrom
feat/dips-on-chain-collect
Apr 28, 2026
Merged

Maikol merged 4 commits into
main-dipsfrom
feat/dips-on-chain-collect

Conversation

@Maikol

@Maikol Maikol commented Mar 23, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-project-automation github-project-automation Bot moved this to 🗃️ Inbox in Indexer Mar 23, 2026
@Maikol
Maikol force-pushed the feat/dips-on-chain-collect branch from dc68bb2 to 53d84e4 Compare April 8, 2026 13:57
@Maikol
Maikol force-pushed the feat/dips-continuous-collection branch from 52f343d to e559039 Compare April 10, 2026 13:23
@Maikol
Maikol force-pushed the feat/dips-on-chain-collect branch from 53d84e4 to bd19b24 Compare April 10, 2026 13:24
Base automatically changed from feat/dips-continuous-collection to main-dips April 22, 2026 14:27
@Maikol
Maikol force-pushed the feat/dips-on-chain-collect branch from bd19b24 to 9eb354c Compare April 22, 2026 14:28

for (const agreement of readyAgreements) {
try {
await this.tryCollectAgreement(agreement, blockNumber, logger)

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.

tryCollectAgreement returns early on 'paused'/'unauthorized' without throwing, so updateAfterCollection runs as if the collect succeeded, when when no tx was actually sent.

} catch (err) {
if (this.isDeterministicError(err)) {
const parsedError = tryParseCustomError(err)
logger.warn('Deterministic error collecting agreement, skipping', {

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.

Note: A deterministic revert here logs warn and skips, so the agreement is retried forever.

const entityCounts = await this.graphNode.entityCount([deploymentId])
const entities = entityCounts[0]

const recentBlock = blockNumber - 10

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.

Could extract into RECENT_BLOCK_OFFSET or similar

@github-project-automation github-project-automation Bot moved this from 🗃️ Inbox to ✅ Approved in Indexer Apr 27, 2026
@Maikol
Maikol force-pushed the feat/dips-on-chain-collect branch from f792bc2 to 078630f Compare April 28, 2026 20:23
@Maikol
Maikol merged commit f478b5a into main-dips Apr 28, 2026
6 checks passed
@Maikol
Maikol deleted the feat/dips-on-chain-collect branch April 28, 2026 20:28
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🚗 Merged in Indexer Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

2 participants