Skip to content

Commit dc68bb2

Browse files
committed
fix: use tuple encoding and MaxUint256 slippage for DIPs collection
The contract's abi.decode(data, (CollectIndexingFeeDataV1)) expects tuple encoding, not flat parameter encoding. Also use MaxUint256 for maxSlippage to avoid RecurringCollectorExcessiveSlippage reverts from rate limiting (tracked as TODO to investigate and switch back to 0).
1 parent 7f73b68 commit dc68bb2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • packages/indexer-common/src/indexing-fees

packages/indexer-common/src/indexing-fees/dips.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import { tryParseCustomError } from '../utils'
3737
import { uniqueAllocationID, horizonAllocationIdProof } from '../allocations/keys'
3838
import { encodeStartServiceData, PaymentTypes } from '@graphprotocol/toolshed'
3939
import { NetworkSpecification } from '../network-specification'
40-
import { AbiCoder, BaseWallet, Signer } from 'ethers'
40+
import { AbiCoder, BaseWallet, MaxUint256, Signer } from 'ethers'
4141
import {
4242
fetchCollectableAgreements,
4343
SubgraphIndexingAgreement,
@@ -578,8 +578,8 @@ export class DipsManager {
578578
const abiCoder = AbiCoder.defaultAbiCoder()
579579

580580
const collectData = abiCoder.encode(
581-
['uint256', 'bytes32', 'uint256', 'bytes', 'uint256'],
582-
[entities, effectivePoi, recentBlock, '0x', 0],
581+
['(uint256,bytes32,uint256,bytes,uint256)'],
582+
[[entities, effectivePoi, recentBlock, '0x', MaxUint256]],
583583
)
584584

585585
const data = abiCoder.encode(['bytes16', 'bytes'], [agreement.id, collectData])

0 commit comments

Comments
 (0)